Skip to content
Snippets Groups Projects
Commit 73754e1b authored by Timo Koch's avatar Timo Koch
Browse files

[richards][switch] Exit before assertion if switch is runtime disabled

parent 02734fb9
No related branches found
No related tags found
Loading
...@@ -78,12 +78,12 @@ protected: ...@@ -78,12 +78,12 @@ protected:
IndexType dofIdxGlobal, IndexType dofIdxGlobal,
const GlobalPosition& globalPos) const GlobalPosition& globalPos)
{ {
static_assert(enableWaterDiffusionInAir, "The Richards primary variable switch only works with water diffusion in air enabled!");
static const bool usePriVarSwitch = GET_PARAM_FROM_GROUP(TypeTag, bool, Problem, UsePrimaryVariableSwitch); static const bool usePriVarSwitch = GET_PARAM_FROM_GROUP(TypeTag, bool, Problem, UsePrimaryVariableSwitch);
if (!usePriVarSwitch) if (!usePriVarSwitch)
return false; return false;
assert(enableWaterDiffusionInAir && "The Richards primary variable switch only works with water diffusion in air enabled!");
// evaluate primary variable switch // evaluate primary variable switch
bool wouldSwitch = false; bool wouldSwitch = false;
int phasePresence = priVars.state(); int phasePresence = priVars.state();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment