From b833625aa8ab1a3bb34234ec88b445757e57cf77 Mon Sep 17 00:00:00 2001 From: Kilian Weishaupt <kilian.weishaupt@iws.uni-stuttgart.de> Date: Wed, 26 Aug 2020 17:56:11 +0200 Subject: [PATCH] [porousmediumFlow] Export indices in all volVars --- dumux/porousmediumflow/1p/volumevariables.hh | 3 ++- dumux/porousmediumflow/2p/volumevariables.hh | 8 +++++--- dumux/porousmediumflow/2p2c/volumevariables.hh | 2 ++ dumux/porousmediumflow/2pnc/volumevariables.hh | 2 ++ dumux/porousmediumflow/3p/volumevariables.hh | 10 ++++++---- dumux/porousmediumflow/co2/volumevariables.hh | 2 ++ .../porousmediumflow/nonequilibrium/volumevariables.hh | 8 +++++--- .../porousmediumflow/nonisothermal/volumevariables.hh | 6 +++++- dumux/porousmediumflow/tracer/volumevariables.hh | 5 ++++- 9 files changed, 33 insertions(+), 13 deletions(-) diff --git a/dumux/porousmediumflow/1p/volumevariables.hh b/dumux/porousmediumflow/1p/volumevariables.hh index be45c8802e..88da7efd0f 100644 --- a/dumux/porousmediumflow/1p/volumevariables.hh +++ b/dumux/porousmediumflow/1p/volumevariables.hh @@ -49,7 +49,6 @@ class OnePVolumeVariables using EnergyVolVars = EnergyVolumeVariables<Traits, OnePVolumeVariables<Traits> >; using Scalar = typename Traits::PrimaryVariables::value_type; - using Indices = typename Traits::ModelTraits::Indices; using PermeabilityType = typename Traits::PermeabilityType; static constexpr int numFluidComps = ParentType::numFluidComponents(); public: @@ -57,6 +56,8 @@ public: using FluidSystem = typename Traits::FluidSystem; //! Export the fluid state type using FluidState = typename Traits::FluidState; + //! Export the indices + using Indices = typename Traits::ModelTraits::Indices; //! Export type of solid state using SolidState = typename Traits::SolidState; //! Export type of solid system diff --git a/dumux/porousmediumflow/2p/volumevariables.hh b/dumux/porousmediumflow/2p/volumevariables.hh index 1812fcf814..e65fdfc30b 100644 --- a/dumux/porousmediumflow/2p/volumevariables.hh +++ b/dumux/porousmediumflow/2p/volumevariables.hh @@ -47,14 +47,14 @@ class TwoPVolumeVariables using EnergyVolVars = EnergyVolumeVariables<Traits, TwoPVolumeVariables<Traits> >; using PermeabilityType = typename Traits::PermeabilityType; using ModelTraits = typename Traits::ModelTraits; - using Indices = typename ModelTraits::Indices; + using Idx = typename ModelTraits::Indices; using Scalar = typename Traits::PrimaryVariables::value_type; using FS = typename Traits::FluidSystem; static constexpr int numFluidComps = ParentType::numFluidComponents(); enum { - pressureIdx = Indices::pressureIdx, - saturationIdx = Indices::saturationIdx, + pressureIdx = Idx::pressureIdx, + saturationIdx = Idx::saturationIdx, phase0Idx = FS::phase0Idx, phase1Idx = FS::phase1Idx @@ -67,6 +67,8 @@ public: using FluidSystem = typename Traits::FluidSystem; //! Export type of fluid state using FluidState = typename Traits::FluidState; + //! Export the indices + using Indices = typename ModelTraits::Indices; //! Export type of solid state using SolidState = typename Traits::SolidState; //! Export type of solid system diff --git a/dumux/porousmediumflow/2p2c/volumevariables.hh b/dumux/porousmediumflow/2p2c/volumevariables.hh index e1d2f4a301..a4c440e698 100644 --- a/dumux/porousmediumflow/2p2c/volumevariables.hh +++ b/dumux/porousmediumflow/2p2c/volumevariables.hh @@ -107,6 +107,8 @@ public: using FluidState = typename Traits::FluidState; //! The fluid system used here using FluidSystem = typename Traits::FluidSystem; + //! Export the indices + using Indices = typename ModelTraits::Indices; //! Export type of solid state using SolidState = typename Traits::SolidState; //! Export type of solid system diff --git a/dumux/porousmediumflow/2pnc/volumevariables.hh b/dumux/porousmediumflow/2pnc/volumevariables.hh index adca768233..7886ee8391 100644 --- a/dumux/porousmediumflow/2pnc/volumevariables.hh +++ b/dumux/porousmediumflow/2pnc/volumevariables.hh @@ -98,6 +98,8 @@ public: using FluidState = typename Traits::FluidState; //! Export fluid system type using FluidSystem = typename Traits::FluidSystem; + //! Export the indices + using Indices = typename ModelTraits::Indices; //! Export type of solid state using SolidState = typename Traits::SolidState; //! Export type of solid system diff --git a/dumux/porousmediumflow/3p/volumevariables.hh b/dumux/porousmediumflow/3p/volumevariables.hh index b6d06205e2..2f70cf36a6 100644 --- a/dumux/porousmediumflow/3p/volumevariables.hh +++ b/dumux/porousmediumflow/3p/volumevariables.hh @@ -47,7 +47,7 @@ class ThreePVolumeVariables using Scalar = typename Traits::PrimaryVariables::value_type; using PermeabilityType = typename Traits::PermeabilityType; - using Indices = typename Traits::ModelTraits::Indices; + using Idx = typename Traits::ModelTraits::Indices; using FS = typename Traits::FluidSystem; static constexpr int numFluidComps = ParentType::numFluidComponents(); @@ -56,9 +56,9 @@ class ThreePVolumeVariables gPhaseIdx = FS::gPhaseIdx, nPhaseIdx = FS::nPhaseIdx, - swIdx = Indices::swIdx, - snIdx = Indices::snIdx, - pressureIdx = Indices::pressureIdx + swIdx = Idx::swIdx, + snIdx = Idx::snIdx, + pressureIdx = Idx::pressureIdx }; public: @@ -66,6 +66,8 @@ public: using FluidState = typename Traits::FluidState; //! Export fluid system type using FluidSystem = typename Traits::FluidSystem; + //! Export the indices + using Indices = Idx; //! Export type of solid state using SolidState = typename Traits::SolidState; //! Export type of solid system diff --git a/dumux/porousmediumflow/co2/volumevariables.hh b/dumux/porousmediumflow/co2/volumevariables.hh index 5102cc0abc..17cfd5725e 100644 --- a/dumux/porousmediumflow/co2/volumevariables.hh +++ b/dumux/porousmediumflow/co2/volumevariables.hh @@ -95,6 +95,8 @@ public: using FluidState = typename Traits::FluidState; //! The fluid system used here using FluidSystem = typename Traits::FluidSystem; + //! Export the indices + using Indices = typename ModelTraits::Indices; //! Export type of solid state using SolidState = typename Traits::SolidState; //! Export type of solid system diff --git a/dumux/porousmediumflow/nonequilibrium/volumevariables.hh b/dumux/porousmediumflow/nonequilibrium/volumevariables.hh index c208183f1e..116a5617fa 100644 --- a/dumux/porousmediumflow/nonequilibrium/volumevariables.hh +++ b/dumux/porousmediumflow/nonequilibrium/volumevariables.hh @@ -278,7 +278,6 @@ class NonEquilibriumVolumeVariablesImplementation<Traits, using Scalar = typename Traits::PrimaryVariables::value_type; using ModelTraits = typename Traits::ModelTraits; - using Indices = typename ModelTraits::Indices; using FS = typename Traits::FluidSystem; static constexpr auto numEnergyEqFluid = ModelTraits::numEnergyEqFluid(); static constexpr auto numEnergyEqSolid = ModelTraits::numEnergyEqSolid(); @@ -288,7 +287,9 @@ class NonEquilibriumVolumeVariablesImplementation<Traits, using NumFluidPhasesArray = std::array<Scalar, ModelTraits::numFluidPhases()>; public: - using FluidState = typename Traits::FluidState; + using Indices = typename ModelTraits::Indices; + using FluidState = typename Traits::FluidState; + /*! * \brief Update all quantities for a given control volume * @@ -603,7 +604,6 @@ class NonEquilibriumVolumeVariablesImplementation<Traits, using Scalar = typename Traits::PrimaryVariables::value_type; using ModelTraits = typename Traits::ModelTraits; - using Indices = typename ModelTraits::Indices; static constexpr auto numEnergyEqFluid = ModelTraits::numEnergyEqFluid(); static constexpr auto numEnergyEqSolid = ModelTraits::numEnergyEqSolid(); @@ -621,6 +621,8 @@ class NonEquilibriumVolumeVariablesImplementation<Traits, ModelTraits::numFluidPhases()+numEnergyEqSolid>; public: + using Indices = typename ModelTraits::Indices; + /*! * \brief Update all quantities for a given control volume * diff --git a/dumux/porousmediumflow/nonisothermal/volumevariables.hh b/dumux/porousmediumflow/nonisothermal/volumevariables.hh index 0cb34711ca..a8594028e4 100644 --- a/dumux/porousmediumflow/nonisothermal/volumevariables.hh +++ b/dumux/porousmediumflow/nonisothermal/volumevariables.hh @@ -158,9 +158,13 @@ class EnergyVolumeVariablesImplementation<Traits, Impl, true> public: // export the fluidstate using FluidState = typename Traits::FluidState; - using SolidState = typename Traits::SolidState; //! export the underlying fluid system using FluidSystem = typename Traits::FluidSystem; + //! Export the indices + using Indices = Idx; + // export the solidstate + using SolidState = typename Traits::SolidState; + //! export the underlying solid system using SolidSystem = typename Traits::SolidSystem; //! The temperature is obtained from the problem as a constant for isothermal models diff --git a/dumux/porousmediumflow/tracer/volumevariables.hh b/dumux/porousmediumflow/tracer/volumevariables.hh index 1dc93f5c3c..d70333917b 100644 --- a/dumux/porousmediumflow/tracer/volumevariables.hh +++ b/dumux/porousmediumflow/tracer/volumevariables.hh @@ -63,9 +63,12 @@ class TracerVolumeVariables static constexpr int numFluidComps = ParentType::numFluidComponents(); public: - //! Export fluid system type + //! Export the fluid system type using FluidSystem = typename Traits::FluidSystem; + //! Export the solid state type using SolidState = typename Traits::SolidState; + //! Export the indices + using Indices = typename Traits::ModelTraits::Indices; /*! * \brief Updates all quantities for a given control volume. -- GitLab