From 242743c3fa0d6fc1345fa3bbfd0b6d6321f0e473 Mon Sep 17 00:00:00 2001 From: Timo Koch <timo.koch@iws.uni-stuttgart.de> Date: Wed, 11 Apr 2018 19:10:42 +0200 Subject: [PATCH] [2p1c] Rename pri var index switch1Idx to switchIdx --- dumux/porousmediumflow/2p1c/indices.hh | 2 +- dumux/porousmediumflow/2p1c/primaryvariableswitch.hh | 2 +- dumux/porousmediumflow/2p1c/volumevariables.hh | 6 +++--- .../porousmediumflow/2p1c/implicit/steaminjectionproblem.hh | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/dumux/porousmediumflow/2p1c/indices.hh b/dumux/porousmediumflow/2p1c/indices.hh index 280163f3e5..3f0d6ed029 100644 --- a/dumux/porousmediumflow/2p1c/indices.hh +++ b/dumux/porousmediumflow/2p1c/indices.hh @@ -41,7 +41,7 @@ public: // Primary variable indices static const int pressureIdx = 0; //!< Index for phase pressure in a solution vector. - static const int switch1Idx = 1; //!< Index of saturation or temperature. + static const int switchIdx = 1; //!< Index of saturation or temperature. // Equation indices static const int conti0EqIdx = 0; //!< Index of the mass conservation equation for the water component. diff --git a/dumux/porousmediumflow/2p1c/primaryvariableswitch.hh b/dumux/porousmediumflow/2p1c/primaryvariableswitch.hh index 6c733a1db0..3b37e48a93 100644 --- a/dumux/porousmediumflow/2p1c/primaryvariableswitch.hh +++ b/dumux/porousmediumflow/2p1c/primaryvariableswitch.hh @@ -51,7 +51,7 @@ class TwoPOneCPrimaryVariableSwitch using FluidSystem = typename GET_PROP_TYPE(TypeTag, FluidSystem); enum { - switchIdx = Indices::switch1Idx, + switchIdx = Indices::switchIdx, pressureIdx = Indices::pressureIdx, diff --git a/dumux/porousmediumflow/2p1c/volumevariables.hh b/dumux/porousmediumflow/2p1c/volumevariables.hh index 17166e3a6b..de6659db9c 100644 --- a/dumux/porousmediumflow/2p1c/volumevariables.hh +++ b/dumux/porousmediumflow/2p1c/volumevariables.hh @@ -48,7 +48,7 @@ class TwoPOneCVolumeVariables wPhaseIdx = FS::wPhaseIdx, nPhaseIdx = FS::nPhaseIdx, - switch1Idx = Indices::switch1Idx, + switchIdx = Indices::switchIdx, pressureIdx = Indices::pressureIdx }; @@ -133,7 +133,7 @@ public: Scalar sg(0.0); if (phasePresence == twoPhases) { - sw = priVars[switch1Idx]; + sw = priVars[switchIdx]; sg = 1.0 - sw; } else if (phasePresence == wPhaseOnly) @@ -169,7 +169,7 @@ public: // get temperature Scalar temperature; if (phasePresence == wPhaseOnly || phasePresence == nPhaseOnly) - temperature = priVars[switch1Idx]; + temperature = priVars[switchIdx]; else if (phasePresence == twoPhases) temperature = FluidSystem::vaporTemperature(fluidState, wPhaseIdx); else diff --git a/test/porousmediumflow/2p1c/implicit/steaminjectionproblem.hh b/test/porousmediumflow/2p1c/implicit/steaminjectionproblem.hh index d39c2e8b22..af3f92bbfb 100644 --- a/test/porousmediumflow/2p1c/implicit/steaminjectionproblem.hh +++ b/test/porousmediumflow/2p1c/implicit/steaminjectionproblem.hh @@ -98,7 +98,7 @@ class InjectionProblem : public PorousMediumFlowProblem<TypeTag> // copy some indices for convenience enum { pressureIdx = Indices::pressureIdx, - switch1Idx = Indices::switch1Idx, + switchIdx = Indices::switchIdx, conti0EqIdx = Indices::conti0EqIdx, energyEqIdx = Indices::energyEqIdx, @@ -229,7 +229,7 @@ public: const Scalar densityW = 1000.0; values[pressureIdx] = 101300.0 + (this->fvGridGeometry().bBoxMax()[1] - globalPos[1])*densityW*9.81; // hydrostatic pressure - values[switch1Idx] = 283.13; + values[switchIdx] = 283.13; values.setState(wPhaseOnly); -- GitLab