12#ifndef DUMUX_DISCRETIZATION_FACECENTERED_STAGGERED_SUBCONTROLVOLUMEFACE_HH 
   13#define DUMUX_DISCRETIZATION_FACECENTERED_STAGGERED_SUBCONTROLVOLUMEFACE_HH 
   17#include <dune/common/fvector.hh> 
   18#include <dune/geometry/type.hh> 
   19#include <dune/geometry/axisalignedcubegeometry.hh> 
   33template<
class Gr
idView>
 
   38    using Scalar = 
typename GridView::ctype;
 
   39    using Element = 
typename GridView::template Codim<0>::Entity;
 
   42    static constexpr int dim = GridView::Grid::dimension;
 
   43    static constexpr int dimWorld = GridView::Grid::dimensionworld;
 
 
   52template<
class Gr
idView, 
class T = FaceCenteredDefaultScvfGeometryTraits<Gr
idView>>
 
   55    using Geometry = 
typename T::Geometry;
 
   56    using GridIndexType = 
typename T::GridIndexType;
 
   57    using Scalar = 
typename T::Scalar;
 
   58    using Element = 
typename T::Element;
 
   59    using CornerStorage = 
typename T::CornerStorage;
 
   63    using ElementGeometry = 
typename Element::Geometry;
 
   64    using IntersectionGeometry = 
typename GridView::Intersection::Geometry;
 
   78                                              const IntersectionGeometry& intersectionGeometry,
 
   79                                              const std::array<GridIndexType, 2> globalScvIndices,
 
   80                                              const SmallLocalIndexType localScvfIdx,
 
   81                                              const GridIndexType globalScvfIdx,
 
   85    : globalScvIndices_(globalScvIndices)
 
   86    , localScvfIdx_(localScvfIdx)
 
   87    , globalScvfIdx_(globalScvfIdx)
 
   88    , area_(intersectionGeometry.
volume())
 
   92    , boundaryType_(boundaryType)
 
   95        center_ = 
boundary() ? intersectionGeometry.center() : elementGeometry.center();
 
   99            outerNormalSign_ *= -1.0;
 
 
  103    template<
class LateralFacetGeometry>
 
  105                                              const IntersectionGeometry& intersectionGeometry,
 
  106                                              const LateralFacetGeometry& lateralFacetGeometry,
 
  107                                              const std::array<GridIndexType, 2> globalScvIndices,
 
  108                                              const SmallLocalIndexType localScvfIdx,
 
  109                                              const GridIndexType globalScvfIdx,
 
  113    : globalScvIndices_(globalScvIndices)
 
  114    , localScvfIdx_(localScvfIdx)
 
  115    , globalScvfIdx_(globalScvfIdx)
 
  116    , area_(0.5*lateralFacetGeometry.
volume())
 
  120    , boundaryType_(boundaryType)
 
  123        const auto shift = intersectionGeometry.center() - elementGeometry.center();
 
  124        ipGlobal_ = lateralFacetGeometry.center() + shift;
 
  125        center_ = 0.5*(lateralFacetGeometry.center() + ipGlobal_);
 
 
  134    { 
return ipGlobal_; }
 
 
  146    { 
return globalScvIndices_[0]; }
 
 
  150    { 
return globalScvIndices_[1]; }
 
 
  153    { 
return globalScvfIdx_; }
 
 
  156    { 
return localScvfIdx_; }
 
 
  159    { 
return faceType_; }
 
 
  177    { 
return normalAxis_; }
 
 
  180    { 
return outerNormalSign_; }
 
 
  185    std::array<GridIndexType, 2> globalScvIndices_;
 
  186    SmallLocalIndexType localScvfIdx_;
 
  187    GridIndexType globalScvfIdx_;
 
  189    SmallLocalIndexType normalAxis_;
 
  190    std::int_least8_t outerNormalSign_;
 
 
BoundaryType
Definition discretization/facecentered/staggered/subcontrolvolumeface.hh:72
@ physicalBoundary
Definition discretization/facecentered/staggered/subcontrolvolumeface.hh:72
@ processorBoundary
Definition discretization/facecentered/staggered/subcontrolvolumeface.hh:72
@ interior
Definition discretization/facecentered/staggered/subcontrolvolumeface.hh:72
SmallLocalIndexType normalAxis() const
Definition discretization/facecentered/staggered/subcontrolvolumeface.hh:176
const GlobalPosition unitOuterNormal() const
The unit outer normal.
Definition discretization/facecentered/staggered/subcontrolvolumeface.hh:137
FaceCenteredStaggeredSubControlVolumeFace(const ElementGeometry &elementGeometry, const IntersectionGeometry &intersectionGeometry, const LateralFacetGeometry &lateralFacetGeometry, const std::array< GridIndexType, 2 > globalScvIndices, const SmallLocalIndexType localScvfIdx, const GridIndexType globalScvfIdx, const GlobalPosition &unitOuterNormal, const FaceType faceType, const BoundaryType boundaryType)
The constructor for lateral faces.
Definition discretization/facecentered/staggered/subcontrolvolumeface.hh:104
FaceType
Definition discretization/facecentered/staggered/subcontrolvolumeface.hh:71
@ lateral
Definition discretization/facecentered/staggered/subcontrolvolumeface.hh:71
@ frontal
Definition discretization/facecentered/staggered/subcontrolvolumeface.hh:71
SmallLocalIndexType localIndex() const
Definition discretization/facecentered/staggered/subcontrolvolumeface.hh:155
const GlobalPosition & center() const
The center of the sub control volume face.
Definition discretization/facecentered/staggered/subcontrolvolumeface.hh:129
Scalar area() const
Definition discretization/facecentered/staggered/subcontrolvolumeface.hh:173
FaceCenteredStaggeredSubControlVolumeFace(const ElementGeometry &elementGeometry, const IntersectionGeometry &intersectionGeometry, const std::array< GridIndexType, 2 > globalScvIndices, const SmallLocalIndexType localScvfIdx, const GridIndexType globalScvfIdx, const GlobalPosition &unitOuterNormal, const FaceType faceType, const BoundaryType boundaryType)
The constructor for frontal faces.
Definition discretization/facecentered/staggered/subcontrolvolumeface.hh:77
std::int_least8_t directionSign() const
Definition discretization/facecentered/staggered/subcontrolvolumeface.hh:179
GridIndexType outsideScvIdx() const
index of the outside sub control volume for spatial param evaluation
Definition discretization/facecentered/staggered/subcontrolvolumeface.hh:149
bool processorBoundary() const
Definition discretization/facecentered/staggered/subcontrolvolumeface.hh:164
const GlobalPosition & ipGlobal() const
The integration point of the sub control volume face.
Definition discretization/facecentered/staggered/subcontrolvolumeface.hh:133
GridIndexType index() const
Definition discretization/facecentered/staggered/subcontrolvolumeface.hh:152
T Traits
state the traits public and thus export all types
Definition discretization/facecentered/staggered/subcontrolvolumeface.hh:68
bool isFrontal() const
Definition discretization/facecentered/staggered/subcontrolvolumeface.hh:167
GridIndexType insideScvIdx() const
Index of the inside sub control volume for spatial param evaluation.
Definition discretization/facecentered/staggered/subcontrolvolumeface.hh:145
FaceCenteredStaggeredSubControlVolumeFace()=default
typename T::GlobalPosition GlobalPosition
Definition discretization/facecentered/staggered/subcontrolvolumeface.hh:70
bool isLateral() const
Definition discretization/facecentered/staggered/subcontrolvolumeface.hh:170
FaceType faceType() const
Definition discretization/facecentered/staggered/subcontrolvolumeface.hh:158
bool boundary() const
Definition discretization/facecentered/staggered/subcontrolvolumeface.hh:161
constexpr int sign(const ValueType &value) noexcept
Sign or signum function.
Definition math.hh:658
auto volume(const Geometry &geo, unsigned int integrationOrder=4)
The volume of a given geometry.
Definition volume.hh:159
Base class for the finite volume geometry vector for face-centered staggered models This builds up th...
Default traits class to be used for the sub-control volume face for the face-centered staggered finit...
Definition discretization/facecentered/staggered/subcontrolvolumeface.hh:35
typename IndexTraits< GridView >::GridIndex GridIndexType
Definition discretization/facecentered/staggered/subcontrolvolumeface.hh:36
std::array< GlobalPosition,(1<<(dim-1))> CornerStorage
Definition discretization/facecentered/staggered/subcontrolvolumeface.hh:44
static constexpr int dim
Definition discretization/facecentered/staggered/subcontrolvolumeface.hh:42
Dune::AxisAlignedCubeGeometry< Scalar, dim-1, dimWorld > Geometry
Definition discretization/facecentered/staggered/subcontrolvolumeface.hh:45
typename GridView::template Codim< 0 >::Entity Element
Definition discretization/facecentered/staggered/subcontrolvolumeface.hh:39
static constexpr int dimWorld
Definition discretization/facecentered/staggered/subcontrolvolumeface.hh:43
typename GridView::ctype Scalar
Definition discretization/facecentered/staggered/subcontrolvolumeface.hh:38
typename IndexTraits< GridView >::LocalIndex LocalIndexType
Definition discretization/facecentered/staggered/subcontrolvolumeface.hh:37
typename Element::Geometry::GlobalCoordinate GlobalPosition
Definition discretization/facecentered/staggered/subcontrolvolumeface.hh:40
typename GridView::IndexSet::IndexType GridIndex
Definition indextraits.hh:27
std::uint_least8_t SmallLocalIndex
Definition indextraits.hh:29
unsigned int LocalIndex
Definition indextraits.hh:28
Base class for a sub control volume face.