version 3.9-dev
Dumux::CCMpfaFVGridGeometry< GV, Traits, true > Class Template Reference

The finite volume geometry (scvs and scvfs) for cell-centered mpfa models on a grid view This builds up the sub control volumes and sub control volume faces. More...

#include <dumux/discretization/cellcentered/mpfa/fvgridgeometry.hh>

Inheritance diagram for Dumux::CCMpfaFVGridGeometry< GV, Traits, true >:

Description

template<class GV, class Traits>
class Dumux::CCMpfaFVGridGeometry< GV, Traits, true >
Note
For caching enabled we store the fv geometries for the whole grid view which is memory intensive but faster

Public Types

using FlipScvfIndexSet = std::vector< ScvfOutsideGridIndexStorage >
 export the flip scvf index set type More...
 
using GridIVIndexSets = typename Traits::template GridIvIndexSets< ThisType >
 export the grid interaction volume index set type More...
 
using SecondaryIvIndicatorType = std::function< bool(const Element &, const Intersection &, bool)>
 export the type to be used for indicators where to use the secondary ivs More...
 
using LocalView = typename Traits::template LocalView< ThisType, true >
 export the type of the fv element geometry (the local view type) More...
 
using SubControlVolume = typename Traits::SubControlVolume
 export the type of sub control volume More...
 
using SubControlVolumeFace = typename Traits::SubControlVolumeFace
 export the type of sub control volume More...
 
using Extrusion = Extrusion_t< Traits >
 export the type of extrusion More...
 
using ConnectivityMap = typename Traits::template ConnectivityMap< ThisType >
 export the connectivity map type More...
 
using DofMapper = typename Traits::ElementMapper
 export dof mapper type More...
 
using GridView = GV
 export the grid view type More...
 
using MpfaHelper = typename Traits::template MpfaHelper< ThisType >
 export the mpfa helper type More...
 
using DiscretizationMethod = DiscretizationMethods::CCMpfa
 export the discretization method this geometry belongs to More...
 
using Grid = typename BaseImplementation::Grid
 export the grid type More...
 
using GlobalCoordinate = typename BaseImplementation::GlobalCoordinate
 export the global coordinate type More...
 
using ElementMapper = typename BaseImplementation::ElementMapper
 export the element mapper type More...
 
using VertexMapper = typename BaseImplementation::VertexMapper
 export the vertex mapper type More...
 

Public Member Functions

 CCMpfaFVGridGeometry (const GridView &gridView)
 
 CCMpfaFVGridGeometry (const GridView &gridView, const SecondaryIvIndicatorType &indicator)
 Constructor with user-defined indicator function for secondary interaction volumes. More...
 
const DofMapperdofMapper () const
 
std::size_t numScv () const
 The total number of sub control volumes. More...
 
std::size_t numScvf () const
 The total number of sub control volume faces. More...
 
std::size_t numBoundaryScvf () const
 The total number of boundary sub control volume faces. More...
 
std::size_t numDofs () const
 The total number of degrees of freedom. More...
 
template<bool useSecondary = !hasSingleInteractionVolumeType, std::enable_if_t< useSecondary, bool > = 0>
bool vertexUsesSecondaryInteractionVolume (GridIndexType vIdxGlobal) const
 
template<bool useSecondary = !hasSingleInteractionVolumeType, std::enable_if_t<!useSecondary, bool > = 0>
constexpr bool vertexUsesSecondaryInteractionVolume (GridIndexType vIdxGlobal) const
 
void update (const GridView &gridView)
 update all fvElementGeometries (call this after grid adaption) More...
 
void update (GridView &&gridView)
 update all fvElementGeometries (call this after grid adaption) More...
 
MpfaHelper mpfaHelper () const
 Returns instance of the mpfa helper type. More...
 
const SubControlVolumescv (GridIndexType scvIdx) const
 Get a sub control volume with a global scv index. More...
 
const SubControlVolumeFacescvf (GridIndexType scvfIdx) const
 Get a sub control volume face with a global scvf index. More...
 
const ConnectivityMapconnectivityMap () const
 
const GridIVIndexSetsgridInteractionVolumeIndexSets () const
 Returns the grid interaction volume index set class. More...
 
const std::vector< GridIndexType > & scvfIndicesOfScv (GridIndexType scvIdx) const
 Get the sub control volume face indices of an scv by global index. More...
 
const FlipScvfIndexSetflipScvfIndexSet () const
 Returns the flip scvf index set. More...
 
