Tpetra: Make CrsGraph & CrsMatrix fillComplete check domain & range Map one-to-one-ness in debug mode
Created by: mhoemmen
See https://github.com/NaluCFD/Nalu/issues/211 for an example of a common user error, namely not passing in domain and range Maps to fillComplete when the row Map is overlapping (i.e., not one to one).
Tpetra has the
TPETRA_DEBUG environment variable now; if you set it to 1, you'll get more debug-mode checks. We can exploit this to help users diagnose their incorrect usage of Tpetra. In particular, we can do the following:
- Make the version of fillComplete that takes no Maps check that the row Map is one to one
- Make the version of fillComplete that takes the domain and range Maps check that these Maps are one to one
We should only do these checks in debug mode, since they may be expensive (they may require extra MPI communication).