FEEvaluation for simplices: Arrange gradients contiguously #16970
+60
−61
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.
This PR does two things:
ShapeInfo::shape_gradients
for the non-tensor-product elements (simplices), as this is the order in which we store the result of the gradient operation nowadays anyway, so it saves us one of the loopsEvaluatorTensorProduct
object that gets called through a layer of function calls, directly call theapply_matrix_vector_product
function that was introduced by Restructure tensor-product kernels via 1d interpolants #15891. This is slightly more verbose at the caller site, but since it is only called a handful of times (4 times to be precise, or 6 if considering the add-into/overwrite case ofintegrate
), I think this is still clearer than to introduce several indirections (that also need to be read and understood).I plan to rearrange some instructions inside the non-templated
apply_matrix_vector_product
function to increase performance in a later PR, where this more direct call stack also helps to track dependencies.