26#ifndef DUMUX_DISCRETIZATION_CC_MPFA_FV_GRID_GEOMETRY_HH
27#define DUMUX_DISCRETIZATION_CC_MPFA_FV_GRID_GEOMETRY_HH
51template<
class Gr
idView,
class Traits,
bool enableCache>
55template<
class Gr
idView>
60 DUNE_THROW(Dune::InvalidStateException,
"The ccmpfa discretization method needs at least an overlap of 1 for parallel computations. "
61 <<
" Set the parameter \"Grid.Overlap\" in the input file.");
70template<
class GV,
class Traits>
77 static constexpr int dim = GV::dimension;
78 static constexpr int dimWorld = GV::dimensionworld;
80 using Element =
typename GV::template Codim<0>::Entity;
81 using Vertex =
typename GV::template Codim<dim>::Entity;
82 using Intersection =
typename GV::Intersection;
84 using CoordScalar =
typename GV::ctype;
86 using ScvfOutsideGridIndexStorage =
typename Traits::SubControlVolumeFace::Traits::OutsideGridIndexStorage;
118 static constexpr int maxElementStencilSize = Traits::maxElementStencilSize;
121 static constexpr bool hasSingleInteractionVolumeType = !MpfaHelper::considerSecondaryIVs();
127 , secondaryIvIndicator_([] (const Element& e, const Intersection& is, bool isBranching)
128 {
return is.boundary() || isBranching; } )
137 , secondaryIvIndicator_(indicator)
146 {
return this->elementMapper(); }
150 {
return scvs_.size(); }
154 {
return scvfs_.size(); }
158 {
return numBoundaryScvf_; }
162 {
return this->gridView().size(0); }
166 template<
bool useSecondary = !hasSingleInteractionVolumeType, std::enable_if_t<useSecondary,
bool> = 0>
168 {
return secondaryInteractionVolumeVertices_[vIdxGlobal]; }
172 template<
bool useSecondary = !hasSingleInteractionVolumeType, std::enable_if_t<!useSecondary,
bool> = 0>
177 [[deprecated(
"Use update(gridView) instead! Will be removed after release 3.5.")]]
180 ParentType::update();
187 ParentType::update(gridView);
194 ParentType::update(std::move(gridView));
204 {
return scvs_[scvIdx]; }
208 {
return scvfs_[scvfIdx]; }
213 {
return connectivityMap_; }
217 {
return ivIndexSets_; }
221 {
return scvfIndicesOfScv_[scvIdx]; }
225 {
return flipScvfIndices_; }
230 {
return scvfs_[flipScvfIndices_[scvfIdx][outsideScvfIdx]]; }
234 {
return hasBoundaryScvf_[eIdx]; }
247 const auto numVert = this->gridView().size(dim);
248 const auto numScvs = numDofs();
249 std::size_t numScvf = MpfaHelper::getGlobalNumScvf(this->gridView());
252 scvs_.resize(numScvs);
253 scvfs_.reserve(numScvf);
254 scvfIndicesOfScv_.resize(numScvs);
255 hasBoundaryScvf_.assign(numScvs,
false);
259 secondaryInteractionVolumeVertices_.assign(numVert,
false);
262 const auto isGhostVertex = MpfaHelper::findGhostVertices(this->gridView(), this->vertexMapper());
265 typename GridIVIndexSets::DualGridIndexSet dualIdSet(this->gridView());
268 GridIndexType scvfIdx = 0;
269 numBoundaryScvf_ = 0;
270 for (
const auto& element : elements(this->gridView()))
272 const auto eIdx = this->elementMapper().index(element);
275 auto elementGeometry = element.geometry();
278 std::vector<GridIndexType> scvfIndexSet;
279 scvfIndexSet.reserve(MpfaHelper::getNumLocalScvfs(elementGeometry.type()));
283 std::vector<ScvfOutsideGridIndexStorage> outsideIndices;
286 outsideIndices.resize(element.subEntities(1));
287 for (
const auto& intersection : intersections(this->gridView(), element))
289 if (intersection.neighbor())
291 const auto nIdx = this->elementMapper().index( intersection.outside() );
292 outsideIndices[intersection.indexInInside()].push_back(nIdx);
298 for (
const auto& is : intersections(this->gridView(), element))
300 const auto indexInInside = is.indexInInside();
301 const bool boundary = is.boundary();
302 const bool neighbor = is.neighbor();
305 hasBoundaryScvf_[eIdx] =
true;
308 if (dim < dimWorld && neighbor && outsideIndices[indexInInside].empty())
312 const bool useNeighbor = neighbor && is.outside().level() >
element.level();
313 const auto& e = useNeighbor ? is.outside() :
element;
314 const auto indexInElement = useNeighbor ? is.indexInOutside() : indexInInside;
315 const auto eg = e.geometry();
316 const auto refElement = referenceElement(eg);
319 const auto numCorners = is.geometry().corners();
320 const auto isPositions = MpfaHelper::computeScvfCornersOnIntersection(eg,
326 const bool isBranchingPoint = dim < dimWorld ? outsideIndices[indexInInside].size() > 1 :
false;
327 const bool usesSecondaryIV = secondaryIvIndicator_(element, is, isBranchingPoint);
333 const auto vIdxLocal = refElement.subEntity(indexInElement, 1, c, dim);
334 const auto vIdxGlobal = this->vertexMapper().subIndex(e, vIdxLocal, dim);
337 if (isGhostVertex[vIdxGlobal])
342 secondaryInteractionVolumeVertices_[vIdxGlobal] =
true;
345 static const auto q = getParam<CoordScalar>(
"MPFA.Q");
348 const auto& outsideScvIndices = [&] ()
351 return dim == dimWorld ?
352 ScvfOutsideGridIndexStorage({this->elementMapper().index(is.outside())}) :
353 outsideIndices[indexInInside];
355 return ScvfOutsideGridIndexStorage({GridIndexType(numScvs) + numBoundaryScvf_++});
358 scvfIndexSet.push_back(scvfIdx);
359 scvfs_.emplace_back(MpfaHelper(),
360 MpfaHelper::getScvfCorners(isPositions,
numCorners, c),
371 dualIdSet[vIdxGlobal].insert(scvfs_.back());
379 outsideIndices[indexInInside].clear();
383 scvs_[eIdx] = SubControlVolume(std::move(elementGeometry), eIdx);
386 scvfIndicesOfScv_[eIdx] = scvfIndexSet;
390 flipScvfIndices_.resize(scvfs_.size());
391 for (
const auto& scvf : scvfs_)
396 const auto numOutsideScvs = scvf.numOutsideScvs();
397 const auto vIdxGlobal = scvf.vertexIndex();
398 const auto insideScvIdx = scvf.insideScvIdx();
400 flipScvfIndices_[scvf.index()].resize(numOutsideScvs);
401 for (std::size_t i = 0; i < numOutsideScvs; ++i)
403 const auto outsideScvIdx = scvf.outsideScvIdx(i);
404 for (
auto outsideScvfIndex : scvfIndicesOfScv_[outsideScvIdx])
406 const auto& outsideScvf = this->scvf(outsideScvfIndex);
407 if (outsideScvf.vertexIndex() == vIdxGlobal &&
408 MpfaHelper::vectorContainsValue(outsideScvf.outsideScvIndices(), insideScvIdx))
410 flipScvfIndices_[scvf.index()][i] = outsideScvfIndex;
419 std::cout <<
"Initializing of the grid finite volume geometry took " << timer.elapsed() <<
" seconds." << std::endl;
423 ivIndexSets_.update(*
this, std::move(dualIdSet));
424 std::cout <<
"Initializing of the grid interaction volume index sets took " << timer.elapsed() <<
" seconds." << std::endl;
428 connectivityMap_.update(*
this);
429 std::cout <<
"Initializing of the connectivity map took " << timer.elapsed() <<
" seconds." << std::endl;
433 ConnectivityMap connectivityMap_;
436 std::vector<SubControlVolume> scvs_;
437 std::vector<SubControlVolumeFace> scvfs_;
440 std::vector<std::vector<GridIndexType>> scvfIndicesOfScv_;
441 std::vector<bool> secondaryInteractionVolumeVertices_;
442 GridIndexType numBoundaryScvf_;
443 std::vector<bool> hasBoundaryScvf_;
446 FlipScvfIndexSet flipScvfIndices_;
449 GridIVIndexSets ivIndexSets_;
452 SecondaryIvIndicatorType secondaryIvIndicator_;
462template<
class GV,
class Traits>
469 static constexpr int dim = GV::dimension;
470 static constexpr int dimWorld = GV::dimensionworld;
472 using Element =
typename GV::template Codim<0>::Entity;
473 using Vertex =
typename GV::template Codim<dim>::Entity;
474 using Intersection =
typename GV::Intersection;
476 using CoordScalar =
typename GV::ctype;
478 using ScvfOutsideGridIndexStorage =
typename Traits::SubControlVolumeFace::Traits::OutsideGridIndexStorage;
510 static constexpr int maxElementStencilSize = Traits::maxElementStencilSize;
513 static constexpr bool hasSingleInteractionVolumeType = !MpfaHelper::considerSecondaryIVs();
519 , secondaryIvIndicator_([] (const Element& e, const Intersection& is, bool isBranching)
520 {
return is.boundary() || isBranching; } )
529 , secondaryIvIndicator_(indicator)
538 {
return this->elementMapper(); }
550 {
return numBoundaryScvf_; }
554 {
return this->gridView().size(0); }
558 template<
bool useSecondary = !hasSingleInteractionVolumeType, std::enable_if_t<useSecondary,
bool> = 0>
560 {
return secondaryInteractionVolumeVertices_[vIdxGlobal]; }
564 template<
bool useSecondary = !hasSingleInteractionVolumeType, std::enable_if_t<!useSecondary,
bool> = 0>
570 {
return isGhostVertex_[this->vertexMapper().index(v)]; }
574 {
return isGhostVertex_[vIdxGlobal]; }
577 [[deprecated(
"Use update(gridView) instead! Will be removed after release 3.5.")]]
580 ParentType::update();
587 ParentType::update(gridView);
594 ParentType::update(std::move(gridView));
604 {
return scvfIndicesOfScv_[scvIdx]; }
608 {
return neighborVolVarIndices_[scvIdx]; }
612 const GridIndexType
flipScvfIdx(GridIndexType scvfIdx,
unsigned int outsideScvfIdx = 0)
const
613 {
return flipScvfIndices_[scvfIdx][outsideScvfIdx]; }
617 {
return flipScvfIndices_; }
622 {
return connectivityMap_; }
626 {
return ivIndexSets_; }
637 numScvs_ = numDofs();
638 scvfIndicesOfScv_.resize(numScvs_);
639 neighborVolVarIndices_.resize(numScvs_);
643 const auto numVert = this->gridView().size(dim);
644 secondaryInteractionVolumeVertices_.assign(numVert,
false);
647 isGhostVertex_ = MpfaHelper::findGhostVertices(this->gridView(), this->vertexMapper());
650 typename GridIVIndexSets::DualGridIndexSet dualIdSet(this->gridView());
653 const auto maxNumScvfs = numScvs_*LocalView::maxNumElementScvfs;
654 std::vector<bool> scvfIsOnBoundary;
655 std::vector<GridIndexType> scvfVertexIndex;
656 scvfIsOnBoundary.reserve(maxNumScvfs);
657 scvfVertexIndex.reserve(maxNumScvfs);
661 numBoundaryScvf_ = 0;
662 for (
const auto& element : elements(this->gridView()))
664 const auto eIdx = this->elementMapper().index(element);
667 auto elementGeometry = element.geometry();
670 const auto numLocalFaces = MpfaHelper::getNumLocalScvfs(elementGeometry.type());
671 std::vector<GridIndexType> scvfsIndexSet;
672 std::vector<ScvfOutsideGridIndexStorage> neighborVolVarIndexSet;
673 scvfsIndexSet.reserve(numLocalFaces);
674 neighborVolVarIndexSet.reserve(numLocalFaces);
678 std::vector<ScvfOutsideGridIndexStorage> outsideIndices;
681 outsideIndices.resize(element.subEntities(1));
682 for (
const auto& intersection : intersections(this->gridView(), element))
684 if (intersection.neighbor())
686 auto nIdx = this->elementMapper().index( intersection.outside() );
687 outsideIndices[intersection.indexInInside()].push_back(nIdx);
693 for (
const auto& is : intersections(this->gridView(), element))
695 const auto indexInInside = is.indexInInside();
696 const bool boundary = is.boundary();
697 const bool neighbor = is.neighbor();
700 if (dim < dimWorld && neighbor && outsideIndices[indexInInside].empty())
704 const bool useNeighbor = neighbor && is.outside().level() >
element.level();
705 const auto& e = useNeighbor ? is.outside() :
element;
706 const auto indexInElement = useNeighbor ? is.indexInOutside() : indexInInside;
707 const auto eg = e.geometry();
708 const auto refElement = referenceElement(eg);
711 const bool isBranchingPoint = dim < dimWorld ? outsideIndices[indexInInside].size() > 1 :
false;
712 const bool usesSecondaryIV = secondaryIvIndicator_(element, is, isBranchingPoint);
715 for (std::size_t c = 0; c < is.geometry().corners(); ++c)
718 const auto vIdxLocal = refElement.subEntity(indexInElement, 1, c, dim);
719 const auto vIdxGlobal = this->vertexMapper().subIndex(e, vIdxLocal, dim);
722 if (isGhostVertex_[vIdxGlobal])
727 secondaryInteractionVolumeVertices_[vIdxGlobal] =
true;
730 const auto& outsideScvIndices = [&] ()
733 return dim == dimWorld ?
734 ScvfOutsideGridIndexStorage({this->elementMapper().index(is.outside())}) :
735 outsideIndices[indexInInside];
737 return ScvfOutsideGridIndexStorage({GridIndexType(numScvs_) + numBoundaryScvf_++});
741 dualIdSet[vIdxGlobal].insert(numScvf_, eIdx, boundary);
744 scvfsIndexSet.push_back(numScvf_++);
745 scvfIsOnBoundary.push_back(boundary);
746 scvfVertexIndex.push_back(vIdxGlobal);
747 neighborVolVarIndexSet.emplace_back(std::move(outsideScvIndices));
752 outsideIndices[indexInInside].clear();
756 scvfIndicesOfScv_[eIdx] = scvfsIndexSet;
757 neighborVolVarIndices_[eIdx] = neighborVolVarIndexSet;
761 flipScvfIndices_.resize(numScvf_);
762 for (std::size_t scvIdx = 0; scvIdx < numScvs_; ++scvIdx)
764 const auto& scvfIndices = scvfIndicesOfScv_[scvIdx];
765 for (
unsigned int i = 0; i < scvfIndices.size(); ++i)
768 if (scvfIsOnBoundary[ scvfIndices[i] ])
771 const auto scvfIdx = scvfIndices[i];
772 const auto vIdxGlobal = scvfVertexIndex[scvfIdx];
773 const auto numOutsideScvs = neighborVolVarIndices_[scvIdx][i].size();
775 flipScvfIndices_[scvfIdx].resize(numOutsideScvs);
776 for (
unsigned int j = 0; j < numOutsideScvs; ++j)
778 const auto outsideScvIdx = neighborVolVarIndices_[scvIdx][i][j];
779 const auto& outsideScvfIndices = scvfIndicesOfScv_[outsideScvIdx];
780 for (
unsigned int k = 0; k < outsideScvfIndices.size(); ++k)
782 const auto outsideScvfIndex = outsideScvfIndices[k];
783 const auto outsideScvfVertexIndex = scvfVertexIndex[outsideScvfIndex];
784 const auto& outsideScvfNeighborIndices = neighborVolVarIndices_[outsideScvIdx][k];
785 if (outsideScvfVertexIndex == vIdxGlobal &&
786 MpfaHelper::vectorContainsValue(outsideScvfNeighborIndices, scvIdx))
788 flipScvfIndices_[scvfIdx][j] = outsideScvfIndex;
798 std::cout <<
"Initializing of the grid finite volume geometry took " << timer.elapsed() <<
" seconds." << std::endl;
802 ivIndexSets_.update(*
this, std::move(dualIdSet));
803 std::cout <<
"Initializing of the grid interaction volume index sets took " << timer.elapsed() <<
" seconds." << std::endl;
807 connectivityMap_.update(*
this);
808 std::cout <<
"Initializing of the connectivity map took " << timer.elapsed() <<
" seconds." << std::endl;
812 ConnectivityMap connectivityMap_;
815 std::vector<std::vector<GridIndexType>> scvfIndicesOfScv_;
816 std::vector<std::vector<ScvfOutsideGridIndexStorage>> neighborVolVarIndices_;
817 std::vector<bool> secondaryInteractionVolumeVertices_;
818 std::vector<bool> isGhostVertex_;
819 GridIndexType numScvs_;
820 GridIndexType numScvf_;
821 GridIndexType numBoundaryScvf_;
824 FlipScvfIndexSet flipScvfIndices_;
827 GridIVIndexSets ivIndexSets_;
830 SecondaryIvIndicatorType secondaryIvIndicator_;
Defines the index types used for grid and local indices.
The infrastructure to retrieve run-time parameters from Dune::ParameterTrees.
Helper classes to compute the integration elements.
Base class for grid geometries.
Check the overlap size for different discretization methods.
The available discretization methods in Dumux.
typename Extrusion< T >::type Extrusion_t
Convenience alias for obtaining the extrusion type.
Definition: extrusion.hh:177
void checkOverlapSizeCCMpfa(const GridView &gridView)
check the overlap size for parallel computations
Definition: discretization/cellcentered/mpfa/fvgridgeometry.hh:56
std::size_t numCorners(Shape shape)
Returns the number of corners of a given geometry.
Definition: throatproperties.hh:215
Struture to define the index types used for grid and local indices.
Definition: indextraits.hh:38
Base class for all finite volume grid geometries.
Definition: basegridgeometry.hh:51
GV GridView
export the grid view type
Definition: basegridgeometry.hh:66
The finite volume geometry (scvs and scvfs) for cell-centered mpfa models on a grid view This builds ...
Definition: discretization/cellcentered/mpfa/fvgridgeometry.hh:52
The finite volume geometry (scvs and scvfs) for cell-centered mpfa models on a grid view This builds ...
Definition: discretization/cellcentered/mpfa/fvgridgeometry.hh:73
typename Traits::ElementMapper DofMapper
export dof mapper type
Definition: discretization/cellcentered/mpfa/fvgridgeometry.hh:107
void update()
update all fvElementGeometries (do this again after grid adaption)
Definition: discretization/cellcentered/mpfa/fvgridgeometry.hh:178
typename Traits::SubControlVolumeFace SubControlVolumeFace
export the type of sub control volume
Definition: discretization/cellcentered/mpfa/fvgridgeometry.hh:101
std::size_t numScvf() const
The total number of sub control volume faces.
Definition: discretization/cellcentered/mpfa/fvgridgeometry.hh:153
typename Traits::template MpfaHelper< ThisType > MpfaHelper
export the mpfa helper type
Definition: discretization/cellcentered/mpfa/fvgridgeometry.hh:111
const SubControlVolumeFace & flipScvf(GridIndexType scvfIdx, unsigned int outsideScvfIdx=0) const
Definition: discretization/cellcentered/mpfa/fvgridgeometry.hh:229
const std::vector< GridIndexType > & scvfIndicesOfScv(GridIndexType scvIdx) const
Get the sub control volume face indices of an scv by global index.
Definition: discretization/cellcentered/mpfa/fvgridgeometry.hh:220
Extrusion_t< Traits > Extrusion
export the type of extrusion
Definition: discretization/cellcentered/mpfa/fvgridgeometry.hh:103
bool vertexUsesSecondaryInteractionVolume(GridIndexType vIdxGlobal) const
Definition: discretization/cellcentered/mpfa/fvgridgeometry.hh:167
std::vector< ScvfOutsideGridIndexStorage > FlipScvfIndexSet
export the flip scvf index set type
Definition: discretization/cellcentered/mpfa/fvgridgeometry.hh:90
const ConnectivityMap & connectivityMap() const
Definition: discretization/cellcentered/mpfa/fvgridgeometry.hh:212
std::size_t numBoundaryScvf() const
The total number of boundary sub control volume faces.
Definition: discretization/cellcentered/mpfa/fvgridgeometry.hh:157
typename Traits::SubControlVolume SubControlVolume
export the type of sub control volume
Definition: discretization/cellcentered/mpfa/fvgridgeometry.hh:99
typename Traits::template GridIvIndexSets< ThisType > GridIVIndexSets
export the grid interaction volume index set type
Definition: discretization/cellcentered/mpfa/fvgridgeometry.hh:92
std::size_t numDofs() const
The total number of degrees of freedom.
Definition: discretization/cellcentered/mpfa/fvgridgeometry.hh:161
typename Traits::template LocalView< ThisType, true > LocalView
export the type of the fv element geometry (the local view type)
Definition: discretization/cellcentered/mpfa/fvgridgeometry.hh:97
void update(const GridView &gridView)
update all fvElementGeometries (call this after grid adaption)
Definition: discretization/cellcentered/mpfa/fvgridgeometry.hh:185
void update(GridView &&gridView)
update all fvElementGeometries (call this after grid adaption)
Definition: discretization/cellcentered/mpfa/fvgridgeometry.hh:192
const SubControlVolumeFace & scvf(GridIndexType scvfIdx) const
Get a sub control volume face with a global scvf index.
Definition: discretization/cellcentered/mpfa/fvgridgeometry.hh:207
std::size_t numScv() const
The total number of sub control volumes.
Definition: discretization/cellcentered/mpfa/fvgridgeometry.hh:149
const GridIVIndexSets & gridInteractionVolumeIndexSets() const
Returns the grid interaction volume index set class.
Definition: discretization/cellcentered/mpfa/fvgridgeometry.hh:216
const FlipScvfIndexSet & flipScvfIndexSet() const
Returns the flip scvf index set.
Definition: discretization/cellcentered/mpfa/fvgridgeometry.hh:224
CCMpfaFVGridGeometry(const GridView &gridView, const SecondaryIvIndicatorType &indicator)
Constructor with user-defined indicator function for secondary interaction volumes.
Definition: discretization/cellcentered/mpfa/fvgridgeometry.hh:135
std::function< bool(const Element &, const Intersection &, bool)> SecondaryIvIndicatorType
export the type to be used for indicators where to use the secondary ivs
Definition: discretization/cellcentered/mpfa/fvgridgeometry.hh:94
typename Traits::template ConnectivityMap< ThisType > ConnectivityMap
export the connectivity map type
Definition: discretization/cellcentered/mpfa/fvgridgeometry.hh:105
const DofMapper & dofMapper() const
Definition: discretization/cellcentered/mpfa/fvgridgeometry.hh:145
bool hasBoundaryScvf(GridIndexType eIdx) const
Returns whether one of the geometry's scvfs lies on a boundary.
Definition: discretization/cellcentered/mpfa/fvgridgeometry.hh:233
CCMpfaFVGridGeometry(const GridView &gridView)
Definition: discretization/cellcentered/mpfa/fvgridgeometry.hh:125
MpfaHelper mpfaHelper() const
Returns instance of the mpfa helper type.
Definition: discretization/cellcentered/mpfa/fvgridgeometry.hh:199
const SubControlVolume & scv(GridIndexType scvIdx) const
Get a sub control volume with a global scv index.
Definition: discretization/cellcentered/mpfa/fvgridgeometry.hh:203
constexpr bool vertexUsesSecondaryInteractionVolume(GridIndexType vIdxGlobal) const
Definition: discretization/cellcentered/mpfa/fvgridgeometry.hh:173
The finite volume geometry (scvs and scvfs) for cell-centered mpfa models on a grid view This builds ...
Definition: discretization/cellcentered/mpfa/fvgridgeometry.hh:465
std::function< bool(const Element &, const Intersection &, bool)> SecondaryIvIndicatorType
export the type to be used for indicators where to use the secondary ivs
Definition: discretization/cellcentered/mpfa/fvgridgeometry.hh:486
typename Traits::SubControlVolumeFace SubControlVolumeFace
export the type of sub control volume
Definition: discretization/cellcentered/mpfa/fvgridgeometry.hh:493
typename Traits::template ConnectivityMap< ThisType > ConnectivityMap
export the connectivity map type
Definition: discretization/cellcentered/mpfa/fvgridgeometry.hh:497
bool isGhostVertex(GridIndexType vIdxGlobal) const
Returns true if the vertex (index) lies on a processor boundary inside a ghost element.
Definition: discretization/cellcentered/mpfa/fvgridgeometry.hh:573
const GridIndexType flipScvfIdx(GridIndexType scvfIdx, unsigned int outsideScvfIdx=0) const
Definition: discretization/cellcentered/mpfa/fvgridgeometry.hh:612
void update(GridView &&gridView)
update all fvElementGeometries (call this after grid adaption)
Definition: discretization/cellcentered/mpfa/fvgridgeometry.hh:592
const GridIVIndexSets & gridInteractionVolumeIndexSets() const
Returns the grid interaction volume seeds class.
Definition: discretization/cellcentered/mpfa/fvgridgeometry.hh:625
Extrusion_t< Traits > Extrusion
export the type of extrusion
Definition: discretization/cellcentered/mpfa/fvgridgeometry.hh:495
typename Traits::template GridIvIndexSets< ThisType > GridIVIndexSets
export the grid interaction volume index set type
Definition: discretization/cellcentered/mpfa/fvgridgeometry.hh:484
const std::vector< ScvfOutsideGridIndexStorage > & neighborVolVarIndices(GridIndexType scvIdx) const
Returns the neighboring vol var indices for each scvf contained in an scv.
Definition: discretization/cellcentered/mpfa/fvgridgeometry.hh:607
CCMpfaFVGridGeometry(const GridView &gridView, const SecondaryIvIndicatorType &indicator)
Constructor with user-defined indicator function for secondary interaction volumes.
Definition: discretization/cellcentered/mpfa/fvgridgeometry.hh:527
const FlipScvfIndexSet & flipScvfIndexSet() const
Returns the flip scvf index set.
Definition: discretization/cellcentered/mpfa/fvgridgeometry.hh:616
CCMpfaFVGridGeometry(const GridView &gridView)
Definition: discretization/cellcentered/mpfa/fvgridgeometry.hh:517
std::size_t numScv() const
Returns the total number of sub control volumes.
Definition: discretization/cellcentered/mpfa/fvgridgeometry.hh:541
const std::vector< GridIndexType > & scvfIndicesOfScv(GridIndexType scvIdx) const
Returns the sub control volume face indices of an scv by global index.
Definition: discretization/cellcentered/mpfa/fvgridgeometry.hh:603
std::vector< ScvfOutsideGridIndexStorage > FlipScvfIndexSet
export the flip scvf index set type
Definition: discretization/cellcentered/mpfa/fvgridgeometry.hh:482
typename Traits::SubControlVolume SubControlVolume
export the type of sub control volume
Definition: discretization/cellcentered/mpfa/fvgridgeometry.hh:491
std::size_t numBoundaryScvf() const
Returns the number of scvfs on the domain boundary.
Definition: discretization/cellcentered/mpfa/fvgridgeometry.hh:549
typename Traits::ElementMapper DofMapper
export dof mapper type
Definition: discretization/cellcentered/mpfa/fvgridgeometry.hh:499
MpfaHelper mpfaHelper() const
Returns instance of the mpfa helper type.
Definition: discretization/cellcentered/mpfa/fvgridgeometry.hh:599
void update()
Updates all finite volume geometries of the grid. Has to be called again after grid adaption.
Definition: discretization/cellcentered/mpfa/fvgridgeometry.hh:578
const DofMapper & dofMapper() const
Definition: discretization/cellcentered/mpfa/fvgridgeometry.hh:537
const ConnectivityMap & connectivityMap() const
Definition: discretization/cellcentered/mpfa/fvgridgeometry.hh:621
bool isGhostVertex(const Vertex &v) const
Returns true if a given vertex lies on a processor boundary inside a ghost element.
Definition: discretization/cellcentered/mpfa/fvgridgeometry.hh:569
typename Traits::template MpfaHelper< ThisType > MpfaHelper
export the mpfa helper type
Definition: discretization/cellcentered/mpfa/fvgridgeometry.hh:503
typename Traits::template LocalView< ThisType, false > LocalView
export the type of the fv element geometry (the local view type)
Definition: discretization/cellcentered/mpfa/fvgridgeometry.hh:489
bool vertexUsesSecondaryInteractionVolume(GridIndexType vIdxGlobal) const
Definition: discretization/cellcentered/mpfa/fvgridgeometry.hh:559
constexpr bool vertexUsesSecondaryInteractionVolume(GridIndexType vIdxGlobal) const
Definition: discretization/cellcentered/mpfa/fvgridgeometry.hh:565
std::size_t numScvf() const
Returns the total number of sub control volume faces.
Definition: discretization/cellcentered/mpfa/fvgridgeometry.hh:545
void update(const GridView &gridView)
update all fvElementGeometries (call this after grid adaption)
Definition: discretization/cellcentered/mpfa/fvgridgeometry.hh:585
std::size_t numDofs() const
Returns the total number of degrees of freedom.
Definition: discretization/cellcentered/mpfa/fvgridgeometry.hh:553
Check if the overlap size is valid for a given discretization method.
Definition: checkoverlapsize.hh:40