28#ifndef EWOMS_FV_BASE_PRIMARY_VARIABLES_HH
29#define EWOMS_FV_BASE_PRIMARY_VARIABLES_HH
35#include <opm/material/common/Valgrind.hpp>
37#include <dune/common/fvector.hh>
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); }
88 static void registerParameters()
102 if (std::is_same<Evaluation, Scalar>::value)
106 if (
timeIdx == linearizationType.time)
107 return Toolbox::createVariable((*
this)[
varIdx],
varIdx);
109 return Toolbox::createConstant((*
this)[
varIdx]);
123 template <
class Flu
idState>
126 throw std::runtime_error(
"The PrimaryVariables class does not define "
127 "an assignNaive() method");
135 Valgrind::CheckDefined(*
static_cast<const ParentType*
>(
this));
145 template<
class TypeTag,
bool>
146 struct FieldTraitsImpl;
150 template<
class TypeTag>
151 struct FieldTraitsImpl< TypeTag, true >
152 :
public FieldTraits<FieldVector<Opm::GetPropType<TypeTag, Opm::Properties::Scalar>,
153 Opm::getPropValue<TypeTag, Opm::Properties::NumEq>()> >
160 struct FieldTraitsImpl< T, false >
161 :
public FieldTraits< T >
167 template<
class TypeTag,
template <
class>
class EwomsPrimaryVariable>
168 struct FieldTraits< EwomsPrimaryVariable< TypeTag > >
169 :
public FieldTraitsImpl< TypeTag,
170 std::is_base_of< Opm::FvBasePrimaryVariables< TypeTag >,
171 EwomsPrimaryVariable< TypeTag > > :: value >
Represents the primary variables used by the a model.
Definition fvbaseprimaryvariables.hh:52
FvBasePrimaryVariables(const FvBasePrimaryVariables &value)=default
Assignment from another primary variables object.
FvBasePrimaryVariables & operator=(const FvBasePrimaryVariables &value)=default
Assignment from another primary variables object.
FvBasePrimaryVariables(Scalar value)
Construction from a scalar value.
Definition fvbaseprimaryvariables.hh:69
void checkDefined() const
Instruct valgrind to check the definedness of all attributes of this class.
Definition fvbaseprimaryvariables.hh:133
void assignNaive(const FluidState &)
Assign the primary variables "somehow" from a fluid state.
Definition fvbaseprimaryvariables.hh:124
Evaluation makeEvaluation(unsigned varIdx, unsigned timeIdx, LinearizationType linearizationType=LinearizationType()) const
Return a primary variable intensive evaluation.
Definition fvbaseprimaryvariables.hh:100
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