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