12#ifndef DUMUX_DISCRETIZATION_FACECENTERED_DIAMOND_SUBCONTROLVOLUMEFACE_HH
13#define DUMUX_DISCRETIZATION_FACECENTERED_DIAMOND_SUBCONTROLVOLUMEFACE_HH
17#include <dune/common/fvector.hh>
18#include <dune/geometry/type.hh>
19#include <dune/geometry/multilineargeometry.hh>
38template<
class Gr
idView>
41 using Grid =
typename GridView::Grid;
42 static constexpr int dim = Grid::dimension;
43 static constexpr int dimWorld = Grid::dimensionworld;
54 {
return Dune::GeometryTypes::simplex(
dim-1); }
61template<
class Gr
idView,
class T = FaceCenteredDiamondScvfGeometryTraits<Gr
idView>>
64 using Scalar =
typename T::Scalar;
65 using GridIndexType =
typename T::GridIndexType;
66 using LocalIndexType =
typename T::LocalIndexType;
67 using Geometry =
typename T::Geometry;
68 using BoundaryFlag =
typename T::BoundaryFlag;
82 const std::array<LocalIndexType, 2>& scvIndices,
83 const LocalIndexType localScvfIdx)
87 , localScvfIdx_(localScvfIdx)
88 , scvIndices_(scvIndices)
97 const std::array<LocalIndexType, 2>& scvIndices,
98 const LocalIndexType localScvfIdx,
99 const BoundaryFlag& bFlag)
101 , unitOuterNormal_(
normal)
103 , localScvfIdx_(localScvfIdx)
104 , scvIndices_(scvIndices)
106 , boundaryFlag_(bFlag)
119 {
return unitOuterNormal_; }
123 {
return scvIndices_[0]; }
127 {
return scvIndices_[1]; }
130 {
return static_cast<std::size_t
>(!
boundary()); }
133 {
return localScvfIdx_; }
136 {
return boundary_; }
144 return boundaryFlag_.get();
151 LocalIndexType localScvfIdx_;
152 std::array<LocalIndexType, 2> 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:55
std::size_t value_type
Definition: boundaryflag.hh:39
The SCVF implementation for diamond.
Definition: discretization/facecentered/diamond/subcontrolvolumeface.hh:63
bool boundary() const
Definition: discretization/facecentered/diamond/subcontrolvolumeface.hh:135
FaceCenteredDiamondSubControlVolumeFace()=default
std::size_t numOutsideScvs() const
Definition: discretization/facecentered/diamond/subcontrolvolumeface.hh:129
GridIndexType insideScvIdx() const
Index of the inside sub control volume.
Definition: discretization/facecentered/diamond/subcontrolvolumeface.hh:122
const GlobalPosition unitOuterNormal() const
The unit outer normal.
Definition: discretization/facecentered/diamond/subcontrolvolumeface.hh:118
const GlobalPosition & ipGlobal() const
The integration point of the sub control volume face.
Definition: discretization/facecentered/diamond/subcontrolvolumeface.hh:114
Scalar area() const
Definition: discretization/facecentered/diamond/subcontrolvolumeface.hh:138
FaceCenteredDiamondSubControlVolumeFace(const GlobalPosition ¢er, const Scalar area, const GlobalPosition &normal, const std::array< LocalIndexType, 2 > &scvIndices, const LocalIndexType localScvfIdx, const BoundaryFlag &bFlag)
Definition: discretization/facecentered/diamond/subcontrolvolumeface.hh:94
T Traits
state the traits public and thus export all types
Definition: discretization/facecentered/diamond/subcontrolvolumeface.hh:72
GridIndexType index() const
Definition: discretization/facecentered/diamond/subcontrolvolumeface.hh:132
BoundaryFlag::value_type boundaryFlag() const
Return the boundary flag.
Definition: discretization/facecentered/diamond/subcontrolvolumeface.hh:142
GridIndexType outsideScvIdx() const
index of the outside sub control volume
Definition: discretization/facecentered/diamond/subcontrolvolumeface.hh:126
FaceCenteredDiamondSubControlVolumeFace(const GlobalPosition ¢er, const Scalar area, const GlobalPosition &normal, const std::array< LocalIndexType, 2 > &scvIndices, const LocalIndexType localScvfIdx)
Definition: discretization/facecentered/diamond/subcontrolvolumeface.hh:79
const GlobalPosition & center() const
The center of the sub control volume face.
Definition: discretization/facecentered/diamond/subcontrolvolumeface.hh:110
typename T::GlobalPosition GlobalPosition
Definition: discretization/facecentered/diamond/subcontrolvolumeface.hh:74
Vector normal(const Vector &v)
Create a vector normal to the given one (v is expected to be non-zero)
Definition: normal.hh:26
A helper function for class member function introspection.
Traits for an efficient corner storage for fc diamond method.
Definition: discretization/facecentered/diamond/geometryhelper.hh:29
Default traits class to be used for the sub-control volumes for the cell-centered finite volume schem...
Definition: discretization/facecentered/diamond/subcontrolvolumeface.hh:40
typename IndexTraits< GridView >::GridIndex GridIndexType
Definition: discretization/facecentered/diamond/subcontrolvolumeface.hh:45
static constexpr int dimWorld
Definition: discretization/facecentered/diamond/subcontrolvolumeface.hh:43
typename CornerStorage::value_type GlobalPosition
Definition: discretization/facecentered/diamond/subcontrolvolumeface.hh:50
typename IndexTraits< GridView >::SmallLocalIndex LocalIndexType
Definition: discretization/facecentered/diamond/subcontrolvolumeface.hh:46
typename Grid::ctype Scalar
Definition: discretization/facecentered/diamond/subcontrolvolumeface.hh:47
typename FCDiamondMLGeometryTraits< Scalar >::template CornerStorage< dim-1, dimWorld >::Type CornerStorage
Definition: discretization/facecentered/diamond/subcontrolvolumeface.hh:49
static constexpr int dim
Definition: discretization/facecentered/diamond/subcontrolvolumeface.hh:42
static constexpr Dune::GeometryType interiorGeometryType(Dune::GeometryType)
Definition: discretization/facecentered/diamond/subcontrolvolumeface.hh:53
typename GridView::Grid Grid
Definition: discretization/facecentered/diamond/subcontrolvolumeface.hh:41
Dune::MultiLinearGeometry< Scalar, dim-1, dimWorld, FCDiamondMLGeometryTraits< Scalar > > Geometry
Definition: discretization/facecentered/diamond/subcontrolvolumeface.hh:48
typename GridView::IndexSet::IndexType GridIndex
Definition: indextraits.hh:27
std::uint_least8_t SmallLocalIndex
Definition: indextraits.hh:29
Base class for a sub control volume face.