12#ifndef DUMUX_DISCRETIZATION_FACECENTERED_STAGGERED_FV_GRID_GEOMETRY
13#define DUMUX_DISCRETIZATION_FACECENTERED_STAGGERED_FV_GRID_GEOMETRY
17#include <dune/common/rangeutilities.hh>
18#include <dune/grid/common/scsgmapper.hh>
46template<
class Gr
idView>
55 template<
class Gr
idGeometry>
58 template<
class Gr
idGeometry,
bool enableCache>
63 static constexpr auto dim = GridView::Grid::dimension;
81template<
class GridView,
82 bool cachingEnabled =
false,
92template<
class GV,
class Traits>
101 using Element =
typename GV::template Codim<0>::Entity;
103 using IntersectionMapper =
typename Traits::IntersectionMapper;
104 using ConnectivityMap =
typename Traits::template ConnectivityMap<ThisType>;
106 using Scalar =
typename GV::ctype;
108 static constexpr auto dim = Traits::StaticInfo::dim;
109 static constexpr auto numScvsPerElement = Traits::StaticInfo::numScvsPerElement;
110 static constexpr auto numLateralScvfsPerScv = Traits::StaticInfo::numLateralScvfsPerScv;
111 static constexpr auto numLateralScvfsPerElement = Traits::StaticInfo::numLateralScvfsPerElement;
112 static constexpr auto minNumScvfsPerElement = Traits::StaticInfo::minNumScvfsPerElement;
113 static constexpr auto maxNumScvfsPerElement = Traits::StaticInfo::maxNumScvfsPerElement;
115 using ScvfCornerStorage =
typename Traits::SubControlVolumeFace::Traits::CornerStorage;
116 using ScvCornerStorage =
typename Traits::SubControlVolume::Traits::CornerStorage;
123 static constexpr bool cachingEnabled =
true;
147 , intersectionMapper_(this->gridView())
151 DUNE_THROW(Dune::InvalidStateException,
"The staggered discretization method needs overlap of exactly 1 for parallel computations. "
152 <<
" Set the parameter \"Grid.Overlap\" in the input file.");
164 {
return scvs_.size(); }
168 {
return scvfs_.size(); }
172 {
return numBoundaryScv_; }
176 {
return numBoundaryScvf_; }
180 {
return intersectionMapper_.numIntersections(); }
184 {
return this->gridView().size(1); }
189 ParentType::update(gridView);
196 ParentType::update(std::move(gridView));
202 {
return scvs_[scvIdx]; }
208 auto begin = scvs_.cbegin() + numScvsPerElement*fvGeometry.elementIndex();
209 const auto end = begin + numScvsPerElement;
210 return Dune::IteratorRange<std::decay_t<
decltype(begin)>>(begin, end);
215 {
return scvfs_[scvfIdx]; }
219 {
return scvfIndicesOfElement_[eIdx]; }
226 {
return connectivityMap_; }
230 {
return hasBoundaryScvf_[eIdx]; }
234 {
return intersectionMapper_; }
238 {
return periodicFaceMap_.count(dofIdx); }
242 {
return periodicFaceMap_.at(dofIdx); }
246 {
return periodicFaceMap_; }
249 [[deprecated(
"Will be removed after release 3.9. Use periodicDofMap() instead.")]]
251 {
return periodicDofMap(); }
260 scvfIndicesOfElement_.clear();
261 intersectionMapper_.update(this->gridView());
264 const auto numElements = this->gridView().size(0);
265 scvfIndicesOfElement_.resize(numElements);
266 hasBoundaryScvf_.resize(numElements,
false);
268 outSideBoundaryVolVarIdx_ = 0;
270 numBoundaryScvf_ = 0;
272 GeometryHelper geometryHelper(this->gridView());
275 GridIndexType numScvfs = 0;
276 for (
const auto& element : elements(this->gridView()))
278 assert(numScvsPerElement == element.subEntities(1));
280 for (
const auto& intersection : intersections(this->gridView(), element))
286 numScvfs += numLateralScvfsPerScv;
289 if (onDomainBoundary_(intersection))
292 numBoundaryScv_ += numLateralScvfsPerScv;
301 const auto numScvs = numElements*numScvsPerElement;
302 scvs_.resize(numScvs);
303 scvfs_.reserve(numScvfs);
306 std::size_t globalScvfIdx = 0;
307 for (
const auto& element : elements(this->gridView()))
309 const auto eIdx = this->elementMapper().index(element);
310 auto& globalScvfIndices = scvfIndicesOfElement_[eIdx];
311 globalScvfIndices.resize(minNumScvfsPerElement);
312 globalScvfIndices.reserve(maxNumScvfsPerElement);
314 auto getGlobalScvIdx = [&](
const auto elementIdx,
const auto localScvIdx)
315 {
return numScvsPerElement*elementIdx + localScvIdx; };
317 LocalIntersectionMapper localIsMapper;
318 localIsMapper.update(this->gridView(), element);
320 for (
const auto& intersection : intersections(this->gridView(), element))
322 const auto& intersectionUnitOuterNormal = intersection.centerUnitOuterNormal();
323 const auto localScvIdx = localIsMapper.realToRefIdx(intersection.indexInInside());
324 auto localScvfIdx = localScvIdx*(1 + numLateralScvfsPerScv);
326 const auto globalScvIdx = getGlobalScvIdx(eIdx, localScvIdx);
327 const auto dofIndex = intersectionMapper().globalIntersectionIndex(element, intersection.indexInInside());
328 const auto localOppositeScvIdx = geometryHelper.localOppositeIdx(localScvIdx);
329 const auto& intersectionGeometry = intersection.geometry();
330 const auto& elementGeometry =
element.geometry();
332 assert(localIsMapper.refToRealIdx(localScvIdx) == intersection.indexInInside());
335 if (onPeriodicBoundary_(intersection))
339 const auto& otherElement = intersection.outside();
341 SmallLocalIndexType otherIntersectionLocalIdx = 0;
342 bool periodicFaceFound =
false;
344 for (
const auto& otherIntersection : intersections(this->gridView(), otherElement))
346 if (periodicFaceFound)
349 if (Dune::FloatCmp::eq(intersectionUnitOuterNormal*otherIntersection.centerUnitOuterNormal(), -1.0, 1e-7))
351 const auto periodicDofIdx = intersectionMapper().globalIntersectionIndex(otherElement, otherIntersectionLocalIdx);
352 periodicFaceMap_[dofIndex] = periodicDofIdx;
353 periodicFaceFound =
true;
356 ++otherIntersectionLocalIdx;
361 scvs_[globalScvIdx] = SubControlVolume(
363 intersectionGeometry,
368 this->elementMapper().index(element),
369 onDomainBoundary_(intersection)
373 scvfs_.emplace_back(elementGeometry,
374 intersectionGeometry,
375 std::array{globalScvIdx, getGlobalScvIdx(eIdx, localOppositeScvIdx)},
378 intersectionUnitOuterNormal,
379 SubControlVolumeFace::FaceType::frontal,
380 SubControlVolumeFace::BoundaryType::interior
383 globalScvfIndices[localScvfIdx] = globalScvfIdx++;
387 for (
const auto lateralFacetIndex : Dune::transformedRangeView(geometryHelper.localLaterFaceIndices(localScvIdx),
388 [&](
auto&& idx) { return localIsMapper.refToRealIdx(idx) ;})
391 const auto& lateralIntersection = geometryHelper.intersection(lateralFacetIndex, element);
394 const auto globalScvIndicesForLateralFace = [&]
396 const auto globalOutsideScvIdx = [&]
398 if (lateralIntersection.neighbor())
400 const auto parallelElemIdx = this->elementMapper().index(lateralIntersection.outside());
401 return getGlobalScvIdx(parallelElemIdx, localScvIdx);
403 else if (onDomainBoundary_(lateralIntersection))
404 return numScvs + outSideBoundaryVolVarIdx_++;
409 return std::array{globalScvIdx, globalOutsideScvIdx};
412 const auto boundaryType = [&]
414 if (onProcessorBoundary_(lateralIntersection))
415 return SubControlVolumeFace::BoundaryType::processorBoundary;
416 else if (onDomainBoundary_(lateralIntersection))
417 return SubControlVolumeFace::BoundaryType::physicalBoundary;
419 return SubControlVolumeFace::BoundaryType::interior;
424 intersectionGeometry,
425 geometryHelper.facet(lateralFacetIndex, element).geometry(),
426 globalScvIndicesForLateralFace,
429 lateralIntersection.centerUnitOuterNormal(),
430 SubControlVolumeFace::FaceType::lateral,
434 globalScvfIndices[localScvfIdx] = globalScvfIdx++;
437 if (onDomainBoundary_(lateralIntersection))
440 hasBoundaryScvf_[eIdx] =
true;
447 int localScvfIdx = minNumScvfsPerElement;
448 for (
const auto& intersection : intersections(this->gridView(), element))
451 if (onDomainBoundary_(intersection))
453 const auto localScvIdx = localIsMapper.realToRefIdx(intersection.indexInInside());
454 const auto globalScvIdx = getGlobalScvIdx(eIdx, localScvIdx);
460 intersection.geometry(),
461 std::array{globalScvIdx, globalScvIdx},
464 intersection.centerUnitOuterNormal(),
465 SubControlVolumeFace::FaceType::frontal,
466 SubControlVolumeFace::BoundaryType::physicalBoundary
469 globalScvfIndices.push_back(globalScvfIdx);
472 hasBoundaryScvf_[eIdx] =
true;
477 connectivityMap_.update(*
this);
480 bool onDomainBoundary_(
const typename GridView::Intersection& intersection)
const
482 return !intersection.neighbor() && intersection.boundary();
485 bool onProcessorBoundary_(
const typename GridView::Intersection& intersection)
const
487 return !intersection.neighbor() && !intersection.boundary();
490 bool onPeriodicBoundary_(
const typename GridView::Intersection& intersection)
const
492 return intersection.boundary() && intersection.neighbor();
496 ConnectivityMap connectivityMap_;
497 IntersectionMapper intersectionMapper_;
499 std::vector<SubControlVolume> scvs_;
500 std::vector<SubControlVolumeFace> scvfs_;
501 GridIndexType numBoundaryScv_;
502 GridIndexType numBoundaryScvf_;
503 GridIndexType outSideBoundaryVolVarIdx_;
504 std::vector<bool> hasBoundaryScvf_;
506 std::vector<std::vector<GridIndexType>> scvfIndicesOfElement_;
509 std::unordered_map<GridIndexType, GridIndexType> periodicFaceMap_;
518template<
class GV,
class Traits>
527 using Element =
typename GV::template Codim<0>::Entity;
529 using IntersectionMapper =
typename Traits::IntersectionMapper;
530 using ConnectivityMap =
typename Traits::template ConnectivityMap<ThisType>;
532 static constexpr auto dim = Traits::StaticInfo::dim;
533 static constexpr auto numScvsPerElement = Traits::StaticInfo::numScvsPerElement;
534 static constexpr auto numLateralScvfsPerScv = Traits::StaticInfo::numLateralScvfsPerScv;
535 static constexpr auto numLateralScvfsPerElement = Traits::StaticInfo::numLateralScvfsPerElement;
536 static constexpr auto minNumScvfsPerElement = Traits::StaticInfo::minNumScvfsPerElement;
537 static constexpr auto maxNumScvfsPerElement = Traits::StaticInfo::maxNumScvfsPerElement;
544 static constexpr bool cachingEnabled =
false;
568 , intersectionMapper_(this->gridView())
572 DUNE_THROW(Dune::InvalidStateException,
"The staggered discretization method needs at least an overlap of 1 for parallel computations. "
573 <<
" Set the parameter \"Grid.Overlap\" in the input file.");
593 {
return numBoundaryScv_; }
597 {
return numBoundaryScvf_; }
601 {
return intersectionMapper_.numIntersections(); }
605 {
return this->gridView().size(1); }
612 {
return connectivityMap_; }
616 {
return hasBoundaryScvf_[eIdx]; }
620 {
return intersectionMapper_; }
624 {
return scvfIndicesOfElement_[eIdx]; }
628 {
return outsideVolVarIndices_.at(scvfIdx); }
633 ParentType::update(gridView);
640 ParentType::update(std::move(gridView));
646 {
return periodicFaceMap_.count(dofIdx); }
650 {
return periodicFaceMap_.at(dofIdx); }
654 {
return periodicFaceMap_; }
657 [[deprecated(
"Will be removed after release 3.9. Use periodicDofMap() instead.")]]
659 {
return periodicDofMap(); }
665 intersectionMapper_.update(this->gridView());
670 numBoundaryScvf_ = 0;
671 hasBoundaryScvf_.clear();
672 scvfIndicesOfElement_.clear();
673 outsideVolVarIndices_.clear();
676 const auto numElements = this->gridView().size(0);
677 scvfIndicesOfElement_.resize(numElements);
678 hasBoundaryScvf_.resize(numElements,
false);
679 numScvs_ = numElements*numScvsPerElement;
681 GeometryHelper geometryHelper(this->gridView());
684 GridIndexType scvfIdx = 0;
686 GridIndexType neighborVolVarIdx = numScvs_;
688 for (
const auto& element : elements(this->gridView()))
690 const auto eIdx = this->elementMapper().index(element);
691 assert(numScvsPerElement == element.subEntities(1));
694 auto& globalScvfIndices = scvfIndicesOfElement_[eIdx];
695 globalScvfIndices.reserve(maxNumScvfsPerElement);
696 globalScvfIndices.resize(minNumScvfsPerElement);
699 std::size_t numFrontalBoundaryScvfs = 0;
702 LocalIntersectionIndexMapper localIsMapper;
703 localIsMapper.update(this->gridView(), element);
705 for (
const auto& intersection : intersections(this->gridView(), element))
707 const auto localScvIdx = localIsMapper.realToRefIdx(intersection.indexInInside());
708 auto localScvfIdx = localScvIdx*(1 + numLateralScvfsPerScv);
710 assert(localIsMapper.refToRealIdx(localScvIdx) == intersection.indexInInside());
712 globalScvfIndices[localScvfIdx] = scvfIdx++;
715 if constexpr(dim > 1)
718 for (
const auto lateralFacetIndex : Dune::transformedRangeView(geometryHelper.localLaterFaceIndices(localScvIdx),
719 [&](
auto idx) { return localIsMapper.refToRealIdx(idx) ;})
722 if (onDomainBoundary_(geometryHelper.intersection(lateralFacetIndex, element)))
724 outsideVolVarIndices_[scvfIdx] = neighborVolVarIdx++;
726 hasBoundaryScvf_[eIdx] =
true;
729 globalScvfIndices[localScvfIdx] = scvfIdx++;
735 if (onDomainBoundary_(intersection))
738 numBoundaryScv_ += numLateralScvfsPerScv;
739 ++numFrontalBoundaryScvfs;
741 hasBoundaryScvf_[eIdx] =
true;
745 if (onPeriodicBoundary_(intersection))
749 const auto& otherElement = intersection.outside();
751 SmallLocalIndexType otherIntersectionLocalIdx = 0;
752 bool periodicFaceFound =
false;
754 for (
const auto& otherIntersection : intersections(this->gridView(), otherElement))
756 if (periodicFaceFound)
759 if (Dune::FloatCmp::eq(intersection.centerUnitOuterNormal()*otherIntersection.centerUnitOuterNormal(), -1.0, 1e-7))
761 const auto periodicDofIdx = intersectionMapper().globalIntersectionIndex(otherElement, otherIntersectionLocalIdx);
762 const auto dofIndex = intersectionMapper().globalIntersectionIndex(element, localScvIdx);
763 periodicFaceMap_[dofIndex] = periodicDofIdx;
764 periodicFaceFound =
true;
767 ++otherIntersectionLocalIdx;
773 for (std::size_t i = 0; i < numFrontalBoundaryScvfs; ++i)
774 globalScvfIndices.push_back(scvfIdx++);
780 connectivityMap_.update(*
this);
783 bool onDomainBoundary_(
const typename GridView::Intersection& intersection)
const
785 return !intersection.neighbor() && intersection.boundary();
788 bool onProcessorBoundary_(
const typename GridView::Intersection& intersection)
const
790 return !intersection.neighbor() && !intersection.boundary();
793 bool onPeriodicBoundary_(
const typename GridView::Intersection& intersection)
const
795 return intersection.boundary() && intersection.neighbor();
799 ConnectivityMap connectivityMap_;
800 IntersectionMapper intersectionMapper_;
803 std::size_t numScvs_;
804 std::size_t numScvf_;
805 std::size_t numBoundaryScv_;
806 std::size_t numBoundaryScvf_;
807 std::vector<bool> hasBoundaryScvf_;
809 std::vector<std::vector<GridIndexType>> scvfIndicesOfElement_;
812 std::unordered_map<GridIndexType, GridIndexType> periodicFaceMap_;
813 std::unordered_map<GridIndexType, GridIndexType> outsideVolVarIndices_;
Base class for grid geometries.
Check the overlap size for different discretization methods.
Base class for all grid geometries.
Definition basegridgeometry.hh:52
Definition localintersectionindexmapper.hh:29
Stores the dof indices corresponding to the neighboring scvs that contribute to the derivative calcul...
Definition facecentered/staggered/connectivitymap.hh:30
Definition discretization/facecentered/staggered/fvelementgeometry.hh:124
Base class for the finite volume geometry vector for face-centered staggered models This builds up th...
Definition discretization/facecentered/staggered/fvgridgeometry.hh:521
typename Traits::SubControlVolumeFace SubControlVolumeFace
export the type of sub control volume
Definition discretization/facecentered/staggered/fvgridgeometry.hh:553
typename Traits::GeometryHelper GeometryHelper
export the geometry helper type
Definition discretization/facecentered/staggered/fvgridgeometry.hh:557
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:566
typename Traits::SubControlVolume SubControlVolume
export the type of sub control volume
Definition discretization/facecentered/staggered/fvgridgeometry.hh:551
std::size_t numDofs() const
the total number of dofs
Definition discretization/facecentered/staggered/fvgridgeometry.hh:604
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:649
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:611
std::size_t numBoundaryScv() const
The total number of boundary sub control volumes.
Definition discretization/facecentered/staggered/fvgridgeometry.hh:592
const IntersectionMapper & intersectionMapper() const
Return a reference to the intersection mapper.
Definition discretization/facecentered/staggered/fvgridgeometry.hh:619
void update(GridView &&gridView)
update all fvElementGeometries (call this after grid adaption)
Definition discretization/facecentered/staggered/fvgridgeometry.hh:638
FaceCenteredStaggeredFVGridGeometry(const GridView &gridView, const std::string ¶mGroup="")
Constructor from gridView.
Definition discretization/facecentered/staggered/fvgridgeometry.hh:579
bool dofOnPeriodicBoundary(GridIndexType dofIdx) const
If a d.o.f. is on a periodic boundary.
Definition discretization/facecentered/staggered/fvgridgeometry.hh:645
typename Traits::StaticInfo StaticInformation
export static information
Definition discretization/facecentered/staggered/fvgridgeometry.hh:561
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:623
bool hasBoundaryScvf(GridIndexType eIdx) const
Returns whether one of the geometry's scvfs lies on a boundary.
Definition discretization/facecentered/staggered/fvgridgeometry.hh:615
const std::unordered_map< GridIndexType, GridIndexType > & periodicVertexMap() const
Returns the map between dofs across periodic boundaries.
Definition discretization/facecentered/staggered/fvgridgeometry.hh:658
std::size_t numScvf() const
The total number of sub control volume faces.
Definition discretization/facecentered/staggered/fvgridgeometry.hh:588
BasicGridGeometry_t< GV, Traits > BasicGridGeometry
export basic grid geometry type for the alternative constructor
Definition discretization/facecentered/staggered/fvgridgeometry.hh:547
std::size_t numBoundaryScvf() const
The total number of boundary sub control volume faces.
Definition discretization/facecentered/staggered/fvgridgeometry.hh:596
const std::unordered_map< GridIndexType, GridIndexType > & periodicDofMap() const
Returns the map between dofs across periodic boundaries.
Definition discretization/facecentered/staggered/fvgridgeometry.hh:653
std::size_t numScv() const
The total number of sub control volumes.
Definition discretization/facecentered/staggered/fvgridgeometry.hh:584
GV GridView
export the grid view type
Definition discretization/facecentered/staggered/fvgridgeometry.hh:555
typename Traits::LocalIntersectionMapper LocalIntersectionMapper
export the local intersection mapper
Definition discretization/facecentered/staggered/fvgridgeometry.hh:559
GridIndexType outsideVolVarIndex(GridIndexType scvfIdx) const
Get the global sub control volume face indices of an element.
Definition discretization/facecentered/staggered/fvgridgeometry.hh:627
void update(const GridView &gridView)
update all fvElementGeometries (call this after grid adaption)
Definition discretization/facecentered/staggered/fvgridgeometry.hh:631
std::size_t numIntersections() const
The total number of intersections.
Definition discretization/facecentered/staggered/fvgridgeometry.hh:600
Extrusion_t< Traits > Extrusion
export the type of extrusion
Definition discretization/facecentered/staggered/fvgridgeometry.hh:563
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:549
Base class for the finite volume geometry vector for staggered models This builds up the sub control ...
Definition discretization/facecentered/staggered/fvgridgeometry.hh:95
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:225
std::size_t numScvf() const
The total number of sub control volume faces.
Definition discretization/facecentered/staggered/fvgridgeometry.hh:167
const IntersectionMapper & intersectionMapper() const
Return a reference to the intersection mapper.
Definition discretization/facecentered/staggered/fvgridgeometry.hh:233
bool hasBoundaryScvf(GridIndexType eIdx) const
Returns whether one of the geometry's scvfs lies on a boundary.
Definition discretization/facecentered/staggered/fvgridgeometry.hh:229
void update(const GridView &gridView)
update all fvElementGeometries (call this after grid adaption)
Definition discretization/facecentered/staggered/fvgridgeometry.hh:187
typename Traits::SubControlVolumeFace SubControlVolumeFace
export the type of sub control volume
Definition discretization/facecentered/staggered/fvgridgeometry.hh:132
typename Traits::LocalIntersectionMapper LocalIntersectionMapper
export the local intersection mapper
Definition discretization/facecentered/staggered/fvgridgeometry.hh:138
typename Traits::GeometryHelper GeometryHelper
export the geometry helper type
Definition discretization/facecentered/staggered/fvgridgeometry.hh:136
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:218
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:145
typename Traits::StaticInfo StaticInformation
export static information
Definition discretization/facecentered/staggered/fvgridgeometry.hh:140
std::size_t numDofs() const
the total number of dofs
Definition discretization/facecentered/staggered/fvgridgeometry.hh:183
const std::unordered_map< GridIndexType, GridIndexType > & periodicVertexMap() const
Returns the map between dofs across periodic boundaries.
Definition discretization/facecentered/staggered/fvgridgeometry.hh:250
std::size_t numBoundaryScv() const
The total number of boundary sub control volumes.
Definition discretization/facecentered/staggered/fvgridgeometry.hh:171
FaceCenteredStaggeredFVGridGeometry(const GridView &gridView, const std::string ¶mGroup="")
Constructor from gridView.
Definition discretization/facecentered/staggered/fvgridgeometry.hh:158
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:241
GV GridView
export the grid view type
Definition discretization/facecentered/staggered/fvgridgeometry.hh:134
const SubControlVolume & scv(GridIndexType scvIdx) const
Get a sub control volume with a global scv index.
Definition discretization/facecentered/staggered/fvgridgeometry.hh:201
typename Traits::SubControlVolume SubControlVolume
export the type of sub control volume
Definition discretization/facecentered/staggered/fvgridgeometry.hh:130
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:128
void update(GridView &&gridView)
update all fvElementGeometries (call this after grid adaption)
Definition discretization/facecentered/staggered/fvgridgeometry.hh:194
BasicGridGeometry_t< GV, Traits > BasicGridGeometry
export basic grid geometry type for the alternative constructor
Definition discretization/facecentered/staggered/fvgridgeometry.hh:126
Extrusion_t< Traits > Extrusion
export the type of extrusion
Definition discretization/facecentered/staggered/fvgridgeometry.hh:142
std::size_t numBoundaryScvf() const
The total number of boundary sub control volume faces.
Definition discretization/facecentered/staggered/fvgridgeometry.hh:175
std::size_t numIntersections() const
The total number of intersections.
Definition discretization/facecentered/staggered/fvgridgeometry.hh:179
const SubControlVolumeFace & scvf(GridIndexType scvfIdx) const
Get a sub control volume face with a global scvf index.
Definition discretization/facecentered/staggered/fvgridgeometry.hh:214
const std::unordered_map< GridIndexType, GridIndexType > & periodicDofMap() const
Returns the map between dofs across periodic boundaries.
Definition discretization/facecentered/staggered/fvgridgeometry.hh:245
bool dofOnPeriodicBoundary(GridIndexType dofIdx) const
If a d.o.f. is on a periodic boundary.
Definition discretization/facecentered/staggered/fvgridgeometry.hh:237
std::size_t numScv() const
The total number of sub control volumes.
Definition discretization/facecentered/staggered/fvgridgeometry.hh:163
auto scvs(const LocalView &fvGeometry) const
Definition discretization/facecentered/staggered/fvgridgeometry.hh:206
Base class for the finite volume geometry vector for face-centered staggered models This builds up th...
Definition discretization/facecentered/staggered/fvgridgeometry.hh:84
Face centered staggered geometry helper.
Definition discretization/facecentered/staggered/geometryhelper.hh:28
Face centered staggered sub control volume face.
Definition discretization/facecentered/staggered/subcontrolvolumeface.hh:54
Face centered staggered sub control volume.
Definition discretization/facecentered/staggered/subcontrolvolume.hh:52
Defines the default element and vertex mapper types.
Geometry helper for face-centered staggered scheme.
Face centered staggered sub control volume.
Face centered staggered sub control volume face.
Helper classes to compute the integration elements.
Stores the dof indices corresponding to the neighboring scvs that contribute to the derivative calcul...
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:38
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:26
defines intersection mappers.
Provides a mapping of local intersection indices (indexInInside) such that the local indices always f...
Define some often used mathematical functions.
The available discretization methods in Dumux.
typename Extrusion< T >::type Extrusion_t
Convenience alias for obtaining the extrusion type.
Definition extrusion.hh:166
Base class for the finite volume geometry vector for face-centered staggered models This builds up th...
Check if the overlap size is valid for a given discretization method.
Definition checkoverlapsize.hh:28
Definition defaultmappertraits.hh:23
Definition discretization/facecentered/staggered/fvgridgeometry.hh:62
static constexpr auto numLateralScvfsPerElement
Definition discretization/facecentered/staggered/fvgridgeometry.hh:67
static constexpr auto maxNumScvfsPerElement
Definition discretization/facecentered/staggered/fvgridgeometry.hh:70
static constexpr auto numScvsPerElement
Definition discretization/facecentered/staggered/fvgridgeometry.hh:65
static constexpr auto numFacesPerElement
Definition discretization/facecentered/staggered/fvgridgeometry.hh:64
static constexpr auto dim
Definition discretization/facecentered/staggered/fvgridgeometry.hh:63
static constexpr auto numLateralScvfsPerScv
Definition discretization/facecentered/staggered/fvgridgeometry.hh:66
static constexpr auto minNumScvfsPerElement
Definition discretization/facecentered/staggered/fvgridgeometry.hh:68
The default traits for the face-center staggered finite volume grid geometry Defines the scv and scvf...
Definition discretization/facecentered/staggered/fvgridgeometry.hh:48
typename GridView::IndexSet::IndexType GridIndex
Definition indextraits.hh:27
std::uint_least8_t SmallLocalIndex
Definition indextraits.hh:29
unsigned int LocalIndex
Definition indextraits.hh:28