Skip to content

FEM: Change eval functor to use struct#549

Merged
s-mayani merged 9 commits into
IPPL-framework:masterfrom
s-mayani:massmatrix_evalAx
Jun 17, 2026
Merged

FEM: Change eval functor to use struct#549
s-mayani merged 9 commits into
IPPL-framework:masterfrom
s-mayani:massmatrix_evalAx

Conversation

@s-mayani

@s-mayani s-mayani commented Jun 17, 2026

Copy link
Copy Markdown
Collaborator

In FEM, we use a functor, EvalFunctor, representing the PDE in order to compute the matrix-vector product A*x on the fly in the finite element space. However, this was hard-coded to take only the gradient of the basis functions in Lagrange, and the curl of the basis functions + the basis functions themselves in Nédélec, where there is both a curl-curl and a mass matrix term.

Now, instead of hard-coding which quantities are needed, there is one struct which contains that basis function and its associated derivative. In the case of Lagrange, the associated derivative is the gradient, while for Nédélec it is the curl. This struct is passed to the EvalFunctor, which can use whichever quantity it needs (either for a mass term or a gradient/curl term).

This PR was made in collaboration with Cursor.

@s-mayani s-mayani self-assigned this Jun 17, 2026
@s-mayani s-mayani requested a review from klappi-s June 17, 2026 11:02
@s-mayani s-mayani marked this pull request as ready for review June 17, 2026 13:31
@s-mayani s-mayani requested a review from aaadelmann June 17, 2026 14:03
@s-mayani s-mayani enabled auto-merge June 17, 2026 14:04
@s-mayani s-mayani added this pull request to the merge queue Jun 17, 2026
Merged via the queue into IPPL-framework:master with commit 6ae63d2 Jun 17, 2026
6 checks passed
@s-mayani s-mayani deleted the massmatrix_evalAx branch June 18, 2026 07:52
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