25 #ifndef GENERIC_MATERIAL_STATE_HPP 26 #define GENERIC_MATERIAL_STATE_HPP 36 template <
class Scalar>
45 Valgrind::SetUndefined(displacement_);
60 return displacement_[dirIdx];
71 Valgrind::CheckDefined(
value);
72 Valgrind::SetUndefined(displacement_[dirIdx]);
74 displacement_[dirIdx] =
value;
82 template <
class MaterialState>
86 for (
unsigned dirIdx = 0; dirIdx < 3; ++dirIdx) {
87 displacement_[dirIdx] = Opm::decay<Scalar>(ms.displacement(dirIdx));
96 Valgrind::CheckDefined(displacement_);
100 std::array<Scalar, 3> displacement_{};
This class implements a small container which holds the transmissibility mulitpliers for all the face...
Definition: Exceptions.hpp:30
void checkDefined() const
Instruct Valgrind to check the definedness of all attributes of this class.
Definition: GenericMaterialState.hpp:94
void assign(const MaterialState &ms)
Assign from another material state container.
Definition: GenericMaterialState.hpp:83
virtual ~GenericMaterialState()=default
Destructor.
const Scalar displacement(unsigned dirIdx) const
Return direction (x-, y- or z-) component of displacement.
Definition: GenericMaterialState.hpp:58
Some templates to wrap the valgrind client request macros.
GenericMaterialState()
Constructor.
Definition: GenericMaterialState.hpp:43
Definition: GenericMaterialState.hpp:37
void setDisplacement(unsigned dirIdx, const Scalar value)
Set a direction (x-, y- or z-) component of displacement.
Definition: GenericMaterialState.hpp:69