sandialabs / compadre

Compadre (Compatible Particle Discretization and Remap)
Other
22 stars 6 forks source link

Add option 'implicit_RHS' to QR solver #270

Closed compadre-autotester closed 2 years ago

compadre-autotester commented 2 years ago

When solving a QR problem for GMLS, it is not always necessary to form the entire sqrt(W)*I matrix, as a 1D vector containing only the diagonal entries of the matrix can suffice.

Previously, this case was inferred when M!=N in the solver. However, if the number of neighbors found are exactly equal to the cardinality of the basis, then it was assumed that a non-implicit storage was used for the RHS (bug).

This commit introduces implicit_RHS, determined by whether the LU solver is requested or not, and passes this into the QR solver. These changes will make the storage format more obvious to developers, fix a bug, and remove reliance on sizing arguments to determine intention.