SimpleModularFluidState.hpp
Go to the documentation of this file.
1// -*- mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
2// vi: set et ts=4 sw=4 sts=4:
3/*
4 This file is part of the Open Porous Media project (OPM).
5
6 OPM is free software: you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation, either version 2 of the License, or
9 (at your option) any later version.
10
11 OPM is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
15
16 You should have received a copy of the GNU General Public License
17 along with OPM. If not, see <http://www.gnu.org/licenses/>.
18
19 Consult the COPYING file in the top-level source directory of this
20 module for the precise wording of the license and the list of
21 copyright holders.
22*/
27#ifndef OPM_SIMPLE_MODULAR_FLUID_STATE_HPP
28#define OPM_SIMPLE_MODULAR_FLUID_STATE_HPP
29
38#include "ModularFluidState.hpp"
39
40#include <type_traits>
41
42namespace Opm {
43// this macro is a small hack to prevent death-through verbosity
44#define OPM_SMFS SimpleModularFluidState<ScalarT, \
45 numPhasesV, \
46 numComponentsV, \
47 FluidSystem, \
48 storePressure, \
49 storeTemperature, \
50 storeComposition, \
51 storeFugacity, \
52 storeSaturation, \
53 storeDensity, \
54 storeViscosity, \
55 storeEnthalpy>
56
65template <class ScalarT,
66 unsigned numPhasesV,
67 unsigned numComponentsV,
68 class FluidSystem, // only needed if the compositional stuff enabled
69 bool storePressure,
70 bool storeTemperature,
71 bool storeComposition,
72 bool storeFugacity,
73 bool storeSaturation,
74 bool storeDensity,
75 bool storeViscosity,
76 bool storeEnthalpy>
78 : public ModularFluidState<ScalarT, numPhasesV, numComponentsV,
79 typename std::conditional<storePressure,
80 FluidStateExplicitPressureModule<ScalarT, numPhasesV, OPM_SMFS>,
81 FluidStateNullPressureModule<ScalarT> >::type,
82 typename std::conditional<storeTemperature,
83 FluidStateExplicitTemperatureModule<ScalarT, numPhasesV, OPM_SMFS>,
84 FluidStateNullTemperatureModule<ScalarT> >::type,
85 typename std::conditional<storeComposition,
86 FluidStateExplicitCompositionModule<ScalarT, FluidSystem, OPM_SMFS>,
87 FluidStateNullCompositionModule<ScalarT> >::type,
88 typename std::conditional<storeFugacity,
89 FluidStateExplicitFugacityModule<ScalarT, numPhasesV, numComponentsV, OPM_SMFS>,
90 FluidStateNullFugacityModule<ScalarT> >::type,
91 typename std::conditional<storeSaturation,
92 FluidStateExplicitSaturationModule<ScalarT, numPhasesV, OPM_SMFS>,
93 FluidStateNullSaturationModule<ScalarT> >::type,
94 typename std::conditional<storeDensity,
95 FluidStateExplicitDensityModule<ScalarT, numPhasesV, OPM_SMFS>,
96 FluidStateNullDensityModule<ScalarT, numPhasesV, OPM_SMFS> >::type,
97 typename std::conditional<storeViscosity,
98 FluidStateExplicitViscosityModule<ScalarT, numPhasesV, OPM_SMFS>,
99 FluidStateNullViscosityModule<ScalarT, numPhasesV, OPM_SMFS> >::type,
100 typename std::conditional<storeEnthalpy,
101 FluidStateExplicitEnthalpyModule<ScalarT, numPhasesV, OPM_SMFS>,
102 FluidStateNullEnthalpyModule<ScalarT, numPhasesV, OPM_SMFS> >::type
103 >
104{};
105
106// we don't need the death-prevention macro anymore
107#undef OPM_SMFS
108
109} // namespace Opm
110
111#endif
Modules for the ModularFluidState which represent composition.
Modules for the ModularFluidState which represent density.
Modules for the ModularFluidState which represent enthalpy.
Modules for the ModularFluidState which represent fugacity/chemical potential.
Modules for the ModularFluidState which represent pressure.
Modules for the ModularFluidState which represent saturation.
Modules for the ModularFluidState which represent temperature.
Modules for the ModularFluidState which represent viscosity.
Represents all relevant thermodynamic quantities of a multi-phase, multi-component fluid system assum...
Definition: ModularFluidState.hpp:72
Represents all relevant thermodynamic quantities of a multi-phase, multi-component fluid system assum...
Definition: SimpleModularFluidState.hpp:104
Definition: Air_Mesitylene.hpp:34