12#ifndef DUMUX_DISCRETIZATION_CC_MPFA_SUBCONTROLVOLUMEFACE_HH 
   13#define DUMUX_DISCRETIZATION_CC_MPFA_SUBCONTROLVOLUMEFACE_HH 
   19#include <dune/common/reservedvector.hh> 
   20#include <dune/common/fvector.hh> 
   21#include <dune/geometry/type.hh> 
   22#include <dune/geometry/multilineargeometry.hh> 
   35template<
class Gr
idView>
 
   38    using Grid = 
typename GridView::Grid;
 
   40    static const int dim = Grid::dimension;
 
   41    static const int dimWorld = Grid::dimensionworld;
 
   47                                                                 std::vector<GridIndexType>,
 
   48                                                                 Dune::ReservedVector<GridIndexType, 1> >;
 
   56        template< 
int mydim, 
int cdim >
 
   59            using Type = std::array< Dune::FieldVector< ct, cdim >, (1<<(
dim-1)) >;
 
 
   66            static const bool v = 
true;
 
   67            static const unsigned int topologyId = Dune::GeometryTypes::cube(
dim).id();
 
 
 
 
   88    using GridIndexType = 
typename T::GridIndexType;
 
   89    using Scalar = 
typename T::Scalar;
 
   90    using CornerStorage = 
typename T::CornerStorage;
 
   91    using OutsideGridIndexStorage = 
typename T::OutsideGridIndexStorage;
 
   92    using Geometry = 
typename T::Geometry;
 
   93    using BoundaryFlag = 
typename T::BoundaryFlag;
 
  125    template<
class MpfaHelper, 
class Intersection>
 
  127                               CornerStorage&& corners,
 
  128                               const Intersection& intersection,
 
  130                               GridIndexType vIdxGlobal,
 
  131                               unsigned int vIdxLocal,
 
  132                               GridIndexType scvfIndex,
 
  138    , vertexIndex_(vIdxGlobal)
 
  139    , scvfIndex_(scvfIndex)
 
  142    , vIdxInElement_(vIdxLocal)
 
  144    , unitOuterNormal_(intersection.centerUnitOuterNormal())
 
  145    , boundaryFlag_{intersection}
 
  149          for (
const auto& corner : corners)
 
  151          center_ /= corners.size();
 
  154          ipGlobal_ = helper.getScvfIntegrationPoint(corners, q);
 
  155          area_ = helper.computeScvfArea(corners);
 
 
  164    { 
return boundary_; }
 
 
  168    { 
return scvfIndex_; }
 
 
  172    { 
return vertexIndex_; }
 
 
  176    { 
return vIdxInElement_; }
 
 
  180    { 
return insideScvIdx_; }
 
 
  184    { 
return outsideScvIndices_.size(); }
 
 
  189    { 
return outsideScvIndices_[i]; }
 
 
  193    { 
return outsideScvIndices_; }
 
 
  201    { 
return ipGlobal_; }
 
 
  205    { 
return unitOuterNormal_; }
 
 
  209    { 
return boundaryFlag_.get(); }
 
 
  213    { 
return facetInfo_; }
 
 
  217    GridIndexType vertexIndex_;
 
  218    GridIndexType scvfIndex_;
 
  219    GridIndexType insideScvIdx_;
 
  220    OutsideGridIndexStorage outsideScvIndices_;
 
  221    unsigned int vIdxInElement_;
 
  228    FacetInfo facetInfo_;
 
 
