Skip to content

Fix PointEvaluator Differentiability#68

Merged
Da-Be-Ru merged 4 commits into
WIAS-PDELib:masterfrom
Da-Be-Ru:fix/point_evaluator_differentiability
May 18, 2026
Merged

Fix PointEvaluator Differentiability#68
Da-Be-Ru merged 4 commits into
WIAS-PDELib:masterfrom
Da-Be-Ru:fix/point_evaluator_differentiability

Conversation

@Da-Be-Ru
Copy link
Copy Markdown
Member

I require the use case to differentiate a point evaluation for H1P1 elements with respect to transformed point coordinates themselves, i.e. given some transformation $g: \mathbb{R}^d \rightarrow \mathbb{R}^d$ of the coordinate $\mathtt{x}$, I may have something like

$$f(\mathtt{x::Vector}) = \mathtt{PE.evaluate!}(g(\mathtt{x})) = \sum_k \alpha_k \cdot \varphi_k(g(\mathtt{x}))$$

and I need the gradient

$$D_xf(x) = \sum_k \alpha_k D_x\varphi_k(g(\mathtt{x}))D_x g(\mathtt{x}) = \sum_k \alpha_k \nabla\varphi_k(g(\mathtt{x}))\left[\partial_{x_j} g_l(\mathtt{x})\right]_{j,l}.$$

This required me to propagate the coordinate and coefficient types for the FEEvaluator which we missed to include when we separated those in the adjustments to the PointEvaluator to enable propagation of derivatives: #53.

I also added a test case for this on a reference triangle for different coefficient combinations $\mathbf{\alpha}$.

@chmerdon
Copy link
Copy Markdown
Member

Ok, nice. Please add a bugfix version bump and a changelog entry.

@Da-Be-Ru Da-Be-Ru merged commit 3942eb7 into WIAS-PDELib:master May 18, 2026
12 checks passed
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