Skip SCALAR variables during AMR projection#4503
Open
BozoVazic wants to merge 1 commit into
Open
Conversation
Global SCALAR variables should be copied directly rather than passed through the spatial GenericProjector. Add a regression covering fine-to-coarse projection with MONOMIAL and SCALAR variables.
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.
Skip SCALAR variables during AMR projection
Summary
Exclude global
SCALARvariables from spatial AMR projection and copy their degrees of freedom directly between the old and new solution vectors.Problem
System::project_vector()classified variables usingFEInterface::field_type(). Both spatial scalar-valued variables and globalSCALARvariables haveTYPE_SCALAR, so globalSCALARvariables were incorrectly passed toGenericProjector.During fine-to-coarse projection with element-interior degrees of freedom, this caused
GenericProjector::ProjectInteriorsto callFE<2, SCALAR>::reinit(), which failed because globalSCALARvariables do not have a spatial finite-element representation.Change
Separate variables with the
SCALARFE family before classifying the remaining spatial variables.The global
SCALARvariables are then handled only by the existing direct degree-of-freedom mapping logic.Testing
Added a CppUnit regression that:
CONSTANT MONOMIALspatial variable with a globalSCALARvariable;EquationSystems::reinit();The test fails without this change in
FE<2, SCALAR>::reinit()and passes with the fix.Also ran the complete
SystemsTestandEquationSystemsTestselection: 47 tests passed.Related report
Addresses idaholab/moose#33366 also discussed in idaholab/moose#33008
Future possible work
Other projection paths contain similar interactions between spatial projection and explicit handling of global SCALAR variables. While working on this I also came accros issue but did not reproduce the same failure there - this is becuase I'm not sure how to reproduce them as for this PR I actually had a MOOSE input file. Thus, this PR is only to System::project_vector() issue. Other projection paths may warrant separate follow-up review e.g., project_matrix.