14#ifndef DUMUX_DISCRETIZATION_BOX_FV_ELEMENT_GEOMETRY_HH
15#define DUMUX_DISCRETIZATION_BOX_FV_ELEMENT_GEOMETRY_HH
20#include <unordered_map>
24#include <dune/geometry/type.hh>
25#include <dune/localfunctions/lagrange/pqkfactory.hh>
26#include <dune/common/reservedvector.hh>
45template<
class GG,
bool enableGr
idGeometryCache>
52 using GridView =
typename GG::GridView;
53 static constexpr int dim = GridView::dimension;
54 static constexpr int dimWorld = GridView::dimensionworld;
57 using CoordScalar =
typename GridView::ctype;
58 using FeLocalBasis =
typename GG::FeCache::FiniteElementType::Traits::LocalBasisType;
59 using GGCache =
typename GG::Cache;
60 using GeometryHelper =
typename GGCache::GeometryHelper;
61 using DofHelper =
typename GGCache::DofHelper;
64 typename GridView::template Codim<0>::Entity::Geometry::LocalCoordinate,
65 typename GridView::template Codim<0>::Entity::Geometry::GlobalCoordinate
70 using Element =
typename GridView::template Codim<0>::Entity;
91 : ggCache_(&ggCache) {}
96 return ggCache_->scvs(eIdx_)[scvIdx];
102 return ggCache_->scvfs(eIdx_)[scvfIdx];
110 friend inline Dune::IteratorRange<typename std::vector<SubControlVolume>::const_iterator>
113 using Iter =
typename std::vector<SubControlVolume>::const_iterator;
114 const auto& s = fvGeometry.ggCache_->scvs(fvGeometry.eIdx_);
115 return Dune::IteratorRange<Iter>(s.begin(), s.end());
123 friend inline Dune::IteratorRange<typename std::vector<SubControlVolumeFace>::const_iterator>
126 using Iter =
typename std::vector<SubControlVolumeFace>::const_iterator;
127 const auto& s = fvGeometry.ggCache_->scvfs(fvGeometry.eIdx_);
128 return Dune::IteratorRange<Iter>(s.begin(), s.end());
133 friend inline Dune::IteratorRange<typename std::vector<SubControlVolumeFace>::const_iterator>
136 using Iter =
typename std::vector<SubControlVolumeFace>::const_iterator;
137 const auto& s = fvGeometry.ggCache_->scvfs(fvGeometry.eIdx_);
138 const auto& range = fvGeometry.ggCache_->boundaryFaceScvfRanges(fvGeometry.eIdx_)[
boundaryFace.index()];
139 return Dune::IteratorRange<Iter>(s.begin() + range[0], s.begin() + range[0] + range[1]);
144 friend inline std::ranges::view
auto
147 const auto& v = fvGeometry.ggCache_->boundaryFaces(fvGeometry.eIdx_);
148 return std::ranges::views::all(v);
153 {
return DofHelper::localDofsOnBoundaryFace(fvGeometry,
boundaryFace); }
158 return gridGeometry().feCache().get(element_->type()).localBasis();
164 return gridGeometry().feCache().get(element_->type()).localCoefficients();
176 return ggCache_->scvs(eIdx_).size();
182 return ggCache_->scvfs(eIdx_).size();
193 return std::move(*
this);
210 return std::move(*
this);
219 elementGeometry_.emplace(
element.geometry());
226 {
return static_cast<bool>(element_); }
230 {
return *element_; }
234 {
return *elementGeometry_; }
243 const auto localScvfIdx =
scvf.index() - GeometryHelper::numInteriorScvf(
element().type());
244 return ggCache_->scvfBoundaryGeometryKeys(eIdx_)[localScvfIdx][0];
249 {
return ggCache_->gridGeometry(); }
253 {
return ggCache_->gridGeometry(); }
257 {
return ggCache_->hasBoundaryScvf(eIdx_); }
265 {
return ggCache_->boundaryFaces(eIdx_)[bfIdx]; }
271 return { Dune::GeometryTypes::cube(dim), GeometryHelper(*elementGeometry_).getScvCorners(
scv.indexInElement()) };
278 const GeometryHelper geometryHelper(*elementGeometry_);
281 const auto localBoundaryIndex =
scvf.index() - geometryHelper.numInteriorScvf();
282 const auto& key = ggCache_->scvfBoundaryGeometryKeys(eIdx_)[localBoundaryIndex];
283 return { Dune::GeometryTypes::cube(dim-1), geometryHelper.getBoundaryScvfCorners(key[0], key[1]) };
286 return { Dune::GeometryTypes::cube(dim-1), geometryHelper.getScvfCorners(
scvf.index()) };
295 typename BoundaryFace::Traits::CornerStorage corners;
296 for (
int i = 0; i < faceGeoInRef.corners(); ++i)
297 corners.push_back(elemGeo.global(faceGeoInRef.corner(i)));
298 return { faceGeoInRef.type(), corners };
304 const auto type = fvGeometry.element().type();
305 const auto& localKey = fvGeometry.gridGeometry().feCache().get(type).localCoefficients().localKey(
scv.localDofIndex());
311 template<
class LocalDof>
314 const auto type = fvGeometry.element().type();
315 const auto& localKey = fvGeometry.gridGeometry().feCache().get(type).localCoefficients().localKey(localDof.index());
316 const auto& localPos = DofHelper::localDofPosition(type, localKey);
326 [&] (
const typename Element::Geometry::GlobalCoordinate& pos)
327 {
return fvGeometry.elementGeometry().local(pos); },
336 {
scvf.unitOuterNormal(),
scvf.index(), fvGeometry.elementGeometry().local(
scvf.ipGlobal()),
scvf.ipGlobal() };
340 const GGCache* ggCache_;
343 std::optional<Element> element_;
344 std::optional<typename Element::Geometry> elementGeometry_;
351 using GridView =
typename GG::GridView;
352 static constexpr int dim = GridView::dimension;
353 static constexpr int dimWorld = GridView::dimensionworld;
356 using CoordScalar =
typename GridView::ctype;
357 using FeLocalBasis =
typename GG::FeCache::FiniteElementType::Traits::LocalBasisType;
358 using GGCache =
typename GG::Cache;
359 using GeometryHelper =
typename GGCache::GeometryHelper;
360 using DofHelper =
typename GGCache::DofHelper;
363 typename GridView::template Codim<0>::Entity::Geometry::LocalCoordinate,
364 typename GridView::template Codim<0>::Entity::Geometry::GlobalCoordinate
369 using Element =
typename GridView::template Codim<0>::Entity;
390 : ggCache_(&ggCache) {}
395 return scvs_[scvIdx];
401 return scvfs_[scvfIdx];
409 friend inline Dune::IteratorRange<typename std::vector<SubControlVolume>::const_iterator>
412 using Iter =
typename std::vector<SubControlVolume>::const_iterator;
413 return Dune::IteratorRange<Iter>(fvGeometry.scvs_.begin(), fvGeometry.scvs_.end());
421 friend inline Dune::IteratorRange<typename std::vector<SubControlVolumeFace>::const_iterator>
424 using Iter =
typename std::vector<SubControlVolumeFace>::const_iterator;
425 return Dune::IteratorRange<Iter>(fvGeometry.scvfs_.begin(), fvGeometry.scvfs_.end());
430 friend inline Dune::IteratorRange<typename std::vector<SubControlVolumeFace>::const_iterator>
433 using Iter =
typename std::vector<SubControlVolumeFace>::const_iterator;
434 const auto& range = fvGeometry.boundaryFaceScvfRanges_[
boundaryFace.index()];
435 return Dune::IteratorRange<Iter>(fvGeometry.scvfs_.begin() + range[0], fvGeometry.scvfs_.begin() + range[0] + range[1]);
440 friend inline std::ranges::view
auto
442 {
return std::ranges::views::all(fvGeometry.boundaryFaces_); }
446 {
return DofHelper::localDofsOnBoundaryFace(fvGeometry,
boundaryFace); }
451 return gridGeometry().feCache().get(element_->type()).localBasis();
457 return gridGeometry().feCache().get(element_->type()).localCoefficients();
475 return scvfs_.size();
486 return std::move(*
this);
503 return std::move(*
this);
513 elementGeometry_.emplace(
element.geometry());
514 makeElementGeometries_();
519 {
return static_cast<bool>(element_); }
523 {
return *element_; }
527 {
return *elementGeometry_; }
536 const auto localScvfIdx =
scvf.index() - GeometryHelper::numInteriorScvf(
element().type());
537 return scvfBoundaryGeometryKeys_[localScvfIdx][0];
542 {
return ggCache_->gridGeometry(); }
546 {
return ggCache_->gridGeometry(); }
550 {
return hasBoundaryScvf_; }
558 {
return boundaryFaces_[bfIdx]; }
564 return { Dune::GeometryTypes::cube(dim), GeometryHelper(*elementGeometry_).getScvCorners(
scv.indexInElement()) };
571 const GeometryHelper geometryHelper(*elementGeometry_);
574 const auto localBoundaryIndex =
scvf.index() - geometryHelper.numInteriorScvf();
575 const auto& key = scvfBoundaryGeometryKeys_[localBoundaryIndex];
576 return { Dune::GeometryTypes::cube(dim-1), geometryHelper.getBoundaryScvfCorners(key[0], key[1]) };
579 return { Dune::GeometryTypes::cube(dim-1), geometryHelper.getScvfCorners(
scvf.index()) };
588 typename BoundaryFace::Traits::CornerStorage corners;
589 for (
int i = 0; i < faceGeoInRef.corners(); ++i)
590 corners.push_back(elemGeo.global(faceGeoInRef.corner(i)));
591 return { faceGeoInRef.type(), corners };
597 const auto type = fvGeometry.element().type();
598 const auto& localKey = fvGeometry.gridGeometry().feCache().get(type).localCoefficients().localKey(
scv.localDofIndex());
604 template<
class LocalDof>
607 const auto type = fvGeometry.element().type();
608 const auto& localKey = fvGeometry.gridGeometry().feCache().get(type).localCoefficients().localKey(localDof.index());
609 const auto& localPos = DofHelper::localDofPosition(type, localKey);
619 [&] (
const typename Element::Geometry::GlobalCoordinate& pos) {
return fvGeometry.elementGeometry().local(pos); },
628 {
scvf.unitOuterNormal(),
scvf.index(), fvGeometry.elementGeometry().local(
scvf.ipGlobal()),
scvf.ipGlobal() };
632 void makeElementGeometries_()
634 hasBoundaryScvf_ =
false;
635 boundaryFaces_.clear();
636 boundaryFaceScvfRanges_.clear();
639 const auto& element = *element_;
640 const auto& elementGeometry = *elementGeometry_;
641 const auto refElement = referenceElement(elementGeometry);
644 GeometryHelper geometryHelper(elementGeometry);
647 scvs_.resize(elementGeometry.corners());
648 for (LocalIndexType scvLocalIdx = 0; scvLocalIdx < elementGeometry.corners(); ++scvLocalIdx)
651 const auto dofIdxGlobal = gridGeometry().vertexMapper().subIndex(element, scvLocalIdx, dim);
654 scvs_[scvLocalIdx] = SubControlVolume(
655 geometryHelper.getScvCorners(scvLocalIdx),
663 const auto numInnerScvf = geometryHelper.numInteriorScvf();
664 scvfs_.resize(numInnerScvf);
665 scvfBoundaryGeometryKeys_.clear();
667 LocalIndexType scvfLocalIdx = 0;
668 for (; scvfLocalIdx < numInnerScvf; ++scvfLocalIdx)
671 std::array<LocalIndexType, 2> localScvIndices{{
672 static_cast<LocalIndexType
>(refElement.subEntity(scvfLocalIdx, dim-1, 0, dim)),
673 static_cast<LocalIndexType
>(refElement.subEntity(scvfLocalIdx, dim-1, 1, dim))
676 const auto& corners = geometryHelper.getScvfCorners(scvfLocalIdx);
677 scvfs_[scvfLocalIdx] = SubControlVolumeFace(
679 geometryHelper.normal(corners, localScvIndices),
682 std::move(localScvIndices)
687 LocalIndexType numBoundaryFaces = 0;
688 for (
const auto& intersection : intersections(gridGeometry().gridView(), element))
690 if (intersection.boundary() && !intersection.neighbor())
692 const auto isGeometry = intersection.geometry();
693 hasBoundaryScvf_ =
true;
696 boundaryFaces_.push_back(BoundaryFace{
699 intersection.centerUnitOuterNormal(),
701 static_cast<LocalIndexType
>(intersection.indexInInside()),
702 typename BoundaryFace::Traits::BoundaryFlag{intersection}
706 boundaryFaceScvfRanges_.push_back(std::array<LocalIndexType, 2>{{
708 static_cast<LocalIndexType
>(isGeometry.corners())
711 for (
unsigned int isScvfLocalIdx = 0; isScvfLocalIdx < isGeometry.corners(); ++isScvfLocalIdx)
714 const LocalIndexType insideScvIdx =
static_cast<LocalIndexType
>(refElement.subEntity(intersection.indexInInside(), 1, isScvfLocalIdx, dim));
715 std::array<LocalIndexType, 2> localScvIndices{{insideScvIdx, insideScvIdx}};
718 geometryHelper.getBoundaryScvfCorners(intersection.indexInInside(), isScvfLocalIdx),
719 intersection.centerUnitOuterNormal(),
723 std::move(localScvIndices)
726 scvfBoundaryGeometryKeys_.emplace_back(std::array<LocalIndexType, 2>{{
727 static_cast<LocalIndexType
>(intersection.indexInInside()),
728 static_cast<LocalIndexType
>(isScvfLocalIdx)
740 std::optional<Element> element_;
741 std::optional<typename Element::Geometry> elementGeometry_;
744 const GGCache* ggCache_;
747 std::vector<SubControlVolume> scvs_;
748 std::vector<SubControlVolumeFace> scvfs_;
749 std::vector<std::array<LocalIndexType, 2>> scvfBoundaryGeometryKeys_;
750 Dune::ReservedVector<BoundaryFace, 2*dim> boundaryFaces_;
751 Dune::ReservedVector<std::array<LocalIndexType, 2>, 2*dim> boundaryFaceScvfRanges_;
753 bool hasBoundaryScvf_ =
false;
Helper class constructing the dual grid finite volume geometries for the box discretizazion method.
bool isBound() const
Returns true if bind/bindElement has already been called.
Definition discretization/box/fvelementgeometry.hh:518
std::size_t numScvf() const
The total number of sub control volume faces.
Definition discretization/box/fvelementgeometry.hh:473
GG GridGeometry
export type of finite volume grid geometry
Definition discretization/box/fvelementgeometry.hh:375
SubControlVolumeFace::Traits::Geometry geometry(const SubControlVolumeFace &scvf) const
Geometry of a sub control volume face.
Definition discretization/box/fvelementgeometry.hh:568
bool hasBoundaryScvf() const
Returns whether one of the geometry's scvfs lies on a boundary.
Definition discretization/box/fvelementgeometry.hh:549
friend Dune::IteratorRange< typename std::vector< SubControlVolume >::const_iterator > scvs(const BoxFVElementGeometry &fvGeometry)
Definition discretization/box/fvelementgeometry.hh:410
std::size_t numScv() const
The total number of sub control volumes.
Definition discretization/box/fvelementgeometry.hh:467
GridIndexType elementIndex() const
The bound element's index in the grid view.
Definition discretization/box/fvelementgeometry.hh:530
void bindElement(const Element &element) &
Definition discretization/box/fvelementgeometry.hh:509
std::size_t intersectionIndex(const SubControlVolumeFace &scvf) const
The intersection index the scvf belongs to.
Definition discretization/box/fvelementgeometry.hh:534
const SubControlVolumeFace & scvf(LocalIndexType scvfIdx) const
Get a sub control volume face with a local scvf index.
Definition discretization/box/fvelementgeometry.hh:399
BoxFVElementGeometry(const GGCache &ggCache)
Constructor.
Definition discretization/box/fvelementgeometry.hh:389
typename GG::ScvfQuadratureRule ScvfQuadratureRule
the quadrature rule type for scvfs
Definition discretization/box/fvelementgeometry.hh:381
SubControlVolume::Traits::Geometry geometry(const SubControlVolume &scv) const
Geometry of a sub control volume.
Definition discretization/box/fvelementgeometry.hh:561
const GridGeometry & gridGeometry() const
The grid geometry we are a restriction of.
Definition discretization/box/fvelementgeometry.hh:541
friend Dune::IteratorRange< typename std::vector< SubControlVolumeFace >::const_iterator > scvfs(const BoxFVElementGeometry &fvGeometry, const BoundaryFace &boundaryFace)
Definition discretization/box/fvelementgeometry.hh:431
typename GridView::template Codim< 0 >::Entity Element
export the element type
Definition discretization/box/fvelementgeometry.hh:369
friend Dune::IteratorRange< typename std::vector< SubControlVolumeFace >::const_iterator > scvfs(const BoxFVElementGeometry &fvGeometry)
Definition discretization/box/fvelementgeometry.hh:422
friend auto ipData(const BoxFVElementGeometry &fvGeometry, const SubControlVolume &scv)
Interpolation point data for an scv.
Definition discretization/box/fvelementgeometry.hh:595
BoundaryFace::Traits::Geometry geometry(const BoundaryFace &boundaryFace) const
Geometry of a boundary face.
Definition discretization/box/fvelementgeometry.hh:583
const FeLocalBasis & feLocalBasis() const
Get a local finite element basis.
Definition discretization/box/fvelementgeometry.hh:449
const Element & element() const
The bound element.
Definition discretization/box/fvelementgeometry.hh:522
const SubControlVolume & scv(LocalIndexType scvIdx) const
Get a sub control volume with a local scv index.
Definition discretization/box/fvelementgeometry.hh:393
friend auto ipData(const BoxFVElementGeometry &fvGeometry, const typename Element::Geometry::GlobalCoordinate &globalPos)
Interpolation point data for a global position.
Definition discretization/box/fvelementgeometry.hh:615
BoxFVElementGeometry bind(const Element &element) &&
bind the local view (r-value overload) This overload is called when an instance of this class is a te...
Definition discretization/box/fvelementgeometry.hh:483
friend auto ipData(const BoxFVElementGeometry &fvGeometry, const SubControlVolumeFace &scvf)
Interpolation point data for scvf.
Definition discretization/box/fvelementgeometry.hh:625
friend auto localDofs(const BoxFVElementGeometry &fvGeometry, const BoundaryFace &boundaryFace)
an iterator over all local dofs related to a boundary face
Definition discretization/box/fvelementgeometry.hh:445
friend auto ipData(const BoxFVElementGeometry &fvGeometry, const LocalDof &localDof)
Interpolation point data for a localDof.
Definition discretization/box/fvelementgeometry.hh:605
typename GG::ScvQuadratureRule ScvQuadratureRule
the quadrature rule type for scvs
Definition discretization/box/fvelementgeometry.hh:379
std::size_t numLocalDofs() const
The total number of element-local dofs.
Definition discretization/box/fvelementgeometry.hh:461
typename GG::BoundaryFace BoundaryFace
export the boundary face type
Definition discretization/box/fvelementgeometry.hh:377
friend std::ranges::view auto boundaryFaces(const BoxFVElementGeometry &fvGeometry)
Definition discretization/box/fvelementgeometry.hh:441
typename GG::SubControlVolumeFace SubControlVolumeFace
export type of subcontrol volume face
Definition discretization/box/fvelementgeometry.hh:373
const BoundaryFace & boundaryFace(LocalIndexType bfIdx) const
Get a boundary face with a local boundary face index.
Definition discretization/box/fvelementgeometry.hh:557
const auto & feLocalCoefficients() const
Get the local finite element coefficients.
Definition discretization/box/fvelementgeometry.hh:455
BoxFVElementGeometry bindElement(const Element &element) &&
bind the local view (r-value overload) This overload is called when an instance of this class is a te...
Definition discretization/box/fvelementgeometry.hh:500
const Element::Geometry & elementGeometry() const
The bound element geometry.
Definition discretization/box/fvelementgeometry.hh:526
bool hasBoundaryFaces() const
Returns whether the element has boundary faces.
Definition discretization/box/fvelementgeometry.hh:553
typename GG::SubControlVolume SubControlVolume
export type of subcontrol volume
Definition discretization/box/fvelementgeometry.hh:371
void bind(const Element &element) &
Definition discretization/box/fvelementgeometry.hh:492
static constexpr std::size_t maxNumElementScvs
the maximum number of scvs per element (2^dim for cubes)
Definition discretization/box/fvelementgeometry.hh:383
const GridGeometry & gridDiscretization() const
The grid discretization we are a restriction of.
Definition discretization/box/fvelementgeometry.hh:545
bool isBound() const
Returns true if bind/bindElement has already been called.
Definition discretization/box/fvelementgeometry.hh:225
const FeLocalBasis & feLocalBasis() const
Get a local finite element basis.
Definition discretization/box/fvelementgeometry.hh:156
BoundaryFace::Traits::Geometry geometry(const BoundaryFace &boundaryFace) const
Geometry of a boundary face.
Definition discretization/box/fvelementgeometry.hh:290
BoxFVElementGeometry bindElement(const Element &element) &&
bind the local view (r-value overload) This overload is called when an instance of this class is a te...
Definition discretization/box/fvelementgeometry.hh:207
const Element & element() const
The bound element.
Definition discretization/box/fvelementgeometry.hh:229
const GridGeometry & gridDiscretization() const
The grid discretization we are a restriction of.
Definition discretization/box/fvelementgeometry.hh:252
SubControlVolume::Traits::Geometry geometry(const SubControlVolume &scv) const
Geometry of a sub control volume.
Definition discretization/box/fvelementgeometry.hh:268
friend Dune::IteratorRange< typename std::vector< SubControlVolume >::const_iterator > scvs(const BoxFVElementGeometry &fvGeometry)
Definition discretization/box/fvelementgeometry.hh:111
bool hasBoundaryFaces() const
Returns whether the element has boundary faces.
Definition discretization/box/fvelementgeometry.hh:260
std::size_t numScv() const
The total number of sub control volumes.
Definition discretization/box/fvelementgeometry.hh:174
typename GG::BoundaryFace BoundaryFace
export the boundary face type
Definition discretization/box/fvelementgeometry.hh:78
const SubControlVolume & scv(LocalIndexType scvIdx) const
Get a sub control volume with a local scv index.
Definition discretization/box/fvelementgeometry.hh:94
std::size_t numLocalDofs() const
The total number of element-local dofs.
Definition discretization/box/fvelementgeometry.hh:168
std::size_t numScvf() const
The total number of sub control volume faces.
Definition discretization/box/fvelementgeometry.hh:180
typename GG::SubControlVolume SubControlVolume
export type of subcontrol volume
Definition discretization/box/fvelementgeometry.hh:72
const GridGeometry & gridGeometry() const
The grid geometry we are a restriction of.
Definition discretization/box/fvelementgeometry.hh:248
const auto & feLocalCoefficients() const
Get the local finite element coefficients.
Definition discretization/box/fvelementgeometry.hh:162
friend Dune::IteratorRange< typename std::vector< SubControlVolumeFace >::const_iterator > scvfs(const BoxFVElementGeometry &fvGeometry, const BoundaryFace &boundaryFace)
Definition discretization/box/fvelementgeometry.hh:134
bool hasBoundaryScvf() const
Returns whether one of the geometry's scvfs lies on a boundary.
Definition discretization/box/fvelementgeometry.hh:256
friend Dune::IteratorRange< typename std::vector< SubControlVolumeFace >::const_iterator > scvfs(const BoxFVElementGeometry &fvGeometry)
Definition discretization/box/fvelementgeometry.hh:124
friend auto ipData(const BoxFVElementGeometry &fvGeometry, const SubControlVolume &scv)
Interpolation point data for an scv.
Definition discretization/box/fvelementgeometry.hh:302
typename GG::ScvQuadratureRule ScvQuadratureRule
export the scv interpolation point data type
Definition discretization/box/fvelementgeometry.hh:80
const Element::Geometry & elementGeometry() const
The bound element geometry.
Definition discretization/box/fvelementgeometry.hh:233
void bind(const Element &element) &
Definition discretization/box/fvelementgeometry.hh:199
typename GG::ScvfQuadratureRule ScvfQuadratureRule
the quadrature rule type for scvfs
Definition discretization/box/fvelementgeometry.hh:82
std::size_t intersectionIndex(const SubControlVolumeFace &scvf) const
The intersection index the scvf belongs to.
Definition discretization/box/fvelementgeometry.hh:241
SubControlVolumeFace::Traits::Geometry geometry(const SubControlVolumeFace &scvf) const
Geometry of a sub control volume face.
Definition discretization/box/fvelementgeometry.hh:275
friend auto ipData(const BoxFVElementGeometry &fvGeometry, const typename Element::Geometry::GlobalCoordinate &globalPos)
Interpolation point data for a global position.
Definition discretization/box/fvelementgeometry.hh:322
GridIndexType elementIndex() const
The bound element's index in the grid view.
Definition discretization/box/fvelementgeometry.hh:237
friend auto ipData(const BoxFVElementGeometry &fvGeometry, const SubControlVolumeFace &scvf)
Interpolation point data for scvf.
Definition discretization/box/fvelementgeometry.hh:333
friend auto localDofs(const BoxFVElementGeometry &fvGeometry, const BoundaryFace &boundaryFace)
an iterator over all local dofs related to a boundary face
Definition discretization/box/fvelementgeometry.hh:152
friend auto ipData(const BoxFVElementGeometry &fvGeometry, const LocalDof &localDof)
Interpolation point data for a localDof.
Definition discretization/box/fvelementgeometry.hh:312
friend std::ranges::view auto boundaryFaces(const BoxFVElementGeometry &fvGeometry)
Definition discretization/box/fvelementgeometry.hh:145
const BoundaryFace & boundaryFace(LocalIndexType bfIdx) const
Get a boundary face with a local boundary face index.
Definition discretization/box/fvelementgeometry.hh:264
static constexpr std::size_t maxNumElementScvs
the maximum number of scvs per element (2^dim for cubes)
Definition discretization/box/fvelementgeometry.hh:84
typename GG::SubControlVolumeFace SubControlVolumeFace
export type of subcontrol volume face
Definition discretization/box/fvelementgeometry.hh:74
void bindElement(const Element &element) &
Definition discretization/box/fvelementgeometry.hh:216
const SubControlVolumeFace & scvf(LocalIndexType scvfIdx) const
Get a sub control volume face with a local scvf index.
Definition discretization/box/fvelementgeometry.hh:100
BoxFVElementGeometry(const GGCache &ggCache)
Constructor.
Definition discretization/box/fvelementgeometry.hh:90
BoxFVElementGeometry bind(const Element &element) &&
bind the local view (r-value overload) This overload is called when an instance of this class is a te...
Definition discretization/box/fvelementgeometry.hh:190
typename GridView::template Codim< 0 >::Entity Element
export the element type
Definition discretization/box/fvelementgeometry.hh:70
GG GridGeometry
export type of finite volume grid geometry
Definition discretization/box/fvelementgeometry.hh:76
Base class for the finite volume geometry vector for box models This builds up the sub control volume...
Definition discretization/box/fvelementgeometry.hh:46
An interpolation point related to a face of an element.
Definition cvfe/interpolationpointdata.hh:109
An interpolation point related to an element that includes global and local positions.
Definition cvfe/interpolationpointdata.hh:31
An interpolation point related to a global position of an element, giving its local positions by a ma...
Definition cvfe/interpolationpointdata.hh:82
An interpolation point related to a localDof of an element, giving its global and local positions.
Definition cvfe/interpolationpointdata.hh:60
Classes representing interpolation point data for control-volume finite element schemes.
Class representing dofs on elements for control-volume finite element schemes.
Quadrature rules over sub-control volumes and sub-control volume faces.
Class providing iterators over sub control volumes and sub control volume faces of an element.
typename GridView::IndexSet::IndexType GridIndex
Definition indextraits.hh:27
unsigned int LocalIndex
Definition indextraits.hh:28