-
Notifications
You must be signed in to change notification settings - Fork 241
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
Material models do not check whether Enable elasticity
is true even if they don't support it
#4985
Comments
I would like to avoid having material models check for all possible new features we introduce in the main code (it may be a growing list). It is equally unsustainable to keep a list of all models that support elasticity in the main code (it removes the idea of plugins that are independent of the main code). I think the right approach is to ask: What does a material model need to do to be able to support elasticity? I think the answer is it needs to create a certain additional material model outputs object ( |
Sure, that sounds good. The I'm just wondering where to test if At the moment, rheology/elasticity.cc, viscoelastic.cc and latent_heat.cc check whether |
I think after calling |
Addressed by #5218 |
At the moment, when one sets
Enable elasticity
to true inFormulation
, while using a Material model that does not support elasticity, ASPECT will crash with an unhelpful error while solving the Stokes solver (see below), instead of throwing a clear error before even starting the timestep. Would it be better to have each Material model check whetherEnable elasticity
is true and then throw, or to check whether a Material model that supports elasticity is used whenEnable elasticity
is read in as true?The former avoids having to add new Material model names to the Assert when they support elasticity in the future.
Happy to make a PR with the preferred fix.
This came up in #4370.
The text was updated successfully, but these errors were encountered: