Skip to content

Add missing update_trian! method for MultiField#112

Merged
JordiManyer merged 7 commits intogridap:masterfrom
zjwegert:fix-diff_trian-multifield
Jul 10, 2025
Merged

Add missing update_trian! method for MultiField#112
JordiManyer merged 7 commits intogridap:masterfrom
zjwegert:fix-diff_trian-multifield

Conversation

@zjwegert
Copy link
Copy Markdown
Contributor

@zjwegert zjwegert commented Jul 9, 2025

Handle MultiFieldFEFunction inputs for shape differentiation through differentiable triangulations. E.g., for the case φuh ∈ V_φu = MultiFieldFESpace([V_φ,U]),

= DifferentiableTriangulation(...,V_φ)
J_bulk_mult((φ,u)) = (...)dΩ
gradient(J_bulk_mult,φuh)

the existing update_trian! implementation would do nothing because V_φu !== V_φ. The added method for multifield spaces checks each space to see if any are the space related to the DifferentiableTriangulation.

@codecov
Copy link
Copy Markdown

codecov Bot commented Jul 9, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 77.04%. Comparing base (b492a2a) to head (96f4d97).
Report is 165 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #112      +/-   ##
==========================================
+ Coverage   73.99%   77.04%   +3.04%     
==========================================
  Files          18       31      +13     
  Lines        2546     3603    +1057     
==========================================
+ Hits         1884     2776     +892     
- Misses        662      827     +165     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@JordiManyer
Copy link
Copy Markdown
Member

@zjwegert Looks good. Update NEWS and I'll merge.

@zjwegert
Copy link
Copy Markdown
Contributor Author

zjwegert commented Jul 10, 2025

@JordiManyer FYI, I've also fixed precompilation in this PR. Waiting on tests.

@JordiManyer JordiManyer merged commit 19bed4d into gridap:master Jul 10, 2025
7 checks passed
@zjwegert zjwegert deleted the fix-diff_trian-multifield branch July 10, 2025 07:33
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