28 #ifndef EWOMS_FV_BASE_PRIMARY_VARIABLES_HH 29 #define EWOMS_FV_BASE_PRIMARY_VARIABLES_HH 33 #include <opm/common/Valgrind.hpp> 34 #include <opm/common/Unused.hpp> 35 #include <opm/common/ErrorMacros.hpp> 36 #include <opm/common/Exceptions.hpp> 38 #include <dune/common/fvector.hh> 47 template <
class TypeTag>
49 :
public Dune::FieldVector<typename GET_PROP_TYPE(TypeTag, Scalar),
50 GET_PROP_VALUE(TypeTag, NumEq)>
52 typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar;
53 typedef typename GET_PROP_TYPE(TypeTag, Evaluation) Evaluation;
57 typedef Opm::MathToolbox<Evaluation> Toolbox;
58 typedef Dune::FieldVector<Scalar, numEq> ParentType;
63 { Opm::Valgrind::SetUndefined(*
this); }
92 return Toolbox::createVariable((*
this)[varIdx], varIdx);
94 return Toolbox::createConstant((*
this)[varIdx]);
107 template <
class Flu
idState>
110 OPM_THROW(std::runtime_error,
111 "The PrimaryVariables class does not define a assignNaive() method");
119 Opm::Valgrind::CheckDefined(*static_cast<const ParentType*>(
this));
FvBasePrimaryVariables(Scalar value)
Construction from a scalar value.
Definition: fvbaseprimaryvariables.hh:68
Definition: baseauxiliarymodule.hh:37
#define GET_PROP_VALUE(TypeTag, PropTagName)
Access the value attribute of a property for a type tag.
Definition: propertysystem.hh:469
Declare the properties used by the infrastructure code of the finite volume discretizations.
Represents the primary variables used by the a model.
Definition: fvbaseprimaryvariables.hh:48
void checkDefined() const
Instruct valgrind to check the definedness of all attributes of this class.
Definition: fvbaseprimaryvariables.hh:117
FvBasePrimaryVariables & operator=(const FvBasePrimaryVariables &value)=default
Assignment from another primary variables object.
Evaluation makeEvaluation(unsigned varIdx, unsigned timeIdx) const
Return a primary variable intensive evaluation.
Definition: fvbaseprimaryvariables.hh:89
void assignNaive(const FluidState &fluidState OPM_UNUSED)
Assign the primary variables "somehow" from a fluid state.
Definition: fvbaseprimaryvariables.hh:108