const SubControlVolumeFaceflipScvf (GridIndexType scvfIdx, unsigned int outsideScvfIdx=0) const
 
bool hasBoundaryScvf (GridIndexType eIdx) const
 Returns whether one of the geometry's scvfs lies on a boundary. More...
 
const GridViewgridView () const
 Return the gridView this grid geometry object lives on. More...
 
const VertexMappervertexMapper () const
 Returns the mapper for vertices to indices for constant grids. More...
 
VertexMappervertexMapper ()
 Returns the mapper for vertices to indices for possibly adaptive grids. More...
 
const ElementMapperelementMapper () const
 Returns the mapper for elements to indices for constant grids. More...
 
ElementMapperelementMapper ()
 Returns the mapper for elements to indices for possibly adaptive grids. More...
 
decltype(auto) boundingBoxTree () const
 Returns the bounding box tree of the grid. More...
 
decltype(auto) elementMap () const
 Returns the element index to element map. More...
 
Element element (GridIndexType eIdx) const
 Get an element from a global element index. More...
 
const GlobalCoordinatebBoxMin () const
 The coordinate of the corner of the GridView's bounding box with the smallest values. More...
 
const GlobalCoordinatebBoxMax () const
 The coordinate of the corner of the GridView's bounding box with the largest values. More...
 
bool isPeriodic () const
 Returns if the grid geometry is periodic (at all) More...
 

Static Public Attributes

static constexpr DiscretizationMethod discMethod {}
 
static constexpr int maxElementStencilSize = Traits::maxElementStencilSize
 The maximum admissible stencil size (used for static memory allocation during assembly) More...
 
static constexpr bool hasSingleInteractionVolumeType = !MpfaHelper::considerSecondaryIVs()
 State if only a single type is used for interaction volumes. More...
 

Protected Member Functions

void setPeriodic (bool value=true)
 Set the periodicity of the grid geometry. More...
 

Member Typedef Documentation

◆ ConnectivityMap

template<class GV , class Traits >
using Dumux::CCMpfaFVGridGeometry< GV, Traits, true >::ConnectivityMap = typename Traits::template ConnectivityMap<ThisType>

◆ DiscretizationMethod

template<class GV , class Traits >
using Dumux::CCMpfaFVGridGeometry< GV, Traits, true >::DiscretizationMethod = DiscretizationMethods::CCMpfa

◆ DofMapper

template<class GV , class Traits >
using Dumux::CCMpfaFVGridGeometry< GV, Traits, true >::DofMapper = typename Traits::ElementMapper

◆ ElementMapper

template<class GV , class Traits >
using Dumux::BaseGridGeometry< GV, Traits >::ElementMapper = typename BaseImplementation::ElementMapper
inherited

◆ Extrusion

template<class GV , class Traits >
using Dumux::CCMpfaFVGridGeometry< GV, Traits, true >::Extrusion = Extrusion_t<Traits>

◆ FlipScvfIndexSet

template<class GV , class Traits >
using Dumux::CCMpfaFVGridGeometry< GV, Traits, true >::FlipScvfIndexSet = std::vector<ScvfOutsideGridIndexStorage>

◆ GlobalCoordinate

template<class GV , class Traits >
using Dumux::BaseGridGeometry< GV, Traits >::GlobalCoordinate = typename BaseImplementation::GlobalCoordinate
inherited

◆ Grid

template<class GV , class Traits >
using Dumux::BaseGridGeometry< GV, Traits >::Grid = typename BaseImplementation::Grid
inherited

◆ GridIVIndexSets

template<class GV , class Traits >
using Dumux::CCMpfaFVGridGeometry< GV, Traits, true >::GridIVIndexSets = typename Traits::template GridIvIndexSets<ThisType>

◆ GridView

template<class GV , class Traits >
using Dumux::CCMpfaFVGridGeometry< GV, Traits, true >::GridView = GV

◆ LocalView

template<class GV , class Traits >
using Dumux::CCMpfaFVGridGeometry< GV, Traits, true >::LocalView = typename Traits::template LocalView<ThisType, true>

◆ MpfaHelper

template<class GV , class Traits >
using Dumux::CCMpfaFVGridGeometry< GV, Traits, true >::MpfaHelper = typename Traits::template MpfaHelper<ThisType>

◆ SecondaryIvIndicatorType

template<class GV , class Traits >
using Dumux::CCMpfaFVGridGeometry< GV, Traits, true >::SecondaryIvIndicatorType = std::function<bool(const Element&, const Intersection&, bool)>

