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 typename SubControlVolumeFace::FacetInfo facetInfo{
341 this->elementMapper().index(e),
342 useNeighbor ? is.indexInOutside() : is.indexInInside(),
345 scvfs_.emplace_back(MpfaHelper(),
346 MpfaHelper::getScvfCorners(isPositions,
numCorners, c),
348 std::move(facetInfo),
358 dualIdSet[vIdxGlobal].insert(scvfs_.back());
366 outsideIndices[indexInInside].clear();
370 scvs_[eIdx] = SubControlVolume(std::move(elementGeometry), eIdx);
373 scvfIndicesOfScv_[eIdx] = scvfIndexSet;
377 flipScvfIndices_.resize(scvfs_.size());
378 for (
const auto& scvf : scvfs_)
383 const auto numOutsideScvs = scvf.numOutsideScvs();
384 const auto vIdxGlobal = scvf.vertexIndex();
385 const auto insideScvIdx = scvf.insideScvIdx();
387 flipScvfIndices_[scvf.index()].resize(numOutsideScvs);
388 for (std::size_t i = 0; i < numOutsideScvs; ++i)
390 const auto outsideScvIdx = scvf.outsideScvIdx(i);
391 for (
auto outsideScvfIndex : scvfIndicesOfScv_[outsideScvIdx])
393 const auto& outsideScvf = this->scvf(outsideScvfIndex);
394 if (outsideScvf.vertexIndex() == vIdxGlobal &&
395 MpfaHelper::vectorContainsValue(outsideScvf.outsideScvIndices(), insideScvIdx))
397 flipScvfIndices_[scvf.index()][i] = outsideScvfIndex;
406 std::cout <<
"Initializing of the grid finite volume geometry took " << timer.elapsed() <<
" seconds." << std::endl;
410 ivIndexSets_.update(*
this, std::move(dualIdSet));
411 std::cout <<
"Initializing of the grid interaction volume index sets took " << timer.elapsed() <<
" seconds." << std::endl;
415 connectivityMap_.update(*
this);
416 std::cout <<
"Initializing of the connectivity map took " << timer.elapsed() <<
" seconds." << std::endl;
420 ConnectivityMap connectivityMap_;
423 std::vector<SubControlVolume> scvs_;
424 std::vector<SubControlVolumeFace> scvfs_;
427 std::vector<std::vector<GridIndexType>> scvfIndicesOfScv_;
428 std::vector<bool> secondaryInteractionVolumeVertices_;
429 GridIndexType numBoundaryScvf_;
430 std::vector<bool> hasBoundaryScvf_;
433 FlipScvfIndexSet flipScvfIndices_;
436 GridIVIndexSets ivIndexSets_;
439 SecondaryIvIndicatorType secondaryIvIndicator_;
449template<
class GV,
class Traits>
456 static constexpr int dim = GV::dimension;
457 static constexpr int dimWorld = GV::dimensionworld;
459 using Element =
typename GV::template Codim<0>::Entity;
460 using Vertex =
typename GV::template Codim<dim>::Entity;
461 using Intersection =
typename GV::Intersection;
463 using CoordScalar =
typename GV::ctype;
465 using ScvfOutsideGridIndexStorage =
typename Traits::SubControlVolumeFace::Traits::OutsideGridIndexStorage;
497 static constexpr int maxElementStencilSize = Traits::maxElementStencilSize;
500 static constexpr bool hasSingleInteractionVolumeType = !MpfaHelper::considerSecondaryIVs();
506 , secondaryIvIndicator_([] (const Element& e, const Intersection& is, bool isBranching)
507 {
return is.boundary() || isBranching; } )
516 , secondaryIvIndicator_(indicator)
525 {
return this->elementMapper(); }
537 {
return numBoundaryScvf_; }
541 {
return this->gridView().size(0); }
545 template<
bool useSecondary = !hasSingleInteractionVolumeType, std::enable_if_t<useSecondary,
bool> = 0>
547 {
return secondaryInteractionVolumeVertices_[vIdxGlobal]; }
551 template<
bool useSecondary = !hasSingleInteractionVolumeType, std::enable_if_t<!useSecondary,
bool> = 0>
557 {
return isGhostVertex_[this->vertexMapper().index(v)]; }
561 {
return isGhostVertex_[vIdxGlobal]; }
567 ParentType::update(gridView);
574 ParentType::update(std::move(gridView));
584 {
return scvfIndicesOfScv_[scvIdx]; }
588 {
return neighborVolVarIndices_[scvIdx]; }
592 const GridIndexType
flipScvfIdx(GridIndexType scvfIdx,
unsigned int outsideScvfIdx = 0)
const
593 {
return flipScvfIndices_[scvfIdx][outsideScvfIdx]; }
597 {
return flipScvfIndices_; }
602 {
return connectivityMap_; }
606 {
return ivIndexSets_; }
617 numScvs_ = numDofs();
618 scvfIndicesOfScv_.resize(numScvs_);
619 neighborVolVarIndices_.resize(numScvs_);
623 const auto numVert = this->gridView().size(dim);
624 secondaryInteractionVolumeVertices_.assign(numVert,
false);
627 isGhostVertex_ = MpfaHelper::findGhostVertices(this->gridView(), this->vertexMapper());
630 typename GridIVIndexSets::DualGridIndexSet dualIdSet(this->gridView());
633 const auto maxNumScvfs = numScvs_*LocalView::maxNumElementScvfs;
634 std::vector<bool> scvfIsOnBoundary;
635 std::vector<GridIndexType> scvfVertexIndex;
636 scvfIsOnBoundary.reserve(maxNumScvfs);
637 scvfVertexIndex.reserve(maxNumScvfs);
641 numBoundaryScvf_ = 0;
642 for (
const auto& element : elements(this->gridView()))
644 const auto eIdx = this->elementMapper().index(element);
647 auto elementGeometry = element.geometry();
650 const auto numLocalFaces = MpfaHelper::getNumLocalScvfs(elementGeometry.type());
651 std::vector<GridIndexType> scvfsIndexSet;
652 std::vector<ScvfOutsideGridIndexStorage> neighborVolVarIndexSet;
653 scvfsIndexSet.reserve(numLocalFaces);
654 neighborVolVarIndexSet.reserve(numLocalFaces);
658 std::vector<ScvfOutsideGridIndexStorage> outsideIndices;
661 outsideIndices.resize(element.subEntities(1));
662 for (
const auto& intersection : intersections(this->gridView(), element))
664 if (intersection.neighbor())
666 auto nIdx = this->elementMapper().index( intersection.outside() );
667 outsideIndices[intersection.indexInInside()].push_back(nIdx);
673 for (
const auto& is : intersections(this->gridView(), element))
675 const auto indexInInside = is.indexInInside();
676 const bool boundary = is.boundary();
677 const bool neighbor = is.neighbor();
680 if (dim < dimWorld && neighbor && outsideIndices[indexInInside].empty())
684 const bool useNeighbor = neighbor && is.outside().level() >
element.level();
685 const auto& e = useNeighbor ? is.outside() :
element;
686 const auto indexInElement = useNeighbor ? is.indexInOutside() : indexInInside;
687 const auto eg = e.geometry();
688 const auto refElement = referenceElement(eg);
691 const bool isBranchingPoint = dim < dimWorld ? outsideIndices[indexInInside].size() > 1 :
false;
692 const bool usesSecondaryIV = secondaryIvIndicator_(element, is, isBranchingPoint);
695 for (std::size_t c = 0; c < is.geometry().corners(); ++c)
698 const auto vIdxLocal = refElement.subEntity(indexInElement, 1, c, dim);
699 const auto vIdxGlobal = this->vertexMapper().subIndex(e, vIdxLocal, dim);
702 if (isGhostVertex_[vIdxGlobal])
707 secondaryInteractionVolumeVertices_[vIdxGlobal] =
true;
710 const auto& outsideScvIndices = [&] ()
713 return dim == dimWorld ?
714 ScvfOutsideGridIndexStorage({this->elementMapper().index(is.outside())}) :
715 outsideIndices[indexInInside];
717 return ScvfOutsideGridIndexStorage({GridIndexType(numScvs_) + numBoundaryScvf_++});
721 dualIdSet[vIdxGlobal].insert(numScvf_, eIdx, boundary);
724 scvfsIndexSet.push_back(numScvf_++);
725 scvfIsOnBoundary.push_back(boundary);
726 scvfVertexIndex.push_back(vIdxGlobal);
727 neighborVolVarIndexSet.emplace_back(std::move(outsideScvIndices));
732 outsideIndices[indexInInside].clear();
736 scvfIndicesOfScv_[eIdx] = scvfsIndexSet;
737 neighborVolVarIndices_[eIdx] = neighborVolVarIndexSet;
741 flipScvfIndices_.resize(numScvf_);
742 for (std::size_t scvIdx = 0; scvIdx < numScvs_; ++scvIdx)
744 const auto& scvfIndices = scvfIndicesOfScv_[scvIdx];
745 for (
unsigned int i = 0; i < scvfIndices.size(); ++i)
748 if (scvfIsOnBoundary[ scvfIndices[i] ])
751 const auto scvfIdx = scvfIndices[i];
752 const auto vIdxGlobal = scvfVertexIndex[scvfIdx];
753 const auto numOutsideScvs = neighborVolVarIndices_[scvIdx][i].size();
755 flipScvfIndices_[scvfIdx].resize(numOutsideScvs);
756 for (
unsigned int j = 0; j < numOutsideScvs; ++j)
758 const auto outsideScvIdx = neighborVolVarIndices_[scvIdx][i][j];
759 const auto& outsideScvfIndices = scvfIndicesOfScv_[outsideScvIdx];
760 for (
unsigned int k = 0; k < outsideScvfIndices.size(); ++k)
762 const auto outsideScvfIndex = outsideScvfIndices[k];
763 const auto outsideScvfVertexIndex = scvfVertexIndex[outsideScvfIndex];
764 const auto& outsideScvfNeighborIndices = neighborVolVarIndices_[outsideScvIdx][k];
765 if (outsideScvfVertexIndex == vIdxGlobal &&
766 MpfaHelper::vectorContainsValue(outsideScvfNeighborIndices, scvIdx))
768 flipScvfIndices_[scvfIdx][j] = outsideScvfIndex;
778 std::cout <<
"Initializing of the grid finite volume geometry took " << timer.elapsed() <<
" seconds." << std::endl;
782 ivIndexSets_.update(*
this, std::move(dualIdSet));
783 std::cout <<
"Initializing of the grid interaction volume index sets took " << timer.elapsed() <<
" seconds." << std::endl;
787 connectivityMap_.update(*
this);
788 std::cout <<
"Initializing of the connectivity map took " << timer.elapsed() <<
" seconds." << std::endl;
792 ConnectivityMap connectivityMap_;
795 std::vector<std::vector<GridIndexType>> scvfIndicesOfScv_;
796 std::vector<std::vector<ScvfOutsideGridIndexStorage>> neighborVolVarIndices_;
797 std::vector<bool> secondaryInteractionVolumeVertices_;
798 std::vector<bool> isGhostVertex_;
799 GridIndexType numScvs_;
800 GridIndexType numScvf_;
801 GridIndexType numBoundaryScvf_;
804 FlipScvfIndexSet flipScvfIndices_;
807 GridIVIndexSets ivIndexSets_;
810 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:452
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:473
typename Traits::SubControlVolumeFace SubControlVolumeFace
export the type of sub control volume
Definition: discretization/cellcentered/mpfa/fvgridgeometry.hh:480
typename Traits::template ConnectivityMap< ThisType > ConnectivityMap
export the connectivity map type
Definition: discretization/cellcentered/mpfa/fvgridgeometry.hh:484
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:560
const GridIndexType flipScvfIdx(GridIndexType scvfIdx, unsigned int outsideScvfIdx=0) const
Definition: discretization/cellcentered/mpfa/fvgridgeometry.hh:592
void update(GridView &&gridView)
update all fvElementGeometries (call this after grid adaption)
Definition: discretization/cellcentered/mpfa/fvgridgeometry.hh:572
const GridIVIndexSets & gridInteractionVolumeIndexSets() const
Returns the grid interaction volume seeds class.
Definition: discretization/cellcentered/mpfa/fvgridgeometry.hh:605
Extrusion_t< Traits > Extrusion
export the type of extrusion
Definition: discretization/cellcentered/mpfa/fvgridgeometry.hh:482
typename Traits::template GridIvIndexSets< ThisType > GridIVIndexSets
export the grid interaction volume index set type
Definition: discretization/cellcentered/mpfa/fvgridgeometry.hh:471
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:587
CCMpfaFVGridGeometry(const GridView &gridView, const SecondaryIvIndicatorType &indicator)
Constructor with user-defined indicator function for secondary interaction volumes.
Definition: discretization/cellcentered/mpfa/fvgridgeometry.hh:514
const FlipScvfIndexSet & flipScvfIndexSet() const
Returns the flip scvf index set.
Definition: discretization/cellcentered/mpfa/fvgridgeometry.hh:596
CCMpfaFVGridGeometry(const GridView &gridView)
Definition: discretization/cellcentered/mpfa/fvgridgeometry.hh:504
std::size_t numScv() const
Returns the total number of sub control volumes.
Definition: discretization/cellcentered/mpfa/fvgridgeometry.hh:528
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:583
std::vector< ScvfOutsideGridIndexStorage > FlipScvfIndexSet
export the flip scvf index set type
Definition: discretization/cellcentered/mpfa/fvgridgeometry.hh:469
typename Traits::SubControlVolume SubControlVolume
export the type of sub control volume
Definition: discretization/cellcentered/mpfa/fvgridgeometry.hh:478
std::size_t numBoundaryScvf() const
Returns the number of scvfs on the domain boundary.
Definition: discretization/cellcentered/mpfa/fvgridgeometry.hh:536
typename Traits::ElementMapper DofMapper
export dof mapper type
Definition: discretization/cellcentered/mpfa/fvgridgeometry.hh:486
MpfaHelper mpfaHelper() const
Returns instance of the mpfa helper type.
Definition: discretization/cellcentered/mpfa/fvgridgeometry.hh:579
const DofMapper & dofMapper() const
Definition: discretization/cellcentered/mpfa/fvgridgeometry.hh:524
const ConnectivityMap & connectivityMap() const
Definition: discretization/cellcentered/mpfa/fvgridgeometry.hh:601
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:556
typename Traits::template MpfaHelper< ThisType > MpfaHelper
export the mpfa helper type
Definition: discretization/cellcentered/mpfa/fvgridgeometry.hh:490
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:476
bool vertexUsesSecondaryInteractionVolume(GridIndexType vIdxGlobal) const
Definition: discretization/cellcentered/mpfa/fvgridgeometry.hh:546
constexpr bool vertexUsesSecondaryInteractionVolume(GridIndexType vIdxGlobal) const
Definition: discretization/cellcentered/mpfa/fvgridgeometry.hh:552
std::size_t numScvf() const
Returns the total number of sub control volume faces.
Definition: discretization/cellcentered/mpfa/fvgridgeometry.hh:532
void update(const GridView &gridView)
update all fvElementGeometries (call this after grid adaption)
Definition: discretization/cellcentered/mpfa/fvgridgeometry.hh:565
std::size_t numDofs() const
Returns the total number of degrees of freedom.
Definition: discretization/cellcentered/mpfa/fvgridgeometry.hh:540
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