Boundary flag to store e.g. in sub control volume faces.
Boundary flag to store e.g. in sub control volume faces.
Definition boundaryflag.hh:55
std::size_t value_type
Definition boundaryflag.hh:39
GridIndexType index() const
The global index of this sub control volume face.
Definition discretization/cellcentered/mpfa/subcontrolvolumeface.hh:167
const GlobalPosition & ipGlobal() const
The integration point for flux evaluations in global coordinates.
Definition discretization/cellcentered/mpfa/subcontrolvolumeface.hh:200
unsigned int vertexIndexInElement() const
Returns the element-local vertex index the scvf is connected to.
Definition discretization/cellcentered/mpfa/subcontrolvolumeface.hh:175
Scalar area() const
The area of the sub control volume face.
Definition discretization/cellcentered/mpfa/subcontrolvolumeface.hh:159
typename T::GlobalPosition GlobalPosition
export the type used for global coordinates
Definition discretization/cellcentered/mpfa/subcontrolvolumeface.hh:105
GridIndexType insideScvIdx() const
index of the inside sub control volume
Definition discretization/cellcentered/mpfa/subcontrolvolumeface.hh:179
CCMpfaSubControlVolumeFace(const MpfaHelper &helper, CornerStorage &&corners, const Intersection &intersection, FacetInfo facetInfo, GridIndexType vIdxGlobal, unsigned int vIdxLocal, GridIndexType scvfIndex, GridIndexType insideScvIdx, const OutsideGridIndexStorage &outsideScvIndices, Scalar q, bool boundary)
Constructor.
Definition discretization/cellcentered/mpfa/subcontrolvolumeface.hh:126
const FacetInfo & facetInfo() const
Return information on the facet from which this scvf was constructed.
Definition discretization/cellcentered/mpfa/subcontrolvolumeface.hh:212
const GlobalPosition & unitOuterNormal() const
returns the unit outer normal vector (assumes non-curved geometries)
Definition discretization/cellcentered/mpfa/subcontrolvolumeface.hh:204
const GlobalPosition & center() const
The center of the sub control volume face.
Definition discretization/cellcentered/mpfa/subcontrolvolumeface.hh:196
GridIndexType outsideScvIdx(int i=0) const
Index of the i-th outside sub control volume or boundary scv index.
Definition discretization/cellcentered/mpfa/subcontrolvolumeface.hh:188
BoundaryFlag::value_type boundaryFlag() const
Return the boundary flag.
Definition discretization/cellcentered/mpfa/subcontrolvolumeface.hh:208
GridIndexType vertexIndex() const
Returns the index of the vertex the scvf is connected to.
Definition discretization/cellcentered/mpfa/subcontrolvolumeface.hh:171
const OutsideGridIndexStorage & outsideScvIndices() const
returns the outside scv indices (can be more than one index for dim < dimWorld)
Definition discretization/cellcentered/mpfa/subcontrolvolumeface.hh:192
bool boundary() const
returns true if the sub control volume face is on the domain boundary
Definition discretization/cellcentered/mpfa/subcontrolvolumeface.hh:163
T Traits
state the traits public and thus export all types
Definition discretization/cellcentered/mpfa/subcontrolvolumeface.hh:107
std::size_t numOutsideScvs() const
The number of scvs on the outside of this scv face.
Definition discretization/cellcentered/mpfa/subcontrolvolumeface.hh:183
Definition discretization/cellcentered/mpfa/subcontrolvolumeface.hh:58
std::array< Dune::FieldVector< ct, cdim >,(1<<(dim-1)) > Type
Definition discretization/cellcentered/mpfa/subcontrolvolumeface.hh:59
Definition discretization/cellcentered/mpfa/subcontrolvolumeface.hh:65
static const bool v
Definition discretization/cellcentered/mpfa/subcontrolvolumeface.hh:66
static const unsigned int topologyId
Definition discretization/cellcentered/mpfa/subcontrolvolumeface.hh:67
Definition discretization/cellcentered/mpfa/subcontrolvolumeface.hh:53
Default traits class to be used for the sub-control volume faces for the cell-centered finite volume ...
Definition discretization/cellcentered/mpfa/subcontrolvolumeface.hh:37
typename IndexTraits< GridView >::LocalIndex LocalIndexType
Definition discretization/cellcentered/mpfa/subcontrolvolumeface.hh:45
typename CornerStorage::value_type GlobalPosition
Definition discretization/cellcentered/mpfa/subcontrolvolumeface.hh:73
Dune::MultiLinearGeometry< Scalar, dim-1, dimWorld, ScvfMLGTraits< Scalar > > Geometry
Definition discretization/cellcentered/mpfa/subcontrolvolumeface.hh:71
typename IndexTraits< GridView >::GridIndex GridIndexType
Definition discretization/cellcentered/mpfa/subcontrolvolumeface.hh:44
typename ScvfMLGTraits< Scalar >::template CornerStorage< dim-1, dimWorld >::Type CornerStorage
Definition discretization/cellcentered/mpfa/subcontrolvolumeface.hh:72
static const int dim
Definition discretization/cellcentered/mpfa/subcontrolvolumeface.hh:40
typename std::conditional_t<(dim< dimWorld), std::vector< GridIndexType >, Dune::ReservedVector< GridIndexType, 1 > > OutsideGridIndexStorage
Definition discretization/cellcentered/mpfa/subcontrolvolumeface.hh:46
Dumux::BoundaryFlag< Grid > BoundaryFlag
Definition discretization/cellcentered/mpfa/subcontrolvolumeface.hh:74
static const int dimWorld
Definition discretization/cellcentered/mpfa/subcontrolvolumeface.hh:41
typename Grid::ctype Scalar
Definition discretization/cellcentered/mpfa/subcontrolvolumeface.hh:43
typename GridView::Grid Grid
Definition discretization/cellcentered/mpfa/subcontrolvolumeface.hh:38
Definition discretization/cellcentered/mpfa/subcontrolvolumeface.hh:98
int facetCornerIndex
Definition discretization/cellcentered/mpfa/subcontrolvolumeface.hh:101
GridIndexType elementIndex
Definition discretization/cellcentered/mpfa/subcontrolvolumeface.hh:99
int facetIndex
Definition discretization/cellcentered/mpfa/subcontrolvolumeface.hh:100
typename GridView::IndexSet::IndexType GridIndex
Definition indextraits.hh:27
unsigned int LocalIndex
Definition indextraits.hh:28