◆ SubControlVolume

template<class GV , class Traits >
using Dumux::CCMpfaFVGridGeometry< GV, Traits, true >::SubControlVolume = typename Traits::SubControlVolume

◆ SubControlVolumeFace

template<class GV , class Traits >
using Dumux::CCMpfaFVGridGeometry< GV, Traits, true >::SubControlVolumeFace = typename Traits::SubControlVolumeFace

◆ VertexMapper

template<class GV , class Traits >
using Dumux::BaseGridGeometry< GV, Traits >::VertexMapper = typename BaseImplementation::VertexMapper
inherited

Constructor & Destructor Documentation

◆ CCMpfaFVGridGeometry() [1/2]

template<class GV , class Traits >
Dumux::CCMpfaFVGridGeometry< GV, Traits, true >::CCMpfaFVGridGeometry ( const GridView gridView)
inline

Constructor without indicator function for secondary interaction volumes Per default, we use the secondary IVs at branching points & boundaries

◆ CCMpfaFVGridGeometry() [2/2]

template<class GV , class Traits >
Dumux::CCMpfaFVGridGeometry< GV, Traits, true >::CCMpfaFVGridGeometry ( const GridView gridView,
const SecondaryIvIndicatorType indicator 
)
inline

Member Function Documentation

◆ bBoxMax()

template<class GV , class Traits >
const GlobalCoordinate & Dumux::BaseGridGeometry< GV, Traits >::bBoxMax ( ) const
inlineinherited

◆ bBoxMin()

template<class GV , class Traits >
const GlobalCoordinate & Dumux::BaseGridGeometry< GV, Traits >::bBoxMin ( ) const
inlineinherited

◆ boundingBoxTree()

template<class GV , class Traits >
decltype(auto) Dumux::BaseGridGeometry< GV, Traits >::boundingBoxTree ( ) const
inlineinherited

◆ connectivityMap()

template<class GV , class Traits >
const ConnectivityMap & Dumux::CCMpfaFVGridGeometry< GV, Traits, true >::connectivityMap ( ) const
inline

Returns the connectivity map of which dofs have derivatives with respect to a given dof.

◆ dofMapper()

template<class GV , class Traits >
const DofMapper & Dumux::CCMpfaFVGridGeometry< GV, Traits, true >::dofMapper ( ) const
inline

the element mapper is the dofMapper this is convenience to have better chance to have the same main files for box/tpfa/mpfa...

◆ element()

template<class GV , class Traits >
Element Dumux::BaseGridGeometry< GV, Traits >::element ( GridIndexType  eIdx) const
inlineinherited

◆ elementMap()

template<class GV , class Traits >
decltype(auto) Dumux::BaseGridGeometry< GV, Traits >::elementMap ( ) const
inlineinherited

◆ elementMapper() [1/2]

template<class GV , class Traits >
ElementMapper & Dumux::BaseGridGeometry< GV, Traits >::elementMapper ( )
inlineinherited

◆ elementMapper() [2/2]

template<class GV , class Traits >
const ElementMapper & Dumux::BaseGridGeometry< GV, Traits >::elementMapper ( ) const
inlineinherited

◆ flipScvf()

template<class GV , class Traits >
const SubControlVolumeFace & Dumux::CCMpfaFVGridGeometry< GV, Traits, true >::flipScvf ( GridIndexType  scvfIdx,
unsigned int  outsideScvfIdx = 0 
) const
inline

Get the scvf on the same face but from the other side Note that e.g. the normals might be different in the case of surface grids

◆ flipScvfIndexSet()

template<class GV , class Traits >
const FlipScvfIndexSet & Dumux::CCMpfaFVGridGeometry< GV, Traits, true >::flipScvfIndexSet ( ) const
inline

◆ gridInteractionVolumeIndexSets()

template<class GV , class Traits >
const GridIVIndexSets & Dumux::CCMpfaFVGridGeometry< GV, Traits, true >::gridInteractionVolumeIndexSets ( ) const
inline

◆ gridView()

template<class GV , class Traits >
const GridView & Dumux::BaseGridGeometry< GV, Traits >::gridView ( ) const
inlineinherited

◆ hasBoundaryScvf()

template<class GV , class Traits >
bool Dumux::CCMpfaFVGridGeometry< GV, Traits, true >::hasBoundaryScvf ( GridIndexType  eIdx) const
inline

◆ isPeriodic()

