12#ifndef DUMUX_SUBCONTROLVOLUME_HH
13#define DUMUX_SUBCONTROLVOLUME_HH
24template<
class Imp,
class ScvGeometryTraits>
27 using Implementation = Imp;
28 using GridIndexType =
typename ScvGeometryTraits::GridIndexType;
29 using LocalIndexType =
typename ScvGeometryTraits::LocalIndexType;
30 using Scalar =
typename ScvGeometryTraits::Scalar;
41 return asImp_().center();
47 return asImp_().volume();
53 return asImp_().dofIndex();
59 return asImp_().localDofIndex();
65 return asImp_().dofPosition();
71 return asImp_().elementIndex();
75 const Implementation& asImp_()
const
76 {
return *
static_cast<const Implementation*
>(
this);}
78 Implementation& asImp_()
79 {
return *
static_cast<Implementation*
>(
this);}
Base class for a sub control volume, i.e a part of the control volume we are making the balance for....
Definition: subcontrolvolumebase.hh:26
GridIndexType dofIndex() const
The index of the dof this scv is embedded in (ccfv)
Definition: subcontrolvolumebase.hh:51
ScvGeometryTraits Traits
state the traits public and thus export all types
Definition: subcontrolvolumebase.hh:36
typename ScvGeometryTraits::GlobalPosition GlobalPosition
export the type used for global coordinates
Definition: subcontrolvolumebase.hh:34
Scalar volume() const
The volume of the sub control volume.
Definition: subcontrolvolumebase.hh:45
LocalIndexType localDofIndex() const
The index of the dof this scv is embedded in (box)
Definition: subcontrolvolumebase.hh:57
GlobalPosition dofPosition() const
Definition: subcontrolvolumebase.hh:63
GlobalPosition center() const
The center of the sub control volume.
Definition: subcontrolvolumebase.hh:39
GridIndexType elementIndex() const
The global index of the element this scv is embedded in.
Definition: subcontrolvolumebase.hh:69