25 #ifndef ELASTICITY_PRIMARY_VARIABLES_HPP 26 #define ELASTICITY_PRIMARY_VARIABLES_HPP 28 #include <dune/common/fvector.hh> 30 #include <opm/material/common/MathToolbox.hpp> 31 #include <opm/material/common/Valgrind.hpp> 34 #include <opm/models/tpsa/tpsabaseproperties.hpp> 37 #include <type_traits> 50 template <
class TypeTag>
52 :
public Dune::FieldVector<GetPropType<TypeTag, Properties::Scalar>,
53 getPropValue<TypeTag, Properties::NumEqTPSA>()>
59 using Toolbox = Opm::MathToolbox<Evaluation>;
61 enum { disp0Idx = Indices::disp0Idx };
62 enum { rot0Idx = Indices::rot0Idx };
63 enum { solidPres0Idx = Indices::solidPres0Idx };
65 enum { numEq = getPropValue<TypeTag, Properties::NumEqTPSA>() };
67 using ParentType = Dune::FieldVector<Scalar, numEq>;
75 Valgrind::SetUndefined(*
this);
88 using ParentType::operator=;
107 if constexpr (std::is_same_v<Evaluation, Scalar>) {
108 return (*
this)[varIdx];
112 if (timeIdx == linearizationType.time) {
113 return Toolbox::createVariable((*
this)[varIdx], varIdx);
116 return Toolbox::createConstant((*
this)[varIdx]);
126 template <
class MaterialState>
133 for (
unsigned dirIdx = 0; dirIdx < 3; ++dirIdx) {
134 (*this)[disp0Idx + dirIdx] = Opm::getValue(materialState.displacement(dirIdx));
135 (*this)[rot0Idx + dirIdx] = Opm::getValue(materialState.rotation(dirIdx));
139 (*this)[solidPres0Idx] = Opm::getValue(materialState.solidPressure());
147 Valgrind::CheckDefined(*static_cast<const ParentType*>(
this));
void assignNaive(const MaterialState &materialState)
Assign primary variables from a material state container.
Definition: elasticityprimaryvariables.hpp:127
typename Properties::Detail::GetPropImpl< TypeTag, Property >::type::type GetPropType
get the type alias defined in the property (equivalent to old macro GET_PROP_TYPE(...))
Definition: propertysystem.hh:233
Primary variables in (linear) elasticity equations.
Definition: elasticityprimaryvariables.hpp:51
void checkDefined() const
Instruct Valgrind to check the definedness of all attributes of this class.
Definition: elasticityprimaryvariables.hpp:145
This file contains a set of helper functions used by VFPProd / VFPInj.
Definition: blackoilbioeffectsmodules.hh:45
Definition: linearizationtype.hh:33
The common code for the linearizers of non-linear systems of equations.
ElasticityPrimaryVariables()
Constructor.
Definition: elasticityprimaryvariables.hpp:73
Evaluation makeEvaluation(unsigned varIdx, unsigned timeIdx, Opm::LinearizationType linearizationType=LinearizationType()) const
< Import base class assignment operators.
Definition: elasticityprimaryvariables.hpp:102
ElasticityPrimaryVariables & operator=(const ElasticityPrimaryVariables &value)=default
Default assignment constructor.
Defines a type tags and some fundamental properties all models.