From 21229db81cac95942f59d38a1ea801fd4b4330aa Mon Sep 17 00:00:00 2001 From: Sina Ackermann Date: Fri, 10 Nov 2017 13:41:12 +0100 Subject: [PATCH] [staggered] Use variable 'phaseIdx' in volumevariables instead of default value '0' --- dumux/freeflow/staggered/volumevariables.hh | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/dumux/freeflow/staggered/volumevariables.hh b/dumux/freeflow/staggered/volumevariables.hh index e2520c0b44..23a9418008 100644 --- a/dumux/freeflow/staggered/volumevariables.hh +++ b/dumux/freeflow/staggered/volumevariables.hh @@ -104,23 +104,23 @@ public: { Scalar t = problem.temperatureAtPos(scv.dofPosition()); fluidState.setTemperature(t); - fluidState.setSaturation(/*phaseIdx=*/0, 1.); + fluidState.setSaturation(phaseIdx, 1.); - fluidState.setPressure(/*phaseIdx=*/0, elemSol[0][Indices::pressureIdx]); + fluidState.setPressure(phaseIdx, elemSol[0][Indices::pressureIdx]); // saturation in a single phase is always 1 and thus redundant // to set. But since we use the fluid state shared by the // immiscible multi-phase models, so we have to set it here... - fluidState.setSaturation(/*phaseIdx=*/0, 1.0); + fluidState.setSaturation(phaseIdx, 1.0); typename FluidSystem::ParameterCache paramCache; - paramCache.updatePhase(fluidState, /*phaseIdx=*/0); + paramCache.updatePhase(fluidState, phaseIdx); - Scalar value = FluidSystem::density(fluidState, paramCache, /*phaseIdx=*/0); - fluidState.setDensity(/*phaseIdx=*/0, value); + Scalar value = FluidSystem::density(fluidState, paramCache, phaseIdx); + fluidState.setDensity(phaseIdx, value); - value = FluidSystem::viscosity(fluidState, paramCache, /*phaseIdx=*/0); - fluidState.setViscosity(/*phaseIdx=*/0, value); + value = FluidSystem::viscosity(fluidState, paramCache, phaseIdx); + fluidState.setViscosity(phaseIdx, value); } /*! -- GitLab