14#ifndef DUMUX_DISCRETIZATION_CC_MPFA_FV_GRID_GEOMETRY_HH
15#define DUMUX_DISCRETIZATION_CC_MPFA_FV_GRID_GEOMETRY_HH
39template<
class Gr
idView,
class Traits,
bool enableCache>
43template<
class Gr
idView>
48 DUNE_THROW(Dune::InvalidStateException,
"The ccmpfa discretization method needs at least an overlap of 1 for parallel computations. "
49 <<
" Set the parameter \"Grid.Overlap\" in the input file.");
58template<
class GV,
class Traits>
65 static constexpr int dim = GV::dimension;
66 static constexpr int dimWorld = GV::dimensionworld;
68 using Element =
typename GV::template Codim<0>::Entity;
69 using Vertex =
typename GV::template Codim<dim>::Entity;
70 using Intersection =
typename GV::Intersection;
72 using CoordScalar =
typename GV::ctype;
74 using ScvfOutsideGridIndexStorage =
typename Traits::SubControlVolumeFace::Traits::OutsideGridIndexStorage;
106 static constexpr int maxElementStencilSize = Traits::maxElementStencilSize;
109 static constexpr bool hasSingleInteractionVolumeType = !MpfaHelper::considerSecondaryIVs();
115 , secondaryIvIndicator_([] (const Element& e, const Intersection& is, bool isBranching)
116 {
return is.boundary() || isBranching; } )
125 , secondaryIvIndicator_(indicator)
134 {
return this->elementMapper(); }
138 {
return scvs_.size(); }
142 {
return scvfs_.size(); }
146 {
return numBoundaryScvf_; }
150 {
return this->gridView().size(0); }
154 template<
bool useSecondary = !hasSingleInteractionVolumeType, std::enable_if_t<useSecondary,
bool> = 0>
156 {
return secondaryInteractionVolumeVertices_[vIdxGlobal]; }
160 template<
bool useSecondary = !hasSingleInteractionVolumeType, std::enable_if_t<!useSecondary,
bool> = 0>
168 ParentType::update(gridView);
175 ParentType::update(std::move(gridView));
185 {
return scvs_[scvIdx]; }
189 {
return scvfs_[scvfIdx]; }
194 {
return connectivityMap_; }
198 {
return ivIndexSets_; }
202 {
return scvfIndicesOfScv_[scvIdx]; }
206 {
return flipScvfIndices_; }
211 {
return scvfs_[flipScvfIndices_[scvfIdx][outsideScvfIdx]]; }
215 {
return hasBoundaryScvf_[eIdx]; }
228 const auto numVert = this->gridView().size(dim);
229 const auto numScvs = numDofs();
230 std::size_t numScvf = MpfaHelper::getGlobalNumScvf(this->gridView());
233 scvs_.resize(numScvs);
234 scvfs_.reserve(numScvf);
235 scvfIndicesOfScv_.resize(numScvs);
236 hasBoundaryScvf_.assign(numScvs,
false);
240 secondaryInteractionVolumeVertices_.assign(numVert,
false);
243 const auto isGhostVertex = MpfaHelper::findGhostVertices(this->gridView(), this->vertexMapper());
246 typename GridIVIndexSets::DualGridIndexSet dualIdSet(this->gridView());
249 GridIndexType scvfIdx = 0;
250 numBoundaryScvf_ = 0;
251 for (
const auto& element : elements(this->gridView()))
253 const auto eIdx = this->elementMapper().index(element);
256 auto elementGeometry = element.geometry();
259 std::vector<GridIndexType> scvfIndexSet;
260 scvfIndexSet.reserve(MpfaHelper::getNumLocalScvfs(elementGeometry.type()));
264 std::vector<ScvfOutsideGridIndexStorage> outsideIndices;
267 outsideIndices.resize(element.subEntities(1));
268 for (
const auto& intersection : intersections(this->gridView(), element))
270 if (intersection.neighbor())
272 const auto nIdx = this->elementMapper().index( intersection.outside() );
273 outsideIndices[intersection.indexInInside()].push_back(nIdx);
279 for (
const auto& is : intersections(this->gridView(), element))
281 const auto indexInInside = is.indexInInside();
282 const bool boundary = is.boundary();
283 const bool neighbor = is.neighbor();
286 hasBoundaryScvf_[eIdx] =
true;
289 if (dim < dimWorld && neighbor && outsideIndices[indexInInside].empty())
293 const bool useNeighbor = neighbor && is.outside().level() >
element.level();
294 const auto& e = useNeighbor ? is.outside() :
element;
295 const auto indexInElement = useNeighbor ? is.indexInOutside() : indexInInside;
296 const auto eg = e.geometry();
297 const auto refElement = referenceElement(eg);
300 const auto numCorners = is.geometry().corners();
301 const auto isPositions = MpfaHelper::computeScvfCornersOnIntersection(eg,
307 const bool isBranchingPoint = dim < dimWorld ? outsideIndices[indexInInside].size() > 1 :
false;
308 const bool usesSecondaryIV = secondaryIvIndicator_(element, is, isBranchingPoint);
314 const auto vIdxLocal = refElement.subEntity(indexInElement, 1, c, dim);
315 const auto vIdxGlobal = this->vertexMapper().subIndex(e, vIdxLocal, dim);
318 if (isGhostVertex[vIdxGlobal])
323 secondaryInteractionVolumeVertices_[vIdxGlobal] =
true;
326 static const auto q = getParam<CoordScalar>(
"MPFA.Q");
329 const auto& outsideScvIndices = [&] ()
332 return dim == dimWorld ?
333 ScvfOutsideGridIndexStorage({this->elementMapper().index(is.outside())}) :
334 outsideIndices[indexInInside];
336 return ScvfOutsideGridIndexStorage({GridIndexType(numScvs) + numBoundaryScvf_++});
339 scvfIndexSet.push_back(scvfIdx);
340 scvfs_.emplace_back(MpfaHelper(),
341 MpfaHelper::getScvfCorners(isPositions,
numCorners, c),
352 dualIdSet[vIdxGlobal].insert(scvfs_.back());
360 outsideIndices[indexInInside].clear();
364 scvs_[eIdx] = SubControlVolume(std::move(elementGeometry), eIdx);
367 scvfIndicesOfScv_[eIdx] = scvfIndexSet;
371 flipScvfIndices_.resize(scvfs_.size());
372 for (
const auto& scvf : scvfs_)
377 const auto numOutsideScvs = scvf.numOutsideScvs();
378 const auto vIdxGlobal = scvf.vertexIndex();
379 const auto insideScvIdx = scvf.insideScvIdx();
381 flipScvfIndices_[scvf.index()].resize(numOutsideScvs);
382 for (std::size_t i = 0; i < numOutsideScvs; ++i)
384 const auto outsideScvIdx = scvf.outsideScvIdx(i);
385 for (
auto outsideScvfIndex : scvfIndicesOfScv_[outsideScvIdx])
387 const auto& outsideScvf = this->scvf(outsideScvfIndex);
388 if (outsideScvf.vertexIndex() == vIdxGlobal &&
389 MpfaHelper::vectorContainsValue(outsideScvf.outsideScvIndices(), insideScvIdx))
391 flipScvfIndices_[scvf.index()][i] = outsideScvfIndex;
400 std::cout <<
"Initializing of the grid finite volume geometry took " << timer.elapsed() <<
" seconds." << std::endl;
404 ivIndexSets_.update(*
this, std::move(dualIdSet));
405 std::cout <<
"Initializing of the grid interaction volume index sets took " << timer.elapsed() <<
" seconds." << std::endl;
409 connectivityMap_.update(*
this);
410 std::cout <<
"Initializing of the connectivity map took " << timer.elapsed() <<
" seconds." << std::endl;
414 ConnectivityMap connectivityMap_;
417 std::vector<SubControlVolume> scvs_;
418 std::vector<SubControlVolumeFace> scvfs_;
421 std::vector<std::vector<GridIndexType>> scvfIndicesOfScv_;
422 std::vector<bool> secondaryInteractionVolumeVertices_;
423 GridIndexType numBoundaryScvf_;
424 std::vector<bool> hasBoundaryScvf_;
427 FlipScvfIndexSet flipScvfIndices_;
430 GridIVIndexSets ivIndexSets_;
433 SecondaryIvIndicatorType secondaryIvIndicator_;
443template<
class GV,
class Traits>
450 static constexpr int dim = GV::dimension;
451 static constexpr int dimWorld = GV::dimensionworld;
453 using Element =
typename GV::template Codim<0>::Entity;
454 using Vertex =
typename GV::template Codim<dim>::Entity;
455 using Intersection =
typename GV::Intersection;
457 using CoordScalar =
typename GV::ctype;
459 using ScvfOutsideGridIndexStorage =
typename Traits::SubControlVolumeFace::Traits::OutsideGridIndexStorage;
491 static constexpr int maxElementStencilSize = Traits::maxElementStencilSize;
494 static constexpr bool hasSingleInteractionVolumeType = !MpfaHelper::considerSecondaryIVs();
500 , secondaryIvIndicator_([] (const Element& e, const Intersection& is, bool isBranching)
501 {
return is.boundary() || isBranching; } )
510 , secondaryIvIndicator_(indicator)
519 {
return this->elementMapper(); }
531 {
return numBoundaryScvf_; }
535 {
return this->gridView().size(0); }
539 template<
bool useSecondary = !hasSingleInteractionVolumeType, std::enable_if_t<useSecondary,
bool> = 0>
541 {
return secondaryInteractionVolumeVertices_[vIdxGlobal]; }
545 template<
bool useSecondary = !hasSingleInteractionVolumeType, std::enable_if_t<!useSecondary,
bool> = 0>
551 {
return isGhostVertex_[this->vertexMapper().index(v)]; }
555 {
return isGhostVertex_[vIdxGlobal]; }
561 ParentType::update(gridView);
568 ParentType::update(std::move(gridView));
578 {
return scvfIndicesOfScv_[scvIdx]; }
582 {
return neighborVolVarIndices_[scvIdx]; }
586 const GridIndexType
flipScvfIdx(GridIndexType scvfIdx,
unsigned int outsideScvfIdx = 0)
const
587 {
return flipScvfIndices_[scvfIdx][outsideScvfIdx]; }
591 {
return flipScvfIndices_; }
596 {
return connectivityMap_; }
600 {
return ivIndexSets_; }
611 numScvs_ = numDofs();
612 scvfIndicesOfScv_.resize(numScvs_);
613 neighborVolVarIndices_.resize(numScvs_);
617 const auto numVert = this->gridView().size(dim);
618 secondaryInteractionVolumeVertices_.assign(numVert,
false);
621 isGhostVertex_ = MpfaHelper::findGhostVertices(this->gridView(), this->vertexMapper());
624 typename GridIVIndexSets::DualGridIndexSet dualIdSet(this->gridView());
627 const auto maxNumScvfs = numScvs_*LocalView::maxNumElementScvfs;
628 std::vector<bool> scvfIsOnBoundary;
629 std::vector<GridIndexType> scvfVertexIndex;
630 scvfIsOnBoundary.reserve(maxNumScvfs);
631 scvfVertexIndex.reserve(maxNumScvfs);
635 numBoundaryScvf_ = 0;
636 for (
const auto& element : elements(this->gridView()))
638 const auto eIdx = this->elementMapper().index(element);
641 auto elementGeometry = element.geometry();
644 const auto numLocalFaces = MpfaHelper::getNumLocalScvfs(elementGeometry.type());
645 std::vector<GridIndexType> scvfsIndexSet;
646 std::vector<ScvfOutsideGridIndexStorage> neighborVolVarIndexSet;
647 scvfsIndexSet.reserve(numLocalFaces);
648 neighborVolVarIndexSet.reserve(numLocalFaces);
652 std::vector<ScvfOutsideGridIndexStorage> outsideIndices;
655 outsideIndices.resize(element.subEntities(1));
656 for (
const auto& intersection : intersections(this->gridView(), element))
658 if (intersection.neighbor())
660 auto nIdx = this->elementMapper().index( intersection.outside() );
661 outsideIndices[intersection.indexInInside()].push_back(nIdx);
667 for (
const auto& is : intersections(this->gridView(), element))
669 const auto indexInInside = is.indexInInside();
670 const bool boundary = is.boundary();
671 const bool neighbor = is.neighbor();
674 if (dim < dimWorld && neighbor && outsideIndices[indexInInside].empty())
678 const bool useNeighbor = neighbor && is.outside().level() >
element.level();
679 const auto& e = useNeighbor ? is.outside() :
element;
680 const auto indexInElement = useNeighbor ? is.indexInOutside() : indexInInside;
681 const auto eg = e.geometry();
682 const auto refElement = referenceElement(eg);
685 const bool isBranchingPoint = dim < dimWorld ? outsideIndices[indexInInside].size() > 1 :
false;
686 const bool usesSecondaryIV = secondaryIvIndicator_(element, is, isBranchingPoint);
689 for (std::size_t c = 0; c < is.geometry().corners(); ++c)
692 const auto vIdxLocal = refElement.subEntity(indexInElement, 1, c, dim);
693 const auto vIdxGlobal = this->vertexMapper().subIndex(e, vIdxLocal, dim);
696 if (isGhostVertex_[vIdxGlobal])
701 secondaryInteractionVolumeVertices_[vIdxGlobal] =
true;
704 const auto& outsideScvIndices = [&] ()
707 return dim == dimWorld ?
708 ScvfOutsideGridIndexStorage({this->elementMapper().index(is.outside())}) :
709 outsideIndices[indexInInside];
711 return ScvfOutsideGridIndexStorage({GridIndexType(numScvs_) + numBoundaryScvf_++});
715 dualIdSet[vIdxGlobal].insert(numScvf_, eIdx, boundary);
718 scvfsIndexSet.push_back(numScvf_++);
719 scvfIsOnBoundary.push_back(boundary);
720 scvfVertexIndex.push_back(vIdxGlobal);
721 neighborVolVarIndexSet.emplace_back(std::move(outsideScvIndices));
726 outsideIndices[indexInInside].clear();
730 scvfIndicesOfScv_[eIdx] = scvfsIndexSet;
731 neighborVolVarIndices_[eIdx] = neighborVolVarIndexSet;
735 flipScvfIndices_.resize(numScvf_);
736 for (std::size_t scvIdx = 0; scvIdx < numScvs_; ++scvIdx)
738 const auto& scvfIndices = scvfIndicesOfScv_[scvIdx];
739 for (
unsigned int i = 0; i < scvfIndices.size(); ++i)
742 if (scvfIsOnBoundary[ scvfIndices[i] ])
745 const auto scvfIdx = scvfIndices[i];
746 const auto vIdxGlobal = scvfVertexIndex[scvfIdx];
747 const auto numOutsideScvs = neighborVolVarIndices_[scvIdx][i].size();
749 flipScvfIndices_[scvfIdx].resize(numOutsideScvs);
750 for (
unsigned int j = 0; j < numOutsideScvs; ++j)
752 const auto outsideScvIdx = neighborVolVarIndices_[scvIdx][i][j];
753 const auto& outsideScvfIndices = scvfIndicesOfScv_[outsideScvIdx];
754 for (
unsigned int k = 0; k < outsideScvfIndices.size(); ++k)
756 const auto outsideScvfIndex = outsideScvfIndices[k];
757 const auto outsideScvfVertexIndex = scvfVertexIndex[outsideScvfIndex];
758 const auto& outsideScvfNeighborIndices = neighborVolVarIndices_[outsideScvIdx][k];
759 if (outsideScvfVertexIndex == vIdxGlobal &&
760 MpfaHelper::vectorContainsValue(outsideScvfNeighborIndices, scvIdx))
762 flipScvfIndices_[scvfIdx][j] = outsideScvfIndex;
772 std::cout <<
"Initializing of the grid finite volume geometry took " << timer.elapsed() <<
" seconds." << std::endl;
776 ivIndexSets_.update(*
this, std::move(dualIdSet));
777 std::cout <<
"Initializing of the grid interaction volume index sets took " << timer.elapsed() <<
" seconds." << std::endl;
781 connectivityMap_.update(*
this);
782 std::cout <<
"Initializing of the connectivity map took " << timer.elapsed() <<
" seconds." << std::endl;
786 ConnectivityMap connectivityMap_;
789 std::vector<std::vector<GridIndexType>> scvfIndicesOfScv_;
790 std::vector<std::vector<ScvfOutsideGridIndexStorage>> neighborVolVarIndices_;
791 std::vector<bool> secondaryInteractionVolumeVertices_;
792 std::vector<bool> isGhostVertex_;
793 GridIndexType numScvs_;
794 GridIndexType numScvf_;
795 GridIndexType numBoundaryScvf_;
798 FlipScvfIndexSet flipScvfIndices_;
801 GridIVIndexSets ivIndexSets_;
804 SecondaryIvIndicatorType secondaryIvIndicator_;
Base class for grid geometries.
Check the overlap size for different discretization methods.
Base class for all grid geometries.
Definition: basegridgeometry.hh:52
typename BaseImplementation::GridView GridView
export the grid view type
Definition: basegridgeometry.hh:60
The finite volume geometry (scvs and scvfs) for cell-centered mpfa models on a grid view This builds ...
Definition: discretization/cellcentered/mpfa/fvgridgeometry.hh:446
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:467
typename Traits::SubControlVolumeFace SubControlVolumeFace
export the type of sub control volume
Definition: discretization/cellcentered/mpfa/fvgridgeometry.hh:474
typename Traits::template ConnectivityMap< ThisType > ConnectivityMap
export the connectivity map type
Definition: discretization/cellcentered/mpfa/fvgridgeometry.hh:478
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:554
const GridIndexType flipScvfIdx(GridIndexType scvfIdx, unsigned int outsideScvfIdx=0) const
Definition: discretization/cellcentered/mpfa/fvgridgeometry.hh:586
void update(GridView &&gridView)
update all fvElementGeometries (call this after grid adaption)
Definition: discretization/cellcentered/mpfa/fvgridgeometry.hh:566
const GridIVIndexSets & gridInteractionVolumeIndexSets() const
Returns the grid interaction volume seeds class.
Definition: discretization/cellcentered/mpfa/fvgridgeometry.hh:599
Extrusion_t< Traits > Extrusion
export the type of extrusion
Definition: discretization/cellcentered/mpfa/fvgridgeometry.hh:476
typename Traits::template GridIvIndexSets< ThisType > GridIVIndexSets
export the grid interaction volume index set type
Definition: discretization/cellcentered/mpfa/fvgridgeometry.hh:465
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:581
CCMpfaFVGridGeometry(const GridView &gridView, const SecondaryIvIndicatorType &indicator)
Constructor with user-defined indicator function for secondary interaction volumes.
Definition: discretization/cellcentered/mpfa/fvgridgeometry.hh:508
const FlipScvfIndexSet & flipScvfIndexSet() const
Returns the flip scvf index set.
Definition: discretization/cellcentered/mpfa/fvgridgeometry.hh:590
CCMpfaFVGridGeometry(const GridView &gridView)
Definition: discretization/cellcentered/mpfa/fvgridgeometry.hh:498
std::size_t numScv() const
Returns the total number of sub control volumes.
Definition: discretization/cellcentered/mpfa/fvgridgeometry.hh:522
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:577
std::vector< ScvfOutsideGridIndexStorage > FlipScvfIndexSet
export the flip scvf index set type
Definition: discretization/cellcentered/mpfa/fvgridgeometry.hh:463
typename Traits::SubControlVolume SubControlVolume
export the type of sub control volume
Definition: discretization/cellcentered/mpfa/fvgridgeometry.hh:472
std::size_t numBoundaryScvf() const
Returns the number of scvfs on the domain boundary.
Definition: discretization/cellcentered/mpfa/fvgridgeometry.hh:530
typename Traits::ElementMapper DofMapper
export dof mapper type
Definition: discretization/cellcentered/mpfa/fvgridgeometry.hh:480
MpfaHelper mpfaHelper() const
Returns instance of the mpfa helper type.
Definition: discretization/cellcentered/mpfa/fvgridgeometry.hh:573
const DofMapper & dofMapper() const
Definition: discretization/cellcentered/mpfa/fvgridgeometry.hh:518
const ConnectivityMap & connectivityMap() const
Definition: discretization/cellcentered/mpfa/fvgridgeometry.hh:595
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:550
typename Traits::template MpfaHelper< ThisType > MpfaHelper
export the mpfa helper type
Definition: discretization/cellcentered/mpfa/fvgridgeometry.hh:484
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:470
bool vertexUsesSecondaryInteractionVolume(GridIndexType vIdxGlobal) const
Definition: discretization/cellcentered/mpfa/fvgridgeometry.hh:540
constexpr bool vertexUsesSecondaryInteractionVolume(GridIndexType vIdxGlobal) const
Definition: discretization/cellcentered/mpfa/fvgridgeometry.hh:546
std::size_t numScvf() const
Returns the total number of sub control volume faces.
Definition: discretization/cellcentered/mpfa/fvgridgeometry.hh:526
void update(const GridView &gridView)
update all fvElementGeometries (call this after grid adaption)
Definition: discretization/cellcentered/mpfa/fvgridgeometry.hh:559
std::size_t numDofs() const
Returns the total number of degrees of freedom.
Definition: discretization/cellcentered/mpfa/fvgridgeometry.hh:534
The finite volume geometry (scvs and scvfs) for cell-centered mpfa models on a grid view This builds ...
Definition: discretization/cellcentered/mpfa/fvgridgeometry.hh:61
typename Traits::ElementMapper DofMapper
export dof mapper type
Definition: discretization/cellcentered/mpfa/fvgridgeometry.hh:95
typename Traits::SubControlVolumeFace SubControlVolumeFace
export the type of sub control volume
Definition: discretization/cellcentered/mpfa/fvgridgeometry.hh:89
std::size_t numScvf() const
The total number of sub control volume faces.
Definition: discretization/cellcentered/mpfa/fvgridgeometry.hh:141
typename Traits::template MpfaHelper< ThisType > MpfaHelper
export the mpfa helper type
Definition: discretization/cellcentered/mpfa/fvgridgeometry.hh:99
const SubControlVolumeFace & flipScvf(GridIndexType scvfIdx, unsigned int outsideScvfIdx=0) const
Definition: discretization/cellcentered/mpfa/fvgridgeometry.hh:210
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:201
Extrusion_t< Traits > Extrusion
export the type of extrusion
Definition: discretization/cellcentered/mpfa/fvgridgeometry.hh:91
bool vertexUsesSecondaryInteractionVolume(GridIndexType vIdxGlobal) const
Definition: discretization/cellcentered/mpfa/fvgridgeometry.hh:155
std::vector< ScvfOutsideGridIndexStorage > FlipScvfIndexSet
export the flip scvf index set type
Definition: discretization/cellcentered/mpfa/fvgridgeometry.hh:78
const ConnectivityMap & connectivityMap() const
Definition: discretization/cellcentered/mpfa/fvgridgeometry.hh:193
std::size_t numBoundaryScvf() const
The total number of boundary sub control volume faces.
Definition: discretization/cellcentered/mpfa/fvgridgeometry.hh:145
typename Traits::SubControlVolume SubControlVolume
export the type of sub control volume
Definition: discretization/cellcentered/mpfa/fvgridgeometry.hh:87
typename Traits::template GridIvIndexSets< ThisType > GridIVIndexSets
export the grid interaction volume index set type
Definition: discretization/cellcentered/mpfa/fvgridgeometry.hh:80
std::size_t numDofs() const
The total number of degrees of freedom.
Definition: discretization/cellcentered/mpfa/fvgridgeometry.hh:149
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:85
void update(const GridView &gridView)
update all fvElementGeometries (call this after grid adaption)
Definition: discretization/cellcentered/mpfa/fvgridgeometry.hh:166
void update(GridView &&gridView)
update all fvElementGeometries (call this after grid adaption)
Definition: discretization/cellcentered/mpfa/fvgridgeometry.hh:173
const SubControlVolumeFace & scvf(GridIndexType scvfIdx) const
Get a sub control volume face with a global scvf index.
Definition: discretization/cellcentered/mpfa/fvgridgeometry.hh:188
std::size_t numScv() const
The total number of sub control volumes.
Definition: discretization/cellcentered/mpfa/fvgridgeometry.hh:137
const GridIVIndexSets & gridInteractionVolumeIndexSets() const
Returns the grid interaction volume index set class.
Definition: discretization/cellcentered/mpfa/fvgridgeometry.hh:197
const FlipScvfIndexSet & flipScvfIndexSet() const
Returns the flip scvf index set.
Definition: discretization/cellcentered/mpfa/fvgridgeometry.hh:205
CCMpfaFVGridGeometry(const GridView &gridView, const SecondaryIvIndicatorType &indicator)
Constructor with user-defined indicator function for secondary interaction volumes.
Definition: discretization/cellcentered/mpfa/fvgridgeometry.hh:123
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:82
typename Traits::template ConnectivityMap< ThisType > ConnectivityMap
export the connectivity map type
Definition: discretization/cellcentered/mpfa/fvgridgeometry.hh:93
const DofMapper & dofMapper() const
Definition: discretization/cellcentered/mpfa/fvgridgeometry.hh:133
bool hasBoundaryScvf(GridIndexType eIdx) const
Returns whether one of the geometry's scvfs lies on a boundary.
Definition: discretization/cellcentered/mpfa/fvgridgeometry.hh:214
CCMpfaFVGridGeometry(const GridView &gridView)
Definition: discretization/cellcentered/mpfa/fvgridgeometry.hh:113
MpfaHelper mpfaHelper() const
Returns instance of the mpfa helper type.
Definition: discretization/cellcentered/mpfa/fvgridgeometry.hh:180
const SubControlVolume & scv(GridIndexType scvIdx) const
Get a sub control volume with a global scv index.
Definition: discretization/cellcentered/mpfa/fvgridgeometry.hh:184
constexpr bool vertexUsesSecondaryInteractionVolume(GridIndexType vIdxGlobal) const
Definition: discretization/cellcentered/mpfa/fvgridgeometry.hh:161
The finite volume geometry (scvs and scvfs) for cell-centered mpfa models on a grid view This builds ...
Definition: discretization/cellcentered/mpfa/fvgridgeometry.hh:40
Helper classes to compute the integration elements.
The available discretization methods in Dumux.
std::size_t numCorners(Shape shape)
Returns the number of corners of a given geometry.
Definition: throatproperties.hh:220
typename Extrusion< T >::type Extrusion_t
Convenience alias for obtaining the extrusion type.
Definition: extrusion.hh:166
void checkOverlapSizeCCMpfa(const GridView &gridView)
check the overlap size for parallel computations
Definition: discretization/cellcentered/mpfa/fvgridgeometry.hh:44
The infrastructure to retrieve run-time parameters from Dune::ParameterTrees.
Check if the overlap size is valid for a given discretization method.
Definition: checkoverlapsize.hh:28
Structure to define the index types used for grid and local indices.
Definition: indextraits.hh:26