template<class GV , class Traits >
bool Dumux::BaseGridGeometry< GV, Traits >::isPeriodic ( ) const
inlineinherited

◆ mpfaHelper()

template<class GV , class Traits >
MpfaHelper Dumux::CCMpfaFVGridGeometry< GV, Traits, true >::mpfaHelper ( ) const
inline

◆ numBoundaryScvf()

template<class GV , class Traits >
std::size_t Dumux::CCMpfaFVGridGeometry< GV, Traits, true >::numBoundaryScvf ( ) const
inline

◆ numDofs()

template<class GV , class Traits >
std::size_t Dumux::CCMpfaFVGridGeometry< GV, Traits, true >::numDofs ( ) const
inline

◆ numScv()

template<class GV , class Traits >
std::size_t Dumux::CCMpfaFVGridGeometry< GV, Traits, true >::numScv ( ) const
inline

◆ numScvf()

template<class GV , class Traits >
std::size_t Dumux::CCMpfaFVGridGeometry< GV, Traits, true >::numScvf ( ) const
inline

◆ scv()

template<class GV , class Traits >
const SubControlVolume & Dumux::CCMpfaFVGridGeometry< GV, Traits, true >::scv ( GridIndexType  scvIdx) const
inline

◆ scvf()

template<class GV , class Traits >
const SubControlVolumeFace & Dumux::CCMpfaFVGridGeometry< GV, Traits, true >::scvf ( GridIndexType  scvfIdx) const
inline

◆ scvfIndicesOfScv()

template<class GV , class Traits >
const std::vector< GridIndexType > & Dumux::CCMpfaFVGridGeometry< GV, Traits, true >::scvfIndicesOfScv ( GridIndexType  scvIdx) const
inline

◆ setPeriodic()

template<class GV , class Traits >
void Dumux::BaseGridGeometry< GV, Traits >::setPeriodic ( bool  value = true)
inlineprotectedinherited

◆ update() [1/2]

template<class GV , class Traits >
void Dumux::CCMpfaFVGridGeometry< GV, Traits, true >::update ( const GridView gridView)
inline

◆ update() [2/2]

template<class GV , class Traits >
void Dumux::CCMpfaFVGridGeometry< GV, Traits, true >::update ( GridView &&  gridView)
inline

◆ vertexMapper() [1/2]

template<class GV , class Traits >
VertexMapper & Dumux::BaseGridGeometry< GV, Traits >::vertexMapper ( )
inlineinherited

◆ vertexMapper() [2/2]

template<class GV , class Traits >
const VertexMapper & Dumux::BaseGridGeometry< GV, Traits >::vertexMapper ( ) const
inlineinherited

◆ vertexUsesSecondaryInteractionVolume() [1/2]

template<class GV , class Traits >
template<bool useSecondary = !hasSingleInteractionVolumeType, std::enable_if_t< useSecondary, bool > = 0>
bool Dumux::CCMpfaFVGridGeometry< GV, Traits, true >::vertexUsesSecondaryInteractionVolume ( GridIndexType  vIdxGlobal) const
inline

Returns true if secondary interaction volumes are used around a given vertex (index). This specialization is enabled if the use of secondary interaction volumes is active.

◆ vertexUsesSecondaryInteractionVolume() [2/2]

template<class GV , class Traits >
template<bool useSecondary = !hasSingleInteractionVolumeType, std::enable_if_t<!useSecondary, bool > = 0>
constexpr bool Dumux::CCMpfaFVGridGeometry< GV, Traits, true >::vertexUsesSecondaryInteractionVolume ( GridIndexType  vIdxGlobal) const
inlineconstexpr

Returns true if secondary interaction volumes are used around a given vertex (index). If the use of secondary interaction volumes is disabled, this can be evaluated at compile time.

Member Data Documentation

◆ discMethod

template<class GV , class Traits >
constexpr DiscretizationMethod Dumux::CCMpfaFVGridGeometry< GV, Traits, true >::discMethod {}
staticconstexpr

◆ hasSingleInteractionVolumeType

template<class GV , class Traits >
constexpr bool Dumux::CCMpfaFVGridGeometry< GV, Traits, true >::hasSingleInteractionVolumeType = !MpfaHelper::considerSecondaryIVs()
staticconstexpr

◆ maxElementStencilSize

template<class GV , class Traits >
constexpr int Dumux::CCMpfaFVGridGeometry< GV, Traits, true >::maxElementStencilSize = Traits::maxElementStencilSize
staticconstexpr

The documentation for this class was generated from the following file: