26 #ifndef OPM_MODELS_DIRECTIONAL_MOBILITY_HH 27 #define OPM_MODELS_DIRECTIONAL_MOBILITY_HH 33 #include <opm/common/ErrorMacros.hpp> 34 #include <opm/common/utility/gpuDecorators.hpp> 42 template <
class TypeTag>
45 enum { numPhases = getPropValue<TypeTag, Properties::NumPhases>() };
49 using array_type = std::array<Evaluation,numPhases>;
56 : mobility_{mX, mY, mZ}
59 OPM_HOST_DEVICE
const array_type& getArray(
unsigned index)
const 62 OPM_THROW(std::runtime_error,
"Unexpected mobility array index");
64 return mobility_[index];
67 OPM_HOST_DEVICE array_type& getArray(
unsigned index)
69 return const_cast<array_type&
>(std::as_const(*this).getArray(index));
73 std::array<array_type,3> mobility_{};
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
Definition: directionalmobility.hh:43
Defines the common properties required by the porous medium multi-phase models.
Structs needed for tpfalinearizer and its gpuparams struct extracted to be defined in one place that ...
Definition: blackoilbioeffectsmodules.hh:45
Declare the properties used by the infrastructure code of the finite volume discretizations.
The Opm property system, traits with inheritance.