code for obtaining subcell fluxes with desired sparsity pattern #35
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
As discussed, I've added code for obtaining subcell fluxes from an element vector that sums to zero. Note that there is an option
bool UseDiagonalNbrs
. If this is set to false, the dense stencil of a Q_1 element reduces to a cross stencil, similar to collocated methods. If true, the stencil of Q_1 remains unchanged, in either case the stencil is generally sparse.Since I wanted to have this option and the integrals to be computed are non-standard, I found it easier to hard-code the entries, after tedious pen-and-paper calculations.
I'm performing the "assembly" on the reference element, and omitting the multiplication and subsequent division with the transformation constant. I strongly believe that this can also be done for severely curved elements, because Manuel observed that such integration errors are way less important than obtaining the right sparsity pattern.
The new functions are called from the main routine to illustrate how to use them. I haven't worked with Remhos in a while, so somebody else needs to apply this code where it's needed.