Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Save conformity info for ConformingFESpaces #1042

Merged
merged 5 commits into from
Nov 8, 2024
Merged

Conversation

JordiManyer
Copy link
Member

@JordiManyer JordiManyer commented Oct 28, 2024

The UnconstrainedFESpace type has a field metadata which is mostly being unused. In the case of CLagrangianFESpaces we use it to store the NodeToDofGlue, a structure that implicitly gives conformity information for the underlying FESpace. For other types of conforming FESpaces, however, the conformity information (stored in the CellConformity structure) is thrown away.

It is then impossible to retrieve conformity info from an FESpace, which is sometimes needed when we want to somehow manipulate the dofs of such space (restricting them, classifying them, adding BCs, etc...). In GridapSolvers, we have been dealing with this problem by specifically keeping track of thins kind of info within other objects, but its quite inconvenient.

The CellConformity structure is quite inexpensive in terms of memory, since the number of different ReferenceFEs is quite limited. This is still true for PhysicalFEs, where cost is in the basis arrays. It also does not introduce any type instanbility that I can think of, even in the case of multiple ReferenceFEs being used (since the reffes themselves are not stored). In that regard, I would argue the above NodeToDofGlue is quite worse.

I also looked through (hopefully most of) the codebase, and I cannot see anyone ever using this metadata field for anything else.

Therefore I've modified the conforming FESpace constructors to save the CellConformity info within their metadata. For now, I have not added any API to retrieve such info. I don't think it's necessary for the moment, since nothing within Gridap requires it.

Copy link

codecov bot commented Oct 28, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 88.87%. Comparing base (06de5f7) to head (273e52d).
Report is 6 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1042      +/-   ##
==========================================
- Coverage   88.88%   88.87%   -0.02%     
==========================================
  Files         195      195              
  Lines       23570    23572       +2     
==========================================
- Hits        20951    20949       -2     
- Misses       2619     2623       +4     

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

@JordiManyer JordiManyer merged commit 21c4751 into master Nov 8, 2024
19 of 20 checks passed
@JordiManyer JordiManyer deleted the conforming-fespaces branch November 8, 2024 08:07
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.

1 participant