26#ifndef DUMUX_DISCRETIZATION_CC_MPFA_FV_GRID_GEOMETRY_HH
27#define DUMUX_DISCRETIZATION_CC_MPFA_FV_GRID_GEOMETRY_HH
29#include <dune/geometry/referenceelements.hh>
50template<
class Gr
idView,
class Traits,
bool enableCache>
54template<
class Gr
idView>
59 DUNE_THROW(Dune::InvalidStateException,
"The ccmpfa discretization method needs at least an overlap of 1 for parallel computations. "
60 <<
" Set the parameter \"Grid.Overlap\" in the input file.");
69template<
class GV,
class Traits>
76 static constexpr int dim = GV::dimension;
77 static constexpr int dimWorld = GV::dimensionworld;
79 using Element =
typename GV::template Codim<0>::Entity;
80 using Vertex =
typename GV::template Codim<dim>::Entity;
81 using Intersection =
typename GV::Intersection;
83 using CoordScalar =
typename GV::ctype;
84 using ReferenceElements =
typename Dune::ReferenceElements<CoordScalar, dim>;
86 using ScvfOutsideGridIndexStorage =
typename Traits::SubControlVolumeFace::Traits::OutsideGridIndexStorage;
115 static constexpr int maxElementStencilSize = Traits::maxElementStencilSize;
118 static constexpr bool hasSingleInteractionVolumeType = !MpfaHelper::considerSecondaryIVs();
124 , secondaryIvIndicator_([] (const Element& e, const Intersection& is, bool isBranching)
125 {
return is.boundary() || isBranching; } )
133 , secondaryIvIndicator_(indicator)
141 {
return this->elementMapper(); }
145 {
return scvs_.size(); }
149 {
return scvfs_.size(); }
153 {
return numBoundaryScvf_; }
157 {
return this->gridView().size(0); }
161 template<
bool useSecondary = !hasSingleInteractionVolumeType, std::enable_if_t<useSecondary,
bool> = 0>
163 {
return secondaryInteractionVolumeVertices_[vIdxGlobal]; }
167 template<
bool useSecondary = !hasSingleInteractionVolumeType, std::enable_if_t<!useSecondary,
bool> = 0>
174 ParentType::update();
183 const auto numVert = this->gridView().size(dim);
184 const auto numScvs = numDofs();
185 std::size_t numScvf = MpfaHelper::getGlobalNumScvf(this->gridView());
188 scvs_.resize(numScvs);
189 scvfs_.reserve(numScvf);
190 scvfIndicesOfScv_.resize(numScvs);
191 hasBoundaryScvf_.resize(numScvs,
false);
195 secondaryInteractionVolumeVertices_.resize(numVert,
false);
198 const auto isGhostVertex = MpfaHelper::findGhostVertices(this->gridView(), this->vertexMapper());
201 typename GridIVIndexSets::DualGridIndexSet dualIdSet(this->gridView());
204 GridIndexType scvfIdx = 0;
205 numBoundaryScvf_ = 0;
206 for (
const auto& element : elements(this->gridView()))
208 const auto eIdx = this->elementMapper().index(element);
211 auto elementGeometry = element.geometry();
214 std::vector<GridIndexType> scvfIndexSet;
215 scvfIndexSet.reserve(MpfaHelper::getNumLocalScvfs(elementGeometry.type()));
219 std::vector<ScvfOutsideGridIndexStorage> outsideIndices;
222 outsideIndices.resize(element.subEntities(1));
223 for (
const auto& intersection : intersections(this->gridView(), element))
225 if (intersection.neighbor())
227 const auto nIdx = this->elementMapper().index( intersection.outside() );
228 outsideIndices[intersection.indexInInside()].push_back(nIdx);
234 for (
const auto& is : intersections(this->gridView(), element))
236 const auto indexInInside = is.indexInInside();
237 const bool boundary = is.boundary();
238 const bool neighbor = is.neighbor();
241 hasBoundaryScvf_[eIdx] =
true;
244 if (dim < dimWorld && neighbor && outsideIndices[indexInInside].empty())
248 const bool useNeighbor = neighbor && is.outside().level() > element.level();
249 const auto& e = useNeighbor ? is.outside() : element;
250 const auto indexInElement = useNeighbor ? is.indexInOutside() : indexInInside;
251 const auto eg = e.geometry();
252 const auto refElement = ReferenceElements::general(eg.type());
255 const auto numCorners = is.geometry().corners();
256 const auto isPositions = MpfaHelper::computeScvfCornersOnIntersection(eg,
262 const bool isBranchingPoint = dim < dimWorld ? outsideIndices[indexInInside].size() > 1 :
false;
263 const bool usesSecondaryIV = secondaryIvIndicator_(element, is, isBranchingPoint);
266 for (std::size_t c = 0; c < numCorners; ++c)
269 const auto vIdxLocal = refElement.subEntity(indexInElement, 1, c, dim);
270 const auto vIdxGlobal = this->vertexMapper().subIndex(e, vIdxLocal, dim);
273 if (isGhostVertex[vIdxGlobal])
278 secondaryInteractionVolumeVertices_[vIdxGlobal] =
true;
281 static const auto q = []{
283 bool hasOldParamName =
hasParam(
"Mpfa.Q");
284 if (hasOldParamName) {
285 std::cerr <<
"Deprecation warning: Parameter Mpfa.Q is deprecated, use MPFA.Q (uppercase MPFA)" << std::endl;
286 q = getParam<CoordScalar>(
"Mpfa.Q");
288 bool hasNewParamName =
hasParam(
"MPFA.Q");
289 if (hasNewParamName) {
290 q = getParam<CoordScalar>(
"MPFA.Q");
292 if (hasOldParamName | hasNewParamName)
295 return getParam<CoordScalar>(
"MPFA.Q");
299 const auto& outsideScvIndices = [&] ()
302 return dim == dimWorld ?
303 ScvfOutsideGridIndexStorage({this->elementMapper().index(is.outside())}) :
304 outsideIndices[indexInInside];
306 return ScvfOutsideGridIndexStorage({GridIndexType(numScvs) + numBoundaryScvf_++});
309 scvfIndexSet.push_back(scvfIdx);
311 MpfaHelper::getScvfCorners(isPositions, numCorners, c),
312 is.centerUnitOuterNormal(),
322 dualIdSet[vIdxGlobal].insert(scvfs_.back());
330 outsideIndices[indexInInside].clear();
337 scvfIndicesOfScv_[eIdx] = scvfIndexSet;
341 flipScvfIndices_.resize(scvfs_.size());
342 for (
const auto& scvf : scvfs_)
347 const auto numOutsideScvs = scvf.numOutsideScvs();
348 const auto vIdxGlobal = scvf.vertexIndex();
349 const auto insideScvIdx = scvf.insideScvIdx();
351 flipScvfIndices_[scvf.index()].resize(numOutsideScvs);
352 for (std::size_t i = 0; i < numOutsideScvs; ++i)
354 const auto outsideScvIdx = scvf.outsideScvIdx(i);
355 for (
auto outsideScvfIndex : scvfIndicesOfScv_[outsideScvIdx])
357 const auto& outsideScvf = this->scvf(outsideScvfIndex);
358 if (outsideScvf.vertexIndex() == vIdxGlobal &&
359 MpfaHelper::vectorContainsValue(outsideScvf.outsideScvIndices(), insideScvIdx))
361 flipScvfIndices_[scvf.index()][i] = outsideScvfIndex;
370 std::cout <<
"Initializing of the grid finite volume geometry took " << timer.elapsed() <<
" seconds." << std::endl;
374 ivIndexSets_.update(*
this, std::move(dualIdSet));
375 std::cout <<
"Initializing of the grid interaction volume index sets took " << timer.elapsed() <<
" seconds." << std::endl;
379 connectivityMap_.update(*
this);
380 std::cout <<
"Initializing of the connectivity map took " << timer.elapsed() <<
" seconds." << std::endl;
389 {
return scvs_[scvIdx]; }
393 {
return scvfs_[scvfIdx]; }
398 {
return connectivityMap_; }
402 {
return ivIndexSets_; }
406 {
return scvfIndicesOfScv_[scvIdx]; }
410 {
return flipScvfIndices_; }
415 {
return scvfs_[flipScvfIndices_[scvfIdx][outsideScvfIdx]]; }
419 {
return hasBoundaryScvf_[eIdx]; }
423 ConnectivityMap connectivityMap_;
426 std::vector<SubControlVolume> scvs_;
427 std::vector<SubControlVolumeFace> scvfs_;
430 std::vector<std::vector<GridIndexType>> scvfIndicesOfScv_;
431 std::vector<bool> secondaryInteractionVolumeVertices_;
432 GridIndexType numBoundaryScvf_;
433 std::vector<bool> hasBoundaryScvf_;
436 FlipScvfIndexSet flipScvfIndices_;
439 GridIVIndexSets ivIndexSets_;
442 SecondaryIvIndicatorType secondaryIvIndicator_;
452template<
class GV,
class Traits>
459 static constexpr int dim = GV::dimension;
460 static constexpr int dimWorld = GV::dimensionworld;
462 using Element =
typename GV::template Codim<0>::Entity;
463 using Vertex =
typename GV::template Codim<dim>::Entity;
464 using Intersection =
typename GV::Intersection;
466 using CoordScalar =
typename GV::ctype;
467 using ReferenceElements =
typename Dune::ReferenceElements<CoordScalar, dim>;
469 using ScvfOutsideGridIndexStorage =
typename Traits::SubControlVolumeFace::Traits::OutsideGridIndexStorage;
498 static constexpr int maxElementStencilSize = Traits::maxElementStencilSize;
501 static constexpr bool hasSingleInteractionVolumeType = !MpfaHelper::considerSecondaryIVs();
507 , secondaryIvIndicator_([] (const Element& e, const Intersection& is, bool isBranching)
508 {
return is.boundary() || isBranching; } )
516 , secondaryIvIndicator_(indicator)
524 {
return this->elementMapper(); }
536 {
return numBoundaryScvf_; }
540 {
return this->gridView().size(0); }
544 template<
bool useSecondary = !hasSingleInteractionVolumeType, std::enable_if_t<useSecondary,
bool> = 0>
546 {
return secondaryInteractionVolumeVertices_[vIdxGlobal]; }
550 template<
bool useSecondary = !hasSingleInteractionVolumeType, std::enable_if_t<!useSecondary,
bool> = 0>
556 {
return isGhostVertex_[this->vertexMapper().index(v)]; }
560 {
return isGhostVertex_[vIdxGlobal]; }
565 ParentType::update();
571 numScvs_ = numDofs();
572 scvfIndicesOfScv_.resize(numScvs_);
573 neighborVolVarIndices_.resize(numScvs_);
577 const auto numVert = this->gridView().size(dim);
578 secondaryInteractionVolumeVertices_.resize(numVert,
false);
581 isGhostVertex_ = MpfaHelper::findGhostVertices(this->gridView(), this->vertexMapper());
584 typename GridIVIndexSets::DualGridIndexSet dualIdSet(this->gridView());
587 const auto maxNumScvfs = numScvs_*LocalView::maxNumElementScvfs;
588 std::vector<bool> scvfIsOnBoundary;
589 std::vector<GridIndexType> scvfVertexIndex;
590 scvfIsOnBoundary.reserve(maxNumScvfs);
591 scvfVertexIndex.reserve(maxNumScvfs);
595 numBoundaryScvf_ = 0;
596 for (
const auto& element : elements(this->gridView()))
598 const auto eIdx = this->elementMapper().index(element);
601 auto elementGeometry = element.geometry();
604 const auto numLocalFaces = MpfaHelper::getNumLocalScvfs(elementGeometry.type());
605 std::vector<GridIndexType> scvfsIndexSet;
606 std::vector<ScvfOutsideGridIndexStorage> neighborVolVarIndexSet;
607 scvfsIndexSet.reserve(numLocalFaces);
608 neighborVolVarIndexSet.reserve(numLocalFaces);
612 std::vector<ScvfOutsideGridIndexStorage> outsideIndices;
615 outsideIndices.resize(element.subEntities(1));
616 for (
const auto& intersection : intersections(this->gridView(), element))
618 if (intersection.neighbor())
620 auto nIdx = this->elementMapper().index( intersection.outside() );
621 outsideIndices[intersection.indexInInside()].push_back(nIdx);
627 for (
const auto& is : intersections(this->gridView(), element))
629 const auto indexInInside = is.indexInInside();
630 const bool boundary = is.boundary();
631 const bool neighbor = is.neighbor();
634 if (dim < dimWorld && neighbor && outsideIndices[indexInInside].empty())
638 const bool useNeighbor = neighbor && is.outside().level() > element.level();
639 const auto& e = useNeighbor ? is.outside() : element;
640 const auto indexInElement = useNeighbor ? is.indexInOutside() : indexInInside;
641 const auto eg = e.geometry();
642 const auto refElement = ReferenceElements::general(eg.type());
645 const bool isBranchingPoint = dim < dimWorld ? outsideIndices[indexInInside].size() > 1 :
false;
646 const bool usesSecondaryIV = secondaryIvIndicator_(element, is, isBranchingPoint);
649 for (std::size_t c = 0; c < is.geometry().corners(); ++c)
652 const auto vIdxLocal = refElement.subEntity(indexInElement, 1, c, dim);
653 const auto vIdxGlobal = this->vertexMapper().subIndex(e, vIdxLocal, dim);
656 if (isGhostVertex_[vIdxGlobal])
661 secondaryInteractionVolumeVertices_[vIdxGlobal] =
true;
664 const auto& outsideScvIndices = [&] ()
667 return dim == dimWorld ?
668 ScvfOutsideGridIndexStorage({this->elementMapper().index(is.outside())}) :
669 outsideIndices[indexInInside];
671 return ScvfOutsideGridIndexStorage({GridIndexType(numScvs_) + numBoundaryScvf_++});
675 dualIdSet[vIdxGlobal].insert(numScvf_, eIdx, boundary);
678 scvfsIndexSet.push_back(numScvf_++);
679 scvfIsOnBoundary.push_back(boundary);
680 scvfVertexIndex.push_back(vIdxGlobal);
681 neighborVolVarIndexSet.emplace_back(std::move(outsideScvIndices));
686 outsideIndices[indexInInside].clear();
690 scvfIndicesOfScv_[eIdx] = scvfsIndexSet;
691 neighborVolVarIndices_[eIdx] = neighborVolVarIndexSet;
695 flipScvfIndices_.resize(numScvf_);
696 for (std::size_t scvIdx = 0; scvIdx < numScvs_; ++scvIdx)
698 const auto& scvfIndices = scvfIndicesOfScv_[scvIdx];
699 for (
unsigned int i = 0; i < scvfIndices.size(); ++i)
702 if (scvfIsOnBoundary[ scvfIndices[i] ])
705 const auto scvfIdx = scvfIndices[i];
706 const auto vIdxGlobal = scvfVertexIndex[scvfIdx];
707 const auto numOutsideScvs = neighborVolVarIndices_[scvIdx][i].size();
709 flipScvfIndices_[scvfIdx].resize(numOutsideScvs);
710 for (
unsigned int j = 0; j < numOutsideScvs; ++j)
712 const auto outsideScvIdx = neighborVolVarIndices_[scvIdx][i][j];
713 const auto& outsideScvfIndices = scvfIndicesOfScv_[outsideScvIdx];
714 for (
unsigned int k = 0; k < outsideScvfIndices.size(); ++k)
716 const auto outsideScvfIndex = outsideScvfIndices[k];
717 const auto outsideScvfVertexIndex = scvfVertexIndex[outsideScvfIndex];
718 const auto& outsideScvfNeighborIndices = neighborVolVarIndices_[outsideScvIdx][k];
719 if (outsideScvfVertexIndex == vIdxGlobal &&
720 MpfaHelper::vectorContainsValue(outsideScvfNeighborIndices, scvIdx))
722 flipScvfIndices_[scvfIdx][j] = outsideScvfIndex;
732 std::cout <<
"Initializing of the grid finite volume geometry took " << timer.elapsed() <<
" seconds." << std::endl;
736 ivIndexSets_.update(*
this, std::move(dualIdSet));
737 std::cout <<
"Initializing of the grid interaction volume index sets took " << timer.elapsed() <<
" seconds." << std::endl;
741 connectivityMap_.update(*
this);
742 std::cout <<
"Initializing of the connectivity map took " << timer.elapsed() <<
" seconds." << std::endl;
751 {
return scvfIndicesOfScv_[scvIdx]; }
755 {
return neighborVolVarIndices_[scvIdx]; }
759 const GridIndexType
flipScvfIdx(GridIndexType scvfIdx,
unsigned int outsideScvfIdx = 0)
const
760 {
return flipScvfIndices_[scvfIdx][outsideScvfIdx]; }
764 {
return flipScvfIndices_; }
769 {
return connectivityMap_; }
773 {
return ivIndexSets_; }
777 ConnectivityMap connectivityMap_;
780 std::vector<std::vector<GridIndexType>> scvfIndicesOfScv_;
781 std::vector<std::vector<ScvfOutsideGridIndexStorage>> neighborVolVarIndices_;
782 std::vector<bool> secondaryInteractionVolumeVertices_;
783 std::vector<bool> isGhostVertex_;
784 GridIndexType numScvs_;
785 GridIndexType numScvf_;
786 GridIndexType numBoundaryScvf_;
789 FlipScvfIndexSet flipScvfIndices_;
792 GridIVIndexSets ivIndexSets_;
795 SecondaryIvIndicatorType secondaryIvIndicator_;
Defines the index types used for grid and local indices.
The infrastructure to retrieve run-time parameters from Dune::ParameterTrees.
Check the overlap size for different discretization methods.
The available discretization methods in Dumux.
Base class for grid geometries.
DiscretizationMethod
The available discretization methods in Dumux.
Definition: method.hh:37
bool hasParam(const std::string ¶m)
Check whether a key exists in the parameter tree.
Definition: parameters.hh:383
void checkOverlapSizeCCMpfa(const GridView &gridView)
check the overlap size for parallel computations
Definition: discretization/cellcentered/mpfa/fvgridgeometry.hh:55
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:49
GV GridView
export the grid view type
Definition: basegridgeometry.hh:64
The finite volume geometry (scvs and scvfs) for cell-centered mpfa models on a grid view This builds ...
Definition: discretization/cellcentered/mpfa/fvgridgeometry.hh:51
The finite volume geometry (scvs and scvfs) for cell-centered mpfa models on a grid view This builds ...
Definition: discretization/cellcentered/mpfa/fvgridgeometry.hh:72
typename Traits::ElementMapper DofMapper
export dof mapper type
Definition: discretization/cellcentered/mpfa/fvgridgeometry.hh:105
void update()
update all fvElementGeometries (do this again after grid adaption)
Definition: discretization/cellcentered/mpfa/fvgridgeometry.hh:172
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:148
typename Traits::template MpfaHelper< ThisType > MpfaHelper
export the mpfa helper type
Definition: discretization/cellcentered/mpfa/fvgridgeometry.hh:109
const SubControlVolumeFace & flipScvf(GridIndexType scvfIdx, unsigned int outsideScvfIdx=0) const
Definition: discretization/cellcentered/mpfa/fvgridgeometry.hh:414
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:405
bool vertexUsesSecondaryInteractionVolume(GridIndexType vIdxGlobal) const
Definition: discretization/cellcentered/mpfa/fvgridgeometry.hh:162
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:397
std::size_t numBoundaryScvf() const
The total number of boundary sub control volume faces.
Definition: discretization/cellcentered/mpfa/fvgridgeometry.hh:152
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:156
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
const SubControlVolumeFace & scvf(GridIndexType scvfIdx) const
Get a sub control volume face with a global scvf index.
Definition: discretization/cellcentered/mpfa/fvgridgeometry.hh:392
std::size_t numScv() const
The total number of sub control volumes.
Definition: discretization/cellcentered/mpfa/fvgridgeometry.hh:144
const GridIVIndexSets & gridInteractionVolumeIndexSets() const
Returns the grid interaction volume index set class.
Definition: discretization/cellcentered/mpfa/fvgridgeometry.hh:401
const FlipScvfIndexSet & flipScvfIndexSet() const
Returns the flip scvf index set.
Definition: discretization/cellcentered/mpfa/fvgridgeometry.hh:409
CCMpfaFVGridGeometry(const GridView &gridView, const SecondaryIvIndicatorType &indicator)
Constructor with user-defined indicator function for secondary interaction volumes.
Definition: discretization/cellcentered/mpfa/fvgridgeometry.hh:131
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:103
const DofMapper & dofMapper() const
Definition: discretization/cellcentered/mpfa/fvgridgeometry.hh:140
bool hasBoundaryScvf(GridIndexType eIdx) const
Returns whether one of the geometry's scvfs lies on a boundary.
Definition: discretization/cellcentered/mpfa/fvgridgeometry.hh:418
CCMpfaFVGridGeometry(const GridView &gridView)
Definition: discretization/cellcentered/mpfa/fvgridgeometry.hh:122
MpfaHelper mpfaHelper() const
Returns instance of the mpfa helper type.
Definition: discretization/cellcentered/mpfa/fvgridgeometry.hh:384
const SubControlVolume & scv(GridIndexType scvIdx) const
Get a sub control volume with a global scv index.
Definition: discretization/cellcentered/mpfa/fvgridgeometry.hh:388
constexpr bool vertexUsesSecondaryInteractionVolume(GridIndexType vIdxGlobal) const
Definition: discretization/cellcentered/mpfa/fvgridgeometry.hh:168
The finite volume geometry (scvs and scvfs) for cell-centered mpfa models on a grid view This builds ...
Definition: discretization/cellcentered/mpfa/fvgridgeometry.hh:455
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:477
typename Traits::SubControlVolumeFace SubControlVolumeFace
export the type of sub control volume
Definition: discretization/cellcentered/mpfa/fvgridgeometry.hh:484
typename Traits::template ConnectivityMap< ThisType > ConnectivityMap
export the connectivity map type
Definition: discretization/cellcentered/mpfa/fvgridgeometry.hh:486
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:559
const GridIndexType flipScvfIdx(GridIndexType scvfIdx, unsigned int outsideScvfIdx=0) const
Definition: discretization/cellcentered/mpfa/fvgridgeometry.hh:759
const GridIVIndexSets & gridInteractionVolumeIndexSets() const
Returns the grid interaction volume seeds class.
Definition: discretization/cellcentered/mpfa/fvgridgeometry.hh:772
typename Traits::template GridIvIndexSets< ThisType > GridIVIndexSets
export the grid interaction volume index set type
Definition: discretization/cellcentered/mpfa/fvgridgeometry.hh:475
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:754
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:763
CCMpfaFVGridGeometry(const GridView &gridView)
Definition: discretization/cellcentered/mpfa/fvgridgeometry.hh:505
std::size_t numScv() const
Returns the total number of sub control volumes.
Definition: discretization/cellcentered/mpfa/fvgridgeometry.hh:527
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:750
std::vector< ScvfOutsideGridIndexStorage > FlipScvfIndexSet
export the flip scvf index set type
Definition: discretization/cellcentered/mpfa/fvgridgeometry.hh:473
typename Traits::SubControlVolume SubControlVolume
export the type of sub control volume
Definition: discretization/cellcentered/mpfa/fvgridgeometry.hh:482
std::size_t numBoundaryScvf() const
Returns the number of scvfs on the domain boundary.
Definition: discretization/cellcentered/mpfa/fvgridgeometry.hh:535
typename Traits::ElementMapper DofMapper
export dof mapper type
Definition: discretization/cellcentered/mpfa/fvgridgeometry.hh:488
MpfaHelper mpfaHelper() const
Returns instance of the mpfa helper type.
Definition: discretization/cellcentered/mpfa/fvgridgeometry.hh:746
void update()
Updates all finite volume geometries of the grid. Has to be called again after grid adaption.
Definition: discretization/cellcentered/mpfa/fvgridgeometry.hh:563
const DofMapper & dofMapper() const
Definition: discretization/cellcentered/mpfa/fvgridgeometry.hh:523
const ConnectivityMap & connectivityMap() const
Definition: discretization/cellcentered/mpfa/fvgridgeometry.hh:768
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:555
typename Traits::template MpfaHelper< ThisType > MpfaHelper
export the mpfa helper type
Definition: discretization/cellcentered/mpfa/fvgridgeometry.hh:492
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:480
bool vertexUsesSecondaryInteractionVolume(GridIndexType vIdxGlobal) const
Definition: discretization/cellcentered/mpfa/fvgridgeometry.hh:545
constexpr bool vertexUsesSecondaryInteractionVolume(GridIndexType vIdxGlobal) const
Definition: discretization/cellcentered/mpfa/fvgridgeometry.hh:551
std::size_t numScvf() const
Returns the total number of sub control volume faces.
Definition: discretization/cellcentered/mpfa/fvgridgeometry.hh:531
std::size_t numDofs() const
Returns the total number of degrees of freedom.
Definition: discretization/cellcentered/mpfa/fvgridgeometry.hh:539
Check if the overlap size is valid for a given discretization method.
Definition: checkoverlapsize.hh:40