12#ifndef DUMUX_DISCRETIZATION_CC_TPFA_SUBCONTROLVOLUMEFACE_HH
13#define DUMUX_DISCRETIZATION_CC_TPFA_SUBCONTROLVOLUMEFACE_HH
18#include <dune/common/reservedvector.hh>
19#include <dune/geometry/type.hh>
20#include <dune/geometry/multilineargeometry.hh>
33template<
class Gr
idView>
36 using Grid =
typename GridView::Grid;
38 static constexpr int dim = Grid::dimension;
39 static constexpr int dimWorld = Grid::dimensionworld;
45 std::vector<GridIndexType>,
46 Dune::ReservedVector<GridIndexType, 2> >;
54 template<
int mydim,
int cdim >
57 using Type = Dune::ReservedVector< Dune::FieldVector< ct, cdim >, (1<<(
dim-1)) >;
78 using GridIndexType =
typename T::GridIndexType;
79 using Scalar =
typename T::Scalar;
80 using CornerStorage =
typename T::CornerStorage;
81 using GridIndexStorage =
typename T::GridIndexStorage;
82 using BoundaryFlag =
typename T::BoundaryFlag;
102 template <
class Intersection>
104 const typename Intersection::Geometry& isGeometry,
105 GridIndexType scvfIndex,
106 const GridIndexStorage& scvIndices,
108 : area_(isGeometry.
volume())
109 , center_(isGeometry.
center())
110 , unitOuterNormal_(is.centerUnitOuterNormal())
111 , scvfIndex_(scvfIndex)
112 , scvIndices_(scvIndices)
113 , boundary_(isBoundary)
145 return unitOuterNormal_;
151 return scvIndices_[0];
158 return scvIndices_[i+1];
164 return scvIndices_.size()-1;
176 return boundaryFlag_.get();
183 GridIndexType scvfIndex_;
184 GridIndexStorage scvIndices_;
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:58
std::size_t value_type
Definition boundaryflag.hh:28
bool boundary() const
returns true if the sub control volume face is on the boundary
Definition discretization/cellcentered/tpfa/subcontrolvolumeface.hh:137
typename CCTpfaDefaultScvfGeometryTraits< GridView >::GlobalPosition GlobalPosition
Definition discretization/cellcentered/tpfa/subcontrolvolumeface.hh:86
const GlobalPosition & unitOuterNormal() const
The unit outer normal of the sub control volume face.
Definition discretization/cellcentered/tpfa/subcontrolvolumeface.hh:143
GridIndexType outsideScvIdx(int i=0) const
Index of the i-th outside sub control volume or boundary scv index.
Definition discretization/cellcentered/tpfa/subcontrolvolumeface.hh:156
BoundaryFlag::value_type boundaryFlag() const
Return the boundary flag.
Definition discretization/cellcentered/tpfa/subcontrolvolumeface.hh:174
std::size_t numOutsideScvs() const
The number of scvs on the outside of this face.
Definition discretization/cellcentered/tpfa/subcontrolvolumeface.hh:162
const GlobalPosition & center() const
Definition discretization/cellcentered/tpfa/subcontrolvolumeface.hh:118
GridIndexType insideScvIdx() const
index of the inside sub control volume
Definition discretization/cellcentered/tpfa/subcontrolvolumeface.hh:149
CCTpfaDefaultScvfGeometryTraits< GridView > Traits
Definition discretization/cellcentered/tpfa/subcontrolvolumeface.hh:88
const GlobalPosition & ipGlobal() const
The integration point for flux evaluations in global coordinates.
Definition discretization/cellcentered/tpfa/subcontrolvolumeface.hh:124
GridIndexType index() const
The global index of this sub control volume face.
Definition discretization/cellcentered/tpfa/subcontrolvolumeface.hh:168
CCTpfaSubControlVolumeFace(const Intersection &is, const typename Intersection::Geometry &isGeometry, GridIndexType scvfIndex, const GridIndexStorage &scvIndices, bool isBoundary)
Constructor with intersection.
Definition discretization/cellcentered/tpfa/subcontrolvolumeface.hh:103
Scalar area() const
The area of the sub control volume face.
Definition discretization/cellcentered/tpfa/subcontrolvolumeface.hh:131
CCTpfaSubControlVolumeFace()=default
auto volume(const Geometry &geo, unsigned int integrationOrder=4)
The volume of a given geometry.
Definition volume.hh:159
Definition discretization/cellcentered/tpfa/subcontrolvolumeface.hh:56
Dune::ReservedVector< Dune::FieldVector< ct, cdim >,(1<<(dim-1)) > Type
Definition discretization/cellcentered/tpfa/subcontrolvolumeface.hh:57
Definition discretization/cellcentered/tpfa/subcontrolvolumeface.hh:51
Default traits class to be used for the sub-control volume faces for the cell-centered finite volume ...
Definition discretization/cellcentered/tpfa/subcontrolvolumeface.hh:35
typename ScvfMLGTraits< Scalar >::template CornerStorage< dim-1, dimWorld >::Type CornerStorage
Definition discretization/cellcentered/tpfa/subcontrolvolumeface.hh:62
Dune::MultiLinearGeometry< Scalar, dim-1, dimWorld, ScvfMLGTraits< Scalar > > Geometry
Definition discretization/cellcentered/tpfa/subcontrolvolumeface.hh:61
typename GridView::Grid Grid
Definition discretization/cellcentered/tpfa/subcontrolvolumeface.hh:36
static constexpr int dim
Definition discretization/cellcentered/tpfa/subcontrolvolumeface.hh:38
typename CornerStorage::value_type GlobalPosition
Definition discretization/cellcentered/tpfa/subcontrolvolumeface.hh:63
typename std::conditional_t<(dim< dimWorld), std::vector< GridIndexType >, Dune::ReservedVector< GridIndexType, 2 > > GridIndexStorage
Definition discretization/cellcentered/tpfa/subcontrolvolumeface.hh:44
typename IndexTraits< GridView >::LocalIndex LocalIndexType
Definition discretization/cellcentered/tpfa/subcontrolvolumeface.hh:43
typename Grid::ctype Scalar
Definition discretization/cellcentered/tpfa/subcontrolvolumeface.hh:41
Dumux::BoundaryFlag< Grid > BoundaryFlag
Definition discretization/cellcentered/tpfa/subcontrolvolumeface.hh:64
typename IndexTraits< GridView >::GridIndex GridIndexType
Definition discretization/cellcentered/tpfa/subcontrolvolumeface.hh:42
static constexpr int dimWorld
Definition discretization/cellcentered/tpfa/subcontrolvolumeface.hh:39
typename GridView::IndexSet::IndexType GridIndex
Definition indextraits.hh:27
unsigned int LocalIndex
Definition indextraits.hh:28