Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FEEvaluation for simplices: Arrange gradients contiguously #16970

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

kronbichler
Copy link
Member

This PR does two things:

  • Arrange all components of the gradient contiguously in 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 loops
  • Instead of setting up a one-dimensional EvaluatorTensorProduct object that gets called through a layer of function calls, directly call the apply_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 of integrate), 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.

@kronbichler
Copy link
Member Author

I rebased this PR to make it compatible with the recent changes in the affected interfaces.

@kronbichler
Copy link
Member Author

ping

@bangerth
Copy link
Member

Anyone with the requisite knowledge want to review/merge this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants