25#ifndef GENERIC_MATERIAL_STATE_HPP
26#define GENERIC_MATERIAL_STATE_HPP
36template <
class Scalar>
60 return 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));
100 std::array<Scalar, 3> displacement_{};
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
virtual ~GenericMaterialState()=default
Destructor.
void setDisplacement(unsigned dirIdx, const Scalar value)
Set a direction (x-, y- or z-) component of displacement.
Definition GenericMaterialState.hpp:69
GenericMaterialState()
Constructor.
Definition GenericMaterialState.hpp:43
const Scalar displacement(unsigned dirIdx) const
Return direction (x-, y- or z-) component of displacement.
Definition GenericMaterialState.hpp:58
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
This class implements a small container which holds the transmissibility mulitpliers for all the face...
Definition Exceptions.hpp:30