Skip to content

Refactor of FESpaceWithLinearConstraints#1189

Draft
JordiManyer wants to merge 21 commits intomasterfrom
constraints
Draft

Refactor of FESpaceWithLinearConstraints#1189
JordiManyer wants to merge 21 commits intomasterfrom
constraints

Conversation

@JordiManyer
Copy link
Copy Markdown
Member

@JordiManyer JordiManyer commented Nov 24, 2025

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.

TODOs:

  • Definition of constraints based on bilinear forms.
  • Definition of constraints based on coordinate expressions.

@codecov
Copy link
Copy Markdown

codecov Bot commented Nov 24, 2025

Codecov Report

❌ Patch coverage is 95.72414% with 31 lines in your changes missing coverage. Please review.
✅ Project coverage is 88.97%. Comparing base (abe7c5a) to head (45f31c5).

Files with missing lines Patch % Lines
src/FESpaces/FESpacesWithLinearConstraints.jl 96.55% 17 Missing ⚠️
src/FESpaces/ConstraintHandlers.jl 93.93% 14 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1189      +/-   ##
==========================================
+ Coverage   88.84%   88.97%   +0.13%     
==========================================
  Files         227      228       +1     
  Lines       29799    30253     +454     
==========================================
+ Hits        26475    26919     +444     
- Misses       3324     3334      +10     
Flag Coverage Δ
drivers 39.31% <0.00%> (-0.60%) ⬇️
extensions 4.99% <0.00%> (-0.08%) ⬇️
unit-adaptivity 39.45% <0.00%> (-0.61%) ⬇️
unit-basics 14.49% <0.00%> (-0.23%) ⬇️
unit-celldata 20.80% <0.00%> (-0.32%) ⬇️
unit-fespaces-1 31.86% <0.00%> (-0.49%) ⬇️
unit-fespaces-2 39.82% <95.72%> (+0.98%) ⬆️
unit-fields 17.46% <0.00%> (-0.27%) ⬇️
unit-geometry 28.32% <0.00%> (-0.44%) ⬇️
unit-multifield 30.45% <36.92%> (-0.39%) ⬇️
unit-odes 28.28% <0.00%> (-0.44%) ⬇️
unit-referencefes 33.84% <0.00%> (-0.52%) ⬇️
unit-visualization 11.67% <0.00%> (-0.18%) ⬇️

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

☔ 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 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