28 #ifndef OPM_FLUID_STATE_VISCOSITY_MODULES_HPP 29 #define OPM_FLUID_STATE_VISCOSITY_MODULES_HPP 41 template <
class ValueType,
48 { Valgrind::SetUndefined(viscosity_); }
54 {
return viscosity_[phaseIdx]; }
60 { viscosity_[phaseIdx] =
value; }
66 template <
class Flu
idState>
69 for (
unsigned phaseIdx = 0; phaseIdx < numPhases; ++phaseIdx) {
70 viscosity_[phaseIdx] = decay<ValueType>(fs.viscosity(phaseIdx));
84 Valgrind::CheckDefined(viscosity_);
88 std::array<ValueType, numPhases> viscosity_{};
95 template <
class ValueT,
108 {
throw std::logic_error(
"Viscosity is not provided by this fluid state"); }
114 template <
class Flu
idState>
Module for the modular fluid state which does not the viscosities but throws std::logic_error instead...
Definition: FluidStateViscosityModules.hpp:98
const ValueT & viscosity(unsigned) const
The viscosity of a fluid phase [-].
Definition: FluidStateViscosityModules.hpp:107
const ValueType & viscosity(unsigned phaseIdx) const
The viscosity of a fluid phase [-].
Definition: FluidStateViscosityModules.hpp:53
void assign(const FluidState &fs)
Retrieve all parameters from an arbitrary fluid state.
Definition: FluidStateViscosityModules.hpp:67
This class implements a small container which holds the transmissibility mulitpliers for all the face...
Definition: Exceptions.hpp:30
void checkDefined() const
Make sure that all attributes are defined.
Definition: FluidStateViscosityModules.hpp:126
Some templates to wrap the valgrind client request macros.
void assign(const FluidState &)
Retrieve all parameters from an arbitrary fluid state.
Definition: FluidStateViscosityModules.hpp:115
Module for the modular fluid state which stores the viscosities explicitly.
Definition: FluidStateViscosityModules.hpp:44
void setViscosity(unsigned phaseIdx, ValueType value)
Set the dynamic viscosity of a phase [Pa s].
Definition: FluidStateViscosityModules.hpp:59
void checkDefined() const
Make sure that all attributes are defined.
Definition: FluidStateViscosityModules.hpp:82