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

Unify assembly patterns #6158

Merged
merged 1 commit into from
Nov 23, 2024
Merged

Conversation

gassmoeller
Copy link
Member

This PR is mostly improving code quality, although it could also lead to small performance improvements for a few models.
It does the following things:

  • consistently name the loop variable over quadrature points q like we do almost everywhere
  • pre-compute JxW outside of assembly loops over degrees of freedom wherever possible. In many places that just assemble a right hand side (single loop over DoF) this likely doesnt make a difference, but a few places assemble matrices where this change might matter. Also I would just like to establish this as a pattern in as many places as possible so that future copy-paste code will copy the correct pattern
  • while doing the JxW conversion also change a few places that can pre-compute values of shape functions or other expensive items from the inner loop. I dont expect huge performance gains, but it is a pattern we use in many places already, and if it is simple we should save the compute time where possible.

@tjhei tjhei merged commit b14f5fd into geodynamics:main Nov 23, 2024
7 checks passed
@gassmoeller gassmoeller deleted the unify_assembly_code branch December 10, 2024 14:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants