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