Skip to content

Refactor of FESpaceWithLinearConstraints#1189

Draft
JordiManyer wants to merge 29 commits into
masterfrom
constraints
Draft

Refactor of FESpaceWithLinearConstraints#1189
JordiManyer wants to merge 29 commits into
masterfrom
constraints

Conversation

@JordiManyer

@JordiManyer JordiManyer commented Nov 24, 2025

Copy link
Copy Markdown
Member

Complete overhaul of the constraint system in Gridap.

FESpaceWithLinearConstraints

  • Changes needed to accomodate master dofs from outside the original FESpace, which is needed in distributed.
  • Refactored some FESpaceWithLinearConstraints functionality to implement the different TODOs that were scattered around the file.
  • Support for affine constraints
  • Support for merging/closing of constraints, with user-defined conflict resolution.

ConstraintHandler

New struct ConstraintHandler: This is a less-efficient but easier to manage way of declaring constraints in Gridap. It takes constraints one by one using a high-level API, allows for handling of constraints one by one and other nice features. Once constraints have been set, one can use this structure to declare spaces.

  • Basic functionality to add and manipulate linear and/or affine constraints, with user-defined conflict resolution.
  • Merging/closing of constraints, with user-defined conflict resolution.
  • Constructor for FESpacesWithLinearConstraints from ConstraintHandler.

New constructors for constraints:

  • Definition of constraints based on bilinear forms on triangulations and patches.

TODO:

  • Definition of constraints based on coordinate expressions.

@codecov

codecov Bot commented Nov 24, 2025

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 95.95506% with 36 lines in your changes missing coverage. Please review.
✅ Project coverage is 89.03%. Comparing base (6cfaaa2) to head (2778715).
⚠️ Report is 6 commits behind head on master.

Files with missing lines Patch % Lines
src/Arrays/Tables.jl 0.00% 15 Missing ⚠️
src/FESpaces/FESpacesWithLinearConstraints.jl 97.04% 15 Missing ⚠️
src/FESpaces/ConstraintHandlers.jl 98.29% 6 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1189      +/-   ##
==========================================
+ Coverage   88.86%   89.03%   +0.16%     
==========================================
  Files         228      229       +1     
  Lines       30192    30818     +626     
==========================================
+ Hits        26830    27438     +608     
- Misses       3362     3380      +18     
Flag Coverage Δ
drivers 38.57% <0.00%> (-0.81%) ⬇️
extensions 4.89% <0.00%> (-0.11%) ⬇️
unit-adaptivity 39.15% <0.00%> (-0.82%) ⬇️
unit-basics 14.09% <0.00%> (-0.30%) ⬇️
unit-celldata 20.40% <0.00%> (-0.43%) ⬇️
unit-fespaces-1 31.96% <0.00%> (-0.67%) ⬇️
unit-fespaces-2 40.63% <95.95%> (+1.31%) ⬆️
unit-fields 17.10% <0.00%> (-0.35%) ⬇️
unit-geometry 27.78% <0.00%> (-0.58%) ⬇️
unit-multifield 29.87% <29.95%> (-0.55%) ⬇️
unit-odes 27.73% <0.00%> (-0.62%) ⬇️
unit-referencefes 33.21% <0.00%> (-0.70%) ⬇️
unit-visualization 11.42% <0.00%> (-0.24%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 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 JordiManyer added the enhancement New feature or request label Apr 28, 2026
@JordiManyer JordiManyer self-assigned this Apr 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants