12#ifndef DUMUX_DISCRETIZATION_BOX_SUBCONTROLVOLUMEFACE_HH 
   13#define DUMUX_DISCRETIZATION_BOX_SUBCONTROLVOLUMEFACE_HH 
   17#include <dune/geometry/type.hh> 
   18#include <dune/geometry/multilineargeometry.hh> 
   35template<
class Gr
idView>
 
   38    using Grid = 
typename GridView::Grid;
 
   39    static constexpr int dim = Grid::dimension;
 
   40    static constexpr int dimWorld = Grid::dimensionworld;
 
 
   65    using GridIndexType = 
typename T::GridIndexType;
 
   66    using LocalIndexType = 
typename T::LocalIndexType;
 
   67    using Scalar = 
typename T::Scalar;
 
   68    using Geometry = 
typename T::Geometry;
 
   69    using BoundaryFlag = 
typename T::BoundaryFlag;
 
   70    static constexpr int dim = Geometry::mydimension;
 
   82    template<
class Corners, 
class Element>
 
   85                            const Element& element,
 
   86                            const typename Element::Geometry& elemGeometry,
 
   87                            GridIndexType scvfIndex,
 
   88                            std::vector<LocalIndexType>&& scvIndices,
 
   92    , scvfIndex_(scvfIndex)
 
   93    , scvIndices_(std::move(scvIndices))
 
   98            Dune::GeometryTypes::cube(dim),
 
   99            [&](
unsigned int i){ 
return corners[i]; }
 
 
  104    template<
class Corners, 
class Intersection>
 
  107                            const Intersection& intersection,
 
  108                            const typename Intersection::Geometry& isGeometry,
 
  109                            LocalIndexType indexInIntersection,
 
  110                            GridIndexType scvfIndex,
 
  111                            std::vector<LocalIndexType>&& scvIndices,
 
  114    , unitOuterNormal_(
normal)
 
  115    , scvfIndex_(scvfIndex)
 
  116    , scvIndices_(std::move(scvIndices))
 
  118    , boundaryFlag_{intersection}
 
  121            Dune::GeometryTypes::cube(dim),
 
  122            [&](
unsigned int i){ 
return corners[i]; }
 
 
  152        return unitOuterNormal_;
 
 
  158        return scvIndices_[0];
 
 
  166        return scvIndices_[1];
 
 
  172        return static_cast<std::size_t
>(!
boundary());
 
 
  184        return boundaryFlag_.get();
 
 
  191    GridIndexType scvfIndex_;
 
  192    std::vector<LocalIndexType> scvIndices_;
 
 
Boundary flag to store e.g. in sub control volume faces.
Helper class constructing the dual grid finite volume geometries for the box discretizazion method.
Compute the center point of a convex polytope geometry or a random-access container of corner points.
Boundary flag to store e.g. in sub control volume faces.
Definition boundaryflag.hh:55
std::size_t value_type
Definition boundaryflag.hh:39
LocalIndexType outsideScvIdx(int i=0) const
Index of the i-th outside sub control volume or boundary scv index.
Definition discretization/box/subcontrolvolumeface.hh:163
const GlobalPosition & unitOuterNormal() const
Definition discretization/box/subcontrolvolumeface.hh:150
BoxDefaultScvfGeometryTraits< GridView > Traits
Definition discretization/box/subcontrolvolumeface.hh:76
GridIndexType index() const
The local index of this sub control volume face.
Definition discretization/box/subcontrolvolumeface.hh:176
BoxSubControlVolumeFace(const Corners &corners, const GlobalPosition &normal, const Element &element, const typename Element::Geometry &elemGeometry, GridIndexType scvfIndex, std::vector< LocalIndexType > &&scvIndices, bool boundary=false)
Constructor for inner scvfs.
Definition discretization/box/subcontrolvolumeface.hh:83
BoxSubControlVolumeFace()=default
The default constructor.
const GlobalPosition & center() const
Definition discretization/box/subcontrolvolumeface.hh:127
bool boundary() const
Definition discretization/box/subcontrolvolumeface.hh:145
LocalIndexType insideScvIdx() const
index of the inside sub control volume
Definition discretization/box/subcontrolvolumeface.hh:156
BoundaryFlag::value_type boundaryFlag() const
Return the boundary flag.
Definition discretization/box/subcontrolvolumeface.hh:182
std::size_t numOutsideScvs() const
The number of scvs on the outside of this face.
Definition discretization/box/subcontrolvolumeface.hh:170
BoxSubControlVolumeFace(const Corners &corners, const GlobalPosition &normal, const Intersection &intersection, const typename Intersection::Geometry &isGeometry, LocalIndexType indexInIntersection, GridIndexType scvfIndex, std::vector< LocalIndexType > &&scvIndices, bool boundary=false)
Constructor for boundary scvfs.
Definition discretization/box/subcontrolvolumeface.hh:105
const GlobalPosition & ipGlobal() const
The integration point for flux evaluations in global coordinates.
Definition discretization/box/subcontrolvolumeface.hh:133
typename BoxDefaultScvfGeometryTraits< GridView >::GlobalPosition GlobalPosition
Definition discretization/box/subcontrolvolumeface.hh:74
Scalar area() const
The area of the sub control volume face.
Definition discretization/box/subcontrolvolumeface.hh:139
Base class for a sub control volume face, i.e a part of the boundary of a sub control volume we compu...
Definition subcontrolvolumefacebase.hh:29
Vector normal(const Vector &v)
Create a vector normal to the given one (v is expected to be non-zero)
Definition normal.hh:26
auto convexPolytopeVolume(Dune::GeometryType type, const CornerF &c)
Compute the volume of several common geometry types.
Definition volume.hh:41
Default traits class to be used for the sub-control volume faces for the box scheme.
Definition discretization/box/subcontrolvolumeface.hh:37
typename Grid::ctype Scalar
Definition discretization/box/subcontrolvolumeface.hh:43
typename GridView::Grid Grid
Definition discretization/box/subcontrolvolumeface.hh:38
typename GeometryTraits::template CornerStorage< dim-1, dimWorld >::Type CornerStorage
Definition discretization/box/subcontrolvolumeface.hh:46
static constexpr int dimWorld
Definition discretization/box/subcontrolvolumeface.hh:40
typename IndexTraits< GridView >::LocalIndex LocalIndexType
Definition discretization/box/subcontrolvolumeface.hh:42
static constexpr int dim
Definition discretization/box/subcontrolvolumeface.hh:39
typename IndexTraits< GridView >::GridIndex GridIndexType
Definition discretization/box/subcontrolvolumeface.hh:41
typename Geometry::GlobalCoordinate GlobalPosition
Definition discretization/box/subcontrolvolumeface.hh:47
Dumux::BoundaryFlag< Grid > BoundaryFlag
Definition discretization/box/subcontrolvolumeface.hh:48
BoxMLGeometryTraits< Scalar > GeometryTraits
Definition discretization/box/subcontrolvolumeface.hh:44
Dune::MultiLinearGeometry< Scalar, dim-1, dimWorld, GeometryTraits > Geometry
Definition discretization/box/subcontrolvolumeface.hh:45
Traits for an efficient corner storage for box method sub control volumes.
Definition boxgeometryhelper.hh:32
typename GridView::IndexSet::IndexType GridIndex
Definition indextraits.hh:27
unsigned int LocalIndex
Definition indextraits.hh:28
Base class for a sub control volume face.
Compute the volume of several common geometry types.