28 #ifndef EWOMS_FV_BASE_EXTENSIVE_QUANTITIES_HH 29 #define EWOMS_FV_BASE_EXTENSIVE_QUANTITIES_HH 33 #include <opm/common/Valgrind.hpp> 34 #include <opm/common/Unused.hpp> 43 template <
class TypeTag>
46 typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar;
47 typedef typename GET_PROP_TYPE(TypeTag, ElementContext) ElementContext;
48 typedef typename GET_PROP_TYPE(TypeTag, FluidSystem) FluidSystem;
65 void update(
const ElementContext& elemCtx,
unsigned scvfIdx,
unsigned timeIdx)
67 const auto& scvf = elemCtx.stencil(timeIdx).interiorFace(scvfIdx);
68 interiorScvIdx_ = scvf.interiorIndex();
69 exteriorScvIdx_ = scvf.exteriorIndex();
72 (elemCtx.intensiveQuantities(interiorScvIdx_, timeIdx).extrusionFactor()
73 + elemCtx.intensiveQuantities(exteriorScvIdx_, timeIdx).extrusionFactor()) / 2;
74 Opm::Valgrind::CheckDefined(extrusionFactor_);
75 assert(extrusionFactor_ > 0);
89 template <
class Context,
class Flu
idState>
93 const FluidState& fluidState OPM_UNUSED,
94 typename FluidSystem::template ParameterCache<typename FluidState::Scalar>& paramCache OPM_UNUSED)
96 unsigned dofIdx = context.interiorScvIndex(bfIdx, timeIdx);
97 interiorScvIdx_ =
static_cast<unsigned short>(dofIdx);
98 exteriorScvIdx_ =
static_cast<unsigned short>(dofIdx);
100 extrusionFactor_ = context.intensiveQuantities(bfIdx, timeIdx).extrusionFactor();
101 Opm::Valgrind::CheckDefined(extrusionFactor_);
102 assert(extrusionFactor_ > 0);
109 {
return extrusionFactor_; }
116 {
return interiorScvIdx_; }
123 {
return exteriorScvIdx_; }
127 unsigned short interiorScvIdx_;
128 unsigned short exteriorScvIdx_;
130 Scalar extrusionFactor_;
static void registerParameters()
Register all run-time parameters for the extensive quantities.
Definition: fvbaseextensivequantities.hh:54
Definition: baseauxiliarymodule.hh:37
Provide the properties at a face which make sense indepentently of the conserved quantities.
Definition: fvbaseextensivequantities.hh:44
Declare the properties used by the infrastructure code of the finite volume discretizations.
void updateBoundary(const Context &context, unsigned bfIdx, unsigned timeIdx, const FluidState &fluidState OPM_UNUSED, typename FluidSystem::template ParameterCache< typename FluidState::Scalar > ¶mCache OPM_UNUSED)
Update the extensive quantities for a given boundary face.
Definition: fvbaseextensivequantities.hh:90
unsigned short interiorIndex() const
Return the local index of the control volume which is on the "interior" of the sub-control volume fac...
Definition: fvbaseextensivequantities.hh:115
void update(const ElementContext &elemCtx, unsigned scvfIdx, unsigned timeIdx)
Update the extensive quantities for a given sub-control-volume face.
Definition: fvbaseextensivequantities.hh:65
Scalar extrusionFactor() const
Returns th extrusion factor for the sub-control-volume face.
Definition: fvbaseextensivequantities.hh:108
unsigned short exteriorIndex() const
Return the local index of the control volume which is on the "exterior" of the sub-control volume fac...
Definition: fvbaseextensivequantities.hh:122