28#ifndef OPM_FLUID_STATE_PRESSURE_MODULES_HPP
29#define OPM_FLUID_STATE_PRESSURE_MODULES_HPP
42template <
class Scalar,
45class FluidStateExplicitPressureModule
48 FluidStateExplicitPressureModule()
54 const Scalar&
pressure(
unsigned phaseIdx)
const
55 {
return pressure_[phaseIdx]; }
62 { pressure_[phaseIdx] = value; }
68 template <
class Flu
idState>
71 for (
unsigned phaseIdx = 0; phaseIdx < numPhases; ++phaseIdx) {
72 pressure_[phaseIdx] = decay<Scalar>(fs.pressure(phaseIdx));
90 Scalar pressure_[numPhases];
97template <
class Scalar>
98class FluidStateNullPressureModule
101 FluidStateNullPressureModule()
108 {
throw std::logic_error(
"Pressure is not provided by this fluid state"); }
115 template <
class Flu
idState>
Some templates to wrap the valgrind client request macros.
OPM_HOST_DEVICE void SetUndefined(const T &value)
Make the memory on which an object resides undefined in valgrind runs.
Definition Valgrind.hpp:174
OPM_HOST_DEVICE bool CheckDefined(const T &value)
Make valgrind complain if any of the memory occupied by an object is undefined.
Definition Valgrind.hpp:76
const Scalar & pressure(unsigned phaseIdx) const
The pressure of a fluid phase [Pa].
Definition FluidStatePressureModules.hpp:54
void assign(const FluidState &fs)
Retrieve all parameters from an arbitrary fluid state.
Definition FluidStatePressureModules.hpp:69
void checkDefined() const
Make sure that all attributes are defined.
Definition FluidStatePressureModules.hpp:84
void setPressure(unsigned phaseIdx, const Scalar &value)
Set the pressure of a phase [Pa].
Definition FluidStatePressureModules.hpp:61
const Scalar & pressure(unsigned) const
The pressure of a fluid phase [Pa].
Definition FluidStatePressureModules.hpp:107
void assign(const FluidState &)
Retrieve all parameters from an arbitrary fluid state.
Definition FluidStatePressureModules.hpp:116
void checkDefined() const
Make sure that all attributes are defined.
Definition FluidStatePressureModules.hpp:127
This class implements a small container which holds the transmissibility mulitpliers for all the face...
Definition Exceptions.hpp:30