Save conformity info for ConformingFESpaces#1042
Merged
Merged
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The
UnconstrainedFESpacetype has a fieldmetadatawhich is mostly being unused. In the case ofCLagrangianFESpaceswe use it to store theNodeToDofGlue, a structure that implicitly gives conformity information for the underlying FESpace. For other types of conforming FESpaces, however, the conformity information (stored in theCellConformitystructure) 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
CellConformitystructure is quite inexpensive in terms of memory, since the number of differentReferenceFEsis 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 multipleReferenceFEsbeing used (since the reffes themselves are not stored). In that regard, I would argue the aboveNodeToDofGlueis 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
CellConformityinfo within theirmetadata. 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.