28#ifndef EWOMS_FV_BASE_PRIMARY_VARIABLES_HH
29#define EWOMS_FV_BASE_PRIMARY_VARIABLES_HH
31#include <dune/common/fvector.hh>
35#include <opm/material/common/MathToolbox.hpp>
36#include <opm/material/common/Valgrind.hpp>
48template <
class TypeTag>
50 :
public Dune::FieldVector<GetPropType<TypeTag, Properties::Scalar>,
51 getPropValue<TypeTag, Properties::NumEq>()>
59 using ParentType = Dune::FieldVector<Scalar, numEq>;
64 { Valgrind::SetUndefined(*
this); }
76 using ParentType::operator=;
83 static void registerParameters()
97 if (std::is_same<Evaluation, Scalar>::value)
101 if (
timeIdx == linearizationType.time)
102 return Toolbox::createVariable((*
this)[
varIdx],
varIdx);
104 return Toolbox::createConstant((*
this)[
varIdx]);
118 template <
class Flu
idState>
121 throw std::runtime_error(
"The PrimaryVariables class does not define "
122 "an assignNaive() method");
130 Valgrind::CheckDefined(*
static_cast<const ParentType*
>(
this));
140 template<
class TypeTag,
bool>
141 struct FieldTraitsImpl;
145 template<
class TypeTag>
146 struct FieldTraitsImpl< TypeTag, true >
147 :
public FieldTraits<FieldVector<Opm::GetPropType<TypeTag, Opm::Properties::Scalar>,
148 Opm::getPropValue<TypeTag, Opm::Properties::NumEq>()> >
155 struct FieldTraitsImpl< T, false >
156 :
public FieldTraits< T >
162 template<
class TypeTag,
template <
class>
class EwomsPrimaryVariable>
163 struct FieldTraits< EwomsPrimaryVariable< TypeTag > >
164 :
public FieldTraitsImpl< TypeTag,
165 std::is_base_of< Opm::FvBasePrimaryVariables< TypeTag >,
166 EwomsPrimaryVariable< TypeTag > > :: value >
Represents the primary variables used by the a model.
Definition fvbaseprimaryvariables.hh:52
static void init()
< Import base class assignment operators.
Definition fvbaseprimaryvariables.hh:78
FvBasePrimaryVariables(const FvBasePrimaryVariables &value)=default
Assignment from another primary variables object.
FvBasePrimaryVariables & operator=(const FvBasePrimaryVariables &value)=default
Assignment from another primary variables object.
void checkDefined() const
Instruct valgrind to check the definedness of all attributes of this class.
Definition fvbaseprimaryvariables.hh:128
void assignNaive(const FluidState &)
Assign the primary variables "somehow" from a fluid state.
Definition fvbaseprimaryvariables.hh:119
Evaluation makeEvaluation(unsigned varIdx, unsigned timeIdx, LinearizationType linearizationType=LinearizationType()) const
Return a primary variable intensive evaluation.
Definition fvbaseprimaryvariables.hh:95
Declare the properties used by the infrastructure code of the finite volume discretizations.
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 blackoilboundaryratevector.hh:37
constexpr auto getPropValue()
get the value data member of a property
Definition propertysystem.hh:242
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:235
Definition linearizationtype.hh:35