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>
50template <
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 };
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));
Defines a type tags and some fundamental properties all models.
ElasticityPrimaryVariables(const ElasticityPrimaryVariables &value)=default
Default copy constructor.
Evaluation makeEvaluation(unsigned varIdx, unsigned timeIdx, Opm::LinearizationType linearizationType=LinearizationType()) const
< Import base class assignment operators.
Definition elasticityprimaryvariables.hpp:102
void assignNaive(const MaterialState &materialState)
Assign primary variables from a material state container.
Definition elasticityprimaryvariables.hpp:127
ElasticityPrimaryVariables()
Constructor.
Definition elasticityprimaryvariables.hpp:73
void checkDefined() const
Instruct Valgrind to check the definedness of all attributes of this class.
Definition elasticityprimaryvariables.hpp:145
ElasticityPrimaryVariables & operator=(const ElasticityPrimaryVariables &value)=default
Default assignment constructor.
The common code for the linearizers of non-linear systems of equations.
This file contains a set of helper functions used by VFPProd / VFPInj.
Definition blackoilbioeffectsmodules.hh:45
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
constexpr auto getPropValue()
get the value data member of a property
Definition propertysystem.hh:240
Definition linearizationtype.hh:34