24#ifndef DUMUX_DISCRETIZATION_FACECENTERED_STAGGERED_FV_GRID_GEOMETRY
25#define DUMUX_DISCRETIZATION_FACECENTERED_STAGGERED_FV_GRID_GEOMETRY
29#include <dune/common/rangeutilities.hh>
30#include <dune/grid/common/scsgmapper.hh>
58template<
class Gr
idView>
67 template<
class Gr
idGeometry>
70 template<
class Gr
idGeometry,
bool enableCache>
75 static constexpr auto dim = GridView::Grid::dimension;
93template<
class GridView,
94 bool cachingEnabled =
false,
104template<
class GV,
class Traits>
113 using Element =
typename GV::template Codim<0>::Entity;
115 using IntersectionMapper =
typename Traits::IntersectionMapper;
116 using ConnectivityMap =
typename Traits::template ConnectivityMap<ThisType>;
118 using Scalar =
typename GV::ctype;
120 static constexpr auto dim = Traits::StaticInfo::dim;
121 static constexpr auto numScvsPerElement = Traits::StaticInfo::numScvsPerElement;
122 static constexpr auto numLateralScvfsPerScv = Traits::StaticInfo::numLateralScvfsPerScv;
123 static constexpr auto numLateralScvfsPerElement = Traits::StaticInfo::numLateralScvfsPerElement;
124 static constexpr auto minNumScvfsPerElement = Traits::StaticInfo::minNumScvfsPerElement;
125 static constexpr auto maxNumScvfsPerElement = Traits::StaticInfo::maxNumScvfsPerElement;
127 using ScvfCornerStorage =
typename Traits::SubControlVolumeFace::Traits::CornerStorage;
128 using ScvCornerStorage =
typename Traits::SubControlVolume::Traits::CornerStorage;
158 : ParentType(std::move(gg))
159 , intersectionMapper_(this->
gridView())
163 DUNE_THROW(Dune::InvalidStateException,
"The staggered discretization method needs at least an overlap of 1 for parallel computations. "
164 <<
" Set the parameter \"Grid.Overlap\" in the input file.");
176 {
return scvs_.size(); }
180 {
return scvfs_.size(); }
184 {
return numBoundaryScv_; }
188 {
return numBoundaryScvf_; }
192 {
return intersectionMapper_.numIntersections(); }
196 {
return this->
gridView().size(1); }
214 {
return scvs_[scvIdx]; }
220 auto begin = scvs_.cbegin() + numScvsPerElement*fvGeometry.elementIndex();
221 const auto end = begin + numScvsPerElement;
222 return Dune::IteratorRange<std::decay_t<
decltype(begin)>>(begin, end);
227 {
return scvfs_[scvfIdx]; }
231 {
return scvfIndicesOfElement_[eIdx]; }
238 {
return connectivityMap_; }
242 {
return hasBoundaryScvf_[eIdx]; }
246 {
return intersectionMapper_; }
250 {
return periodicFaceMap_.count(dofIdx); }
254 {
return periodicFaceMap_.at(dofIdx); }
258 {
return periodicFaceMap_; }
267 scvfIndicesOfElement_.clear();
268 intersectionMapper_.update(this->gridView());
271 const auto numElements = this->gridView().size(0);
272 scvfIndicesOfElement_.resize(numElements);
273 hasBoundaryScvf_.resize(numElements,
false);
275 outSideBoundaryVolVarIdx_ = 0;
277 numBoundaryScvf_ = 0;
279 GeometryHelper geometryHelper(this->gridView());
282 GridIndexType numScvfs = 0;
283 for (
const auto& element : elements(this->gridView()))
285 assert(numScvsPerElement == element.subEntities(1));
287 for (
const auto& intersection : intersections(this->gridView(), element))
293 numScvfs += numLateralScvfsPerScv;
296 if (onDomainBoundary_(intersection))
299 numBoundaryScv_ += numLateralScvfsPerScv;
308 const auto numScvs = numElements*numScvsPerElement;
309 scvs_.resize(numScvs);
310 scvfs_.reserve(numScvfs);
313 std::size_t globalScvfIdx = 0;
314 for (
const auto& element : elements(this->gridView()))
316 const auto eIdx = this->elementMapper().index(element);
317 auto& globalScvfIndices = scvfIndicesOfElement_[eIdx];
318 globalScvfIndices.resize(minNumScvfsPerElement);
319 globalScvfIndices.reserve(maxNumScvfsPerElement);
321 auto getGlobalScvIdx = [&](
const auto elementIdx,
const auto localScvIdx)
322 {
return numScvsPerElement*elementIdx + localScvIdx; };
324 LocalIntersectionMapper localIsMapper;
325 localIsMapper.update(this->gridView(), element);
327 for (
const auto& intersection : intersections(this->gridView(), element))
329 const auto& intersectionUnitOuterNormal = intersection.centerUnitOuterNormal();
330 const auto localScvIdx = localIsMapper.realToRefIdx(intersection.indexInInside());
331 auto localScvfIdx = localScvIdx*(1 + numLateralScvfsPerScv);
333 const auto globalScvIdx = getGlobalScvIdx(eIdx, localScvIdx);
334 const auto dofIndex = intersectionMapper().globalIntersectionIndex(element, intersection.indexInInside());
335 const auto localOppositeScvIdx = geometryHelper.localOppositeIdx(localScvIdx);
336 const auto& intersectionGeometry = intersection.geometry();
337 const auto& elementGeometry =
element.geometry();
339 assert(localIsMapper.refToRealIdx(localScvIdx) == intersection.indexInInside());
342 if (onPeriodicBoundary_(intersection))
346 const auto& otherElement = intersection.outside();
348 SmallLocalIndexType otherIntersectionLocalIdx = 0;
349 bool periodicFaceFound =
false;
351 for (
const auto& otherIntersection : intersections(this->gridView(), otherElement))
353 if (periodicFaceFound)
356 if (Dune::FloatCmp::eq(intersectionUnitOuterNormal*otherIntersection.centerUnitOuterNormal(), -1.0, 1e-7))
358 const auto periodicDofIdx = intersectionMapper().globalIntersectionIndex(otherElement, otherIntersectionLocalIdx);
359 periodicFaceMap_[dofIndex] = periodicDofIdx;
360 periodicFaceFound =
true;
363 ++otherIntersectionLocalIdx;
368 scvs_[globalScvIdx] = SubControlVolume(
370 intersectionGeometry,
375 this->elementMapper().index(element),
376 onDomainBoundary_(intersection)
380 scvfs_.emplace_back(elementGeometry,
381 intersectionGeometry,
382 std::array{globalScvIdx, getGlobalScvIdx(eIdx, localOppositeScvIdx)},
385 intersectionUnitOuterNormal,
386 SubControlVolumeFace::FaceType::frontal,
387 SubControlVolumeFace::BoundaryType::interior
390 globalScvfIndices[localScvfIdx] = globalScvfIdx++;
394 for (
const auto lateralFacetIndex : Dune::transformedRangeView(geometryHelper.localLaterFaceIndices(localScvIdx),
395 [&](
auto&& idx) { return localIsMapper.refToRealIdx(idx) ;})
398 const auto& lateralIntersection = geometryHelper.intersection(lateralFacetIndex, element);
401 const auto globalScvIndicesForLateralFace = [&]
403 const auto globalOutsideScvIdx = [&]
405 if (lateralIntersection.neighbor())
407 const auto parallelElemIdx = this->elementMapper().index(lateralIntersection.outside());
408 return getGlobalScvIdx(parallelElemIdx, localScvIdx);
410 else if (onDomainBoundary_(lateralIntersection))
411 return numScvs + outSideBoundaryVolVarIdx_++;
416 return std::array{globalScvIdx, globalOutsideScvIdx};
419 const auto boundaryType = [&]
421 if (onProcessorBoundary_(lateralIntersection))
422 return SubControlVolumeFace::BoundaryType::processorBoundary;
423 else if (onDomainBoundary_(lateralIntersection))
424 return SubControlVolumeFace::BoundaryType::physicalBoundary;
426 return SubControlVolumeFace::BoundaryType::interior;
431 intersectionGeometry,
432 geometryHelper.facet(lateralFacetIndex, element).geometry(),
433 globalScvIndicesForLateralFace,
436 lateralIntersection.centerUnitOuterNormal(),
437 SubControlVolumeFace::FaceType::lateral,
441 globalScvfIndices[localScvfIdx] = globalScvfIdx++;
444 if (onDomainBoundary_(lateralIntersection))
447 hasBoundaryScvf_[eIdx] =
true;
454 int localScvfIdx = minNumScvfsPerElement;
455 for (
const auto& intersection : intersections(this->gridView(), element))
458 if (onDomainBoundary_(intersection))
460 const auto localScvIdx = localIsMapper.realToRefIdx(intersection.indexInInside());
461 const auto globalScvIdx = getGlobalScvIdx(eIdx, localScvIdx);
467 intersection.geometry(),
468 std::array{globalScvIdx, globalScvIdx},
471 intersection.centerUnitOuterNormal(),
472 SubControlVolumeFace::FaceType::frontal,
473 SubControlVolumeFace::BoundaryType::physicalBoundary
476 globalScvfIndices.push_back(globalScvfIdx);
479 hasBoundaryScvf_[eIdx] =
true;
484 connectivityMap_.update(*
this);
487 bool onDomainBoundary_(
const typename GridView::Intersection& intersection)
const
489 return !intersection.neighbor() && intersection.boundary();
492 bool onProcessorBoundary_(
const typename GridView::Intersection& intersection)
const
494 return !intersection.neighbor() && !intersection.boundary();
497 bool onPeriodicBoundary_(
const typename GridView::Intersection& intersection)
const
499 return intersection.boundary() && intersection.neighbor();
503 ConnectivityMap connectivityMap_;
504 IntersectionMapper intersectionMapper_;
506 std::vector<SubControlVolume> scvs_;
507 std::vector<SubControlVolumeFace> scvfs_;
508 GridIndexType numBoundaryScv_;
509 GridIndexType numBoundaryScvf_;
510 GridIndexType outSideBoundaryVolVarIdx_;
511 std::vector<bool> hasBoundaryScvf_;
513 std::vector<std::vector<GridIndexType>> scvfIndicesOfElement_;
516 std::unordered_map<GridIndexType, GridIndexType> periodicFaceMap_;
525template<
class GV,
class Traits>
534 using Element =
typename GV::template Codim<0>::Entity;
536 using IntersectionMapper =
typename Traits::IntersectionMapper;
537 using ConnectivityMap =
typename Traits::template ConnectivityMap<ThisType>;
539 static constexpr auto dim = Traits::StaticInfo::dim;
540 static constexpr auto numScvsPerElement = Traits::StaticInfo::numScvsPerElement;
541 static constexpr auto numLateralScvfsPerScv = Traits::StaticInfo::numLateralScvfsPerScv;
542 static constexpr auto numLateralScvfsPerElement = Traits::StaticInfo::numLateralScvfsPerElement;
543 static constexpr auto minNumScvfsPerElement = Traits::StaticInfo::minNumScvfsPerElement;
544 static constexpr auto maxNumScvfsPerElement = Traits::StaticInfo::maxNumScvfsPerElement;
574 : ParentType(std::move(gg))
575 , intersectionMapper_(this->
gridView())
579 DUNE_THROW(Dune::InvalidStateException,
"The staggered discretization method needs at least an overlap of 1 for parallel computations. "
580 <<
" Set the parameter \"Grid.Overlap\" in the input file.");
600 {
return numBoundaryScv_; }
604 {
return numBoundaryScvf_; }
608 {
return intersectionMapper_.numIntersections(); }
612 {
return this->
gridView().size(1); }
619 {
return connectivityMap_; }
623 {
return hasBoundaryScvf_[eIdx]; }
627 {
return intersectionMapper_; }
631 {
return scvfIndicesOfElement_[eIdx]; }
635 {
return outsideVolVarIndices_.at(scvfIdx); }
653 {
return periodicFaceMap_.count(dofIdx); }
657 {
return periodicFaceMap_.at(dofIdx); }
661 {
return periodicFaceMap_; }
667 intersectionMapper_.update(this->gridView());
672 numBoundaryScvf_ = 0;
673 hasBoundaryScvf_.clear();
674 scvfIndicesOfElement_.clear();
675 outsideVolVarIndices_.clear();
678 const auto numElements = this->gridView().size(0);
679 scvfIndicesOfElement_.resize(numElements);
680 hasBoundaryScvf_.resize(numElements,
false);
681 numScvs_ = numElements*numScvsPerElement;
683 GeometryHelper geometryHelper(this->gridView());
686 GridIndexType scvfIdx = 0;
688 GridIndexType neighborVolVarIdx = numScvs_;
690 for (
const auto& element : elements(this->gridView()))
692 const auto eIdx = this->elementMapper().index(element);
693 assert(numScvsPerElement == element.subEntities(1));
696 auto& globalScvfIndices = scvfIndicesOfElement_[eIdx];
697 globalScvfIndices.reserve(maxNumScvfsPerElement);
698 globalScvfIndices.resize(minNumScvfsPerElement);
701 std::size_t numFrontalBoundaryScvfs = 0;
704 LocalIntersectionIndexMapper localIsMapper;
705 localIsMapper.update(this->gridView(), element);
707 for (
const auto& intersection : intersections(this->gridView(), element))
709 const auto localScvIdx = localIsMapper.realToRefIdx(intersection.indexInInside());
710 auto localScvfIdx = localScvIdx*(1 + numLateralScvfsPerScv);
712 assert(localIsMapper.refToRealIdx(localScvIdx) == intersection.indexInInside());
714 globalScvfIndices[localScvfIdx] = scvfIdx++;
717 if constexpr(dim > 1)
720 for (
const auto lateralFacetIndex : Dune::transformedRangeView(geometryHelper.localLaterFaceIndices(localScvIdx),
721 [&](
auto idx) { return localIsMapper.refToRealIdx(idx) ;})
724 if (onDomainBoundary_(geometryHelper.intersection(lateralFacetIndex, element)))
726 outsideVolVarIndices_[scvfIdx] = neighborVolVarIdx++;
728 hasBoundaryScvf_[eIdx] =
true;
731 globalScvfIndices[localScvfIdx] = scvfIdx++;
737 if (onDomainBoundary_(intersection))
740 numBoundaryScv_ += numLateralScvfsPerScv;
741 ++numFrontalBoundaryScvfs;
743 hasBoundaryScvf_[eIdx] =
true;
747 if (onPeriodicBoundary_(intersection))
751 const auto& otherElement = intersection.outside();
753 SmallLocalIndexType otherIntersectionLocalIdx = 0;
754 bool periodicFaceFound =
false;
756 for (
const auto& otherIntersection : intersections(this->gridView(), otherElement))
758 if (periodicFaceFound)
761 if (Dune::FloatCmp::eq(intersection.centerUnitOuterNormal()*otherIntersection.centerUnitOuterNormal(), -1.0, 1e-7))
763 const auto periodicDofIdx = intersectionMapper().globalIntersectionIndex(otherElement, otherIntersectionLocalIdx);
764 const auto dofIndex = intersectionMapper().globalIntersectionIndex(element, localScvIdx);
765 periodicFaceMap_[dofIndex] = periodicDofIdx;
766 periodicFaceFound =
true;
769 ++otherIntersectionLocalIdx;
775 for (std::size_t i = 0; i < numFrontalBoundaryScvfs; ++i)
776 globalScvfIndices.push_back(scvfIdx++);
782 connectivityMap_.update(*
this);
785 bool onDomainBoundary_(
const typename GridView::Intersection& intersection)
const
787 return !intersection.neighbor() && intersection.boundary();
790 bool onProcessorBoundary_(
const typename GridView::Intersection& intersection)
const
792 return !intersection.neighbor() && !intersection.boundary();
795 bool onPeriodicBoundary_(
const typename GridView::Intersection& intersection)
const
797 return intersection.boundary() && intersection.neighbor();
801 ConnectivityMap connectivityMap_;
802 IntersectionMapper intersectionMapper_;
805 std::size_t numScvs_;
806 std::size_t numScvf_;
807 std::size_t numBoundaryScv_;
808 std::size_t numBoundaryScvf_;
809 std::vector<bool> hasBoundaryScvf_;
811 std::vector<std::vector<GridIndexType>> scvfIndicesOfElement_;
814 std::unordered_map<GridIndexType, GridIndexType> periodicFaceMap_;
815 std::unordered_map<GridIndexType, GridIndexType> outsideVolVarIndices_;
Defines the default element and vertex mapper types.
defines intersection mappers.
Defines the index types used for grid and local indices.
Define some often used mathematical functions.
Check the overlap size for different discretization methods.
Provides a mapping of local intersection indices (indexInInside) such that the local indices always f...
Base class for the finite volume geometry vector for face-centered staggered models This builds up th...
Base class for grid geometries.
Helper classes to compute the integration elements.
The available discretization methods in Dumux.
Dune::Std::detected_or_t< Dumux::BasicGridGeometry< GV, typename T::ElementMapper, typename T::VertexMapper >, Detail::SpecifiesBaseGridGeometry, T > BasicGridGeometry_t
Type of the basic grid geometry implementation used as backend.
Definition basegridgeometry.hh:47
BaseGridGeometry(std::shared_ptr< BaseImplementation > impl)
Constructor from a BaseImplementation.
Definition basegridgeometry.hh:81
Detail::FaceCenteredStaggeredLocalIntersectionIndexMapper< GridView, ConsistentlyOrientedGrid< typename GridView::Grid >{}> FaceCenteredStaggeredLocalIntersectionIndexMapper
Provides a mapping of local intersection indices (indexInInside) such that the local indices always f...
Definition localintersectionindexmapper.hh:128
static std::size_t normalAxis(const Vector &v)
Returns the normal axis index of a unit vector (0 = x, 1 = y, 2 = z).
Definition normalaxis.hh:38
@ element
Definition fieldtype.hh:35
Adaption of the non-isothermal two-phase two-component flow model to problems with CO2.
Definition adapt.hh:29
typename Extrusion< T >::type Extrusion_t
Convenience alias for obtaining the extrusion type.
Definition extrusion.hh:251
Definition defaultmappertraits.hh:35
typename GridView::IndexSet::IndexType GridIndex
Definition indextraits.hh:39
std::uint_least8_t SmallLocalIndex
Definition indextraits.hh:41
unsigned int LocalIndex
Definition indextraits.hh:40
defines a standard intersection mapper for mapping of global DOFs assigned to faces....
Definition intersectionmapper.hh:41
const GridView & gridView() const
Return the gridView this grid geometry object lives on.
Definition basegridgeometry.hh:109
void update(const GridView &gridView)
Update all fvElementGeometries (call this after grid adaption).
Definition basegridgeometry.hh:97
static bool isValid(const GridView &gridView) noexcept
Definition checkoverlapsize.hh:42
Stores the dof indices corresponding to the neighboring scvs that contribute to the derivative calcul...
Definition facecentered/staggered/connectivitymap.hh:42
Definition discretization/facecentered/staggered/fvelementgeometry.hh:42
The default traits for the face-center staggered finite volume grid geometry Defines the scv and scvf...
Definition discretization/facecentered/staggered/fvgridgeometry.hh:60
ConformingGridIntersectionMapper< GridView > IntersectionMapper
Definition discretization/facecentered/staggered/fvgridgeometry.hh:63
FaceCenteredStaggeredGeometryHelper< GridView > GeometryHelper
Definition discretization/facecentered/staggered/fvgridgeometry.hh:65
FaceCenteredStaggeredFVElementGeometry< GridGeometry, enableCache > LocalView
Definition discretization/facecentered/staggered/fvgridgeometry.hh:71
FaceCenteredStaggeredSubControlVolumeFace< GridView > SubControlVolumeFace
Definition discretization/facecentered/staggered/fvgridgeometry.hh:62
FaceCenteredStaggeredConnectivityMap< GridGeometry > ConnectivityMap
Definition discretization/facecentered/staggered/fvgridgeometry.hh:68
FaceCenteredStaggeredSubControlVolume< GridView > SubControlVolume
Definition discretization/facecentered/staggered/fvgridgeometry.hh:61
FaceCenteredStaggeredLocalIntersectionIndexMapper< GridView > LocalIntersectionMapper
Definition discretization/facecentered/staggered/fvgridgeometry.hh:64
Definition discretization/facecentered/staggered/fvgridgeometry.hh:74
static constexpr auto numLateralScvfsPerElement
Definition discretization/facecentered/staggered/fvgridgeometry.hh:79
static constexpr auto maxNumScvfsPerElement
Definition discretization/facecentered/staggered/fvgridgeometry.hh:82
static constexpr auto numScvsPerElement
Definition discretization/facecentered/staggered/fvgridgeometry.hh:77
static constexpr auto numFacesPerElement
Definition discretization/facecentered/staggered/fvgridgeometry.hh:76
static constexpr auto dim
Definition discretization/facecentered/staggered/fvgridgeometry.hh:75
static constexpr auto numLateralScvfsPerScv
Definition discretization/facecentered/staggered/fvgridgeometry.hh:78
static constexpr auto minNumScvfsPerElement
Definition discretization/facecentered/staggered/fvgridgeometry.hh:80
Base class for the finite volume geometry vector for face-centered staggered models This builds up th...
Definition discretization/facecentered/staggered/fvgridgeometry.hh:96
const ConnectivityMap & connectivityMap() const
Returns the connectivity map of which dofs have derivatives with respect to a given dof.
Definition discretization/facecentered/staggered/fvgridgeometry.hh:237
std::size_t numScvf() const
The total number of sub control volume faces.
Definition discretization/facecentered/staggered/fvgridgeometry.hh:179
const IntersectionMapper & intersectionMapper() const
Return a reference to the intersection mapper.
Definition discretization/facecentered/staggered/fvgridgeometry.hh:245
bool hasBoundaryScvf(GridIndexType eIdx) const
Returns whether one of the geometry's scvfs lies on a boundary.
Definition discretization/facecentered/staggered/fvgridgeometry.hh:241
void update(const GridView &gridView)
update all fvElementGeometries (call this after grid adaption)
Definition discretization/facecentered/staggered/fvgridgeometry.hh:199
typename Traits::SubControlVolumeFace SubControlVolumeFace
export the type of sub control volume
Definition discretization/facecentered/staggered/fvgridgeometry.hh:144
typename Traits::LocalIntersectionMapper LocalIntersectionMapper
export the local intersection mapper
Definition discretization/facecentered/staggered/fvgridgeometry.hh:150
typename Traits::GeometryHelper GeometryHelper
export the geometry helper type
Definition discretization/facecentered/staggered/fvgridgeometry.hh:148
const std::vector< GridIndexType > & scvfIndicesOfElement(GridIndexType eIdx) const
Get the global sub control volume face indices of an element.
Definition discretization/facecentered/staggered/fvgridgeometry.hh:230
FaceCenteredStaggeredFVGridGeometry(std::shared_ptr< BasicGridGeometry > gg, const std::string ¶mGroup="")
Constructor with basic grid geometry used to share state with another grid geometry on the same grid ...
Definition discretization/facecentered/staggered/fvgridgeometry.hh:157
typename Traits::StaticInfo StaticInformation
export static information
Definition discretization/facecentered/staggered/fvgridgeometry.hh:152
static constexpr bool cachingEnabled
Definition discretization/facecentered/staggered/fvgridgeometry.hh:135
std::size_t numDofs() const
the total number of dofs
Definition discretization/facecentered/staggered/fvgridgeometry.hh:195
const std::unordered_map< GridIndexType, GridIndexType > & periodicVertexMap() const
Returns the map between dofs across periodic boundaries // TODO rename to periodic dof map in fvassem...
Definition discretization/facecentered/staggered/fvgridgeometry.hh:257
std::size_t numBoundaryScv() const
The total number of boundary sub control volumes.
Definition discretization/facecentered/staggered/fvgridgeometry.hh:183
FaceCenteredStaggeredFVGridGeometry(const GridView &gridView, const std::string ¶mGroup="")
Constructor from gridView.
Definition discretization/facecentered/staggered/fvgridgeometry.hh:170
GridIndexType periodicallyMappedDof(GridIndexType dofIdx) const
The index of the d.o.f. on the other side of the periodic boundary.
Definition discretization/facecentered/staggered/fvgridgeometry.hh:253
GV GridView
export the grid view type
Definition discretization/facecentered/staggered/fvgridgeometry.hh:146
static constexpr DiscretizationMethod discMethod
Definition discretization/facecentered/staggered/fvgridgeometry.hh:133
const SubControlVolume & scv(GridIndexType scvIdx) const
Get a sub control volume with a global scv index.
Definition discretization/facecentered/staggered/fvgridgeometry.hh:213
typename Traits::SubControlVolume SubControlVolume
export the type of sub control volume
Definition discretization/facecentered/staggered/fvgridgeometry.hh:142
typename Traits::template LocalView< ThisType, true > LocalView
export the type of the fv element geometry (the local view type)
Definition discretization/facecentered/staggered/fvgridgeometry.hh:140
void update(GridView &&gridView)
update all fvElementGeometries (call this after grid adaption)
Definition discretization/facecentered/staggered/fvgridgeometry.hh:206
BasicGridGeometry_t< GV, Traits > BasicGridGeometry
export basic grid geometry type for the alternative constructor
Definition discretization/facecentered/staggered/fvgridgeometry.hh:138
Extrusion_t< Traits > Extrusion
export the type of extrusion
Definition discretization/facecentered/staggered/fvgridgeometry.hh:154
std::size_t numBoundaryScvf() const
The total number of boundary sub control volume faces.
Definition discretization/facecentered/staggered/fvgridgeometry.hh:187
std::size_t numIntersections() const
The total number of intersections.
Definition discretization/facecentered/staggered/fvgridgeometry.hh:191
const SubControlVolumeFace & scvf(GridIndexType scvfIdx) const
Get a sub control volume face with a global scvf index.
Definition discretization/facecentered/staggered/fvgridgeometry.hh:226
bool dofOnPeriodicBoundary(GridIndexType dofIdx) const
If a d.o.f. is on a periodic boundary.
Definition discretization/facecentered/staggered/fvgridgeometry.hh:249
std::size_t numScv() const
The total number of sub control volumes.
Definition discretization/facecentered/staggered/fvgridgeometry.hh:175
auto scvs(const LocalView &fvGeometry) const
Definition discretization/facecentered/staggered/fvgridgeometry.hh:218
DiscretizationMethods::FCStaggered DiscretizationMethod
export the discretization method this geometry belongs to
Definition discretization/facecentered/staggered/fvgridgeometry.hh:132
typename Traits::SubControlVolumeFace SubControlVolumeFace
export the type of sub control volume
Definition discretization/facecentered/staggered/fvgridgeometry.hh:560
typename Traits::GeometryHelper GeometryHelper
export the geometry helper type
Definition discretization/facecentered/staggered/fvgridgeometry.hh:564
FaceCenteredStaggeredFVGridGeometry(std::shared_ptr< BasicGridGeometry > gg, const std::string ¶mGroup="")
Constructor with basic grid geometry used to share state with another grid geometry on the same grid ...
Definition discretization/facecentered/staggered/fvgridgeometry.hh:573
typename Traits::SubControlVolume SubControlVolume
export the type of sub control volume
Definition discretization/facecentered/staggered/fvgridgeometry.hh:558
std::size_t numDofs() const
the total number of dofs
Definition discretization/facecentered/staggered/fvgridgeometry.hh:611
GridIndexType periodicallyMappedDof(GridIndexType dofIdx) const
The index of the d.o.f. on the other side of the periodic boundary.
Definition discretization/facecentered/staggered/fvgridgeometry.hh:656
const ConnectivityMap & connectivityMap() const
Returns the connectivity map of which dofs have derivatives with respect to a given dof.
Definition discretization/facecentered/staggered/fvgridgeometry.hh:618
std::size_t numBoundaryScv() const
The total number of boundary sub control volumes.
Definition discretization/facecentered/staggered/fvgridgeometry.hh:599
const IntersectionMapper & intersectionMapper() const
Return a reference to the intersection mapper.
Definition discretization/facecentered/staggered/fvgridgeometry.hh:626
void update(GridView &&gridView)
update all fvElementGeometries (call this after grid adaption)
Definition discretization/facecentered/staggered/fvgridgeometry.hh:645
FaceCenteredStaggeredFVGridGeometry(const GridView &gridView, const std::string ¶mGroup="")
Constructor from gridView.
Definition discretization/facecentered/staggered/fvgridgeometry.hh:586
bool dofOnPeriodicBoundary(GridIndexType dofIdx) const
If a d.o.f. is on a periodic boundary.
Definition discretization/facecentered/staggered/fvgridgeometry.hh:652
typename Traits::StaticInfo StaticInformation
export static information
Definition discretization/facecentered/staggered/fvgridgeometry.hh:568
const std::vector< GridIndexType > & scvfIndicesOfElement(GridIndexType eIdx) const
Get the global sub control volume face indices of an element.
Definition discretization/facecentered/staggered/fvgridgeometry.hh:630
bool hasBoundaryScvf(GridIndexType eIdx) const
Returns whether one of the geometry's scvfs lies on a boundary.
Definition discretization/facecentered/staggered/fvgridgeometry.hh:622
const std::unordered_map< GridIndexType, GridIndexType > & periodicVertexMap() const
Returns the map between dofs across periodic boundaries // TODO rename to periodic dof map in fvassem...
Definition discretization/facecentered/staggered/fvgridgeometry.hh:660
std::size_t numScvf() const
The total number of sub control volume faces.
Definition discretization/facecentered/staggered/fvgridgeometry.hh:595
BasicGridGeometry_t< GV, Traits > BasicGridGeometry
export basic grid geometry type for the alternative constructor
Definition discretization/facecentered/staggered/fvgridgeometry.hh:554
std::size_t numBoundaryScvf() const
The total number of boundary sub control volume faces.
Definition discretization/facecentered/staggered/fvgridgeometry.hh:603
std::size_t numScv() const
The total number of sub control volumes.
Definition discretization/facecentered/staggered/fvgridgeometry.hh:591
GV GridView
export the grid view type
Definition discretization/facecentered/staggered/fvgridgeometry.hh:562
typename Traits::LocalIntersectionMapper LocalIntersectionMapper
export the local intersection mapper
Definition discretization/facecentered/staggered/fvgridgeometry.hh:566
GridIndexType outsideVolVarIndex(GridIndexType scvfIdx) const
Get the global sub control volume face indices of an element.
Definition discretization/facecentered/staggered/fvgridgeometry.hh:634
static constexpr DiscretizationMethod discMethod
Definition discretization/facecentered/staggered/fvgridgeometry.hh:549
DiscretizationMethods::FCStaggered DiscretizationMethod
export the discretization method this geometry belongs to
Definition discretization/facecentered/staggered/fvgridgeometry.hh:548
void update(const GridView &gridView)
update all fvElementGeometries (call this after grid adaption)
Definition discretization/facecentered/staggered/fvgridgeometry.hh:638
std::size_t numIntersections() const
The total number of intersections.
Definition discretization/facecentered/staggered/fvgridgeometry.hh:607
Extrusion_t< Traits > Extrusion
export the type of extrusion
Definition discretization/facecentered/staggered/fvgridgeometry.hh:570
static constexpr bool cachingEnabled
Definition discretization/facecentered/staggered/fvgridgeometry.hh:551
typename Traits::template LocalView< ThisType, false > LocalView
export the type of the fv element geometry (the local view type)
Definition discretization/facecentered/staggered/fvgridgeometry.hh:556
Face centered staggered geometry helper.
Definition discretization/facecentered/staggered/geometryhelper.hh:40
Face centered staggered sub control volume.
Definition discretization/facecentered/staggered/subcontrolvolume.hh:64
Face centered staggered sub control volume face.
Definition discretization/facecentered/staggered/subcontrolvolumeface.hh:67
Face centered staggered sub control volume.
Face centered staggered sub control volume face.
Stores the dof indices corresponding to the neighboring scvs that contribute to the derivative calcul...
Geometry helper for face-centered staggered scheme.