Commit 3258d734 authored by Timo Koch's avatar Timo Koch
Browse files

[richards][localresidual] Use constexpr if

parent 278216ee
......@@ -111,7 +111,7 @@ public:
* volVars.saturation(liquidPhaseIdx);
// for extended Richards we consider water in air
if (enableWaterDiffusionInAir)
if constexpr (enableWaterDiffusionInAir)
storage[conti0EqIdx] += volVars.porosity()
* volVars.molarDensity(gasPhaseIdx)
* volVars.moleFraction(gasPhaseIdx, liquidCompIdx)
......@@ -155,7 +155,7 @@ public:
flux[conti0EqIdx] = fluxVars.advectiveFlux(liquidPhaseIdx, upwindTerm);
// for extended Richards we consider water vapor diffusion in air
if (enableWaterDiffusionInAir)
if constexpr (enableWaterDiffusionInAir)
{
//check for the reference system and adapt units of the diffusive flux accordingly.
if (FluxVariables::MolecularDiffusionType::referenceSystemFormulation() == ReferenceSystemFormulation::massAveraged)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment