3.1-git
DUNE for Multi-{Phase, Component, Scale, Physics, ...} flow and transport in porous media
Public Types | Public Member Functions | Static Public Attributes | List of all members
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 >:
Inheritance graph

Description

template<class GV, class Traits>
class Dumux::CCMpfaFVGridGeometry< GV, Traits, true >

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.

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 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 Grid = typename GV::Grid
 export the grid type More...
 
using GlobalCoordinate = typename Element::Geometry::GlobalCoordinate
 export the global coordinate type More...
 
using ElementMapper = typename Traits::ElementMapper
 export the element mapper type More...
 
using VertexMapper = typename Traits::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 ()
 update all fvElementGeometries (do this again 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...
 
const BoundingBoxTreeboundingBoxTree () const
 Returns the bounding box tree of the grid. More...
 
const ElementMapelementMap () const
 Returns the element index to element map. More...
 
template<class Scv , std::enable_if_t<!std::is_arithmetic< Scv >::value, int > = 0>
Element element (const Scv &scv) const
 Get an element from a sub-control volume. 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...
 
void setPeriodic (bool value=true)
 Set the periodicity of the grid geometry. More...
 

Static Public Attributes

static constexpr DiscretizationMethod discMethod = DiscretizationMethod::ccmpfa
 export the discretization method this geometry belongs to More...
 
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...
 

Member Typedef Documentation

◆ ConnectivityMap

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

export the connectivity map type

◆ DofMapper

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

export dof mapper type

◆ ElementMapper

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

export the element mapper type

◆ FlipScvfIndexSet

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

export the flip scvf index set type

◆ GlobalCoordinate

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

export the global coordinate type

◆ Grid

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

export the grid type

◆ GridIVIndexSets

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

export the grid interaction volume index set type

◆ GridView

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

export the grid view type

◆ LocalView

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

export the type of the fv element geometry (the local view type)

◆ MpfaHelper

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

export the mpfa helper type

◆ SecondaryIvIndicatorType

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

export the type to be used for indicators where to use the secondary ivs

◆ SubControlVolume

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

export the type of sub control volume

◆ SubControlVolumeFace

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

export the type of sub control volume

◆ VertexMapper

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

export the vertex mapper type

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

Constructor with user-defined indicator function for secondary interaction volumes.

Member Function Documentation

◆ bBoxMax()

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

The coordinate of the corner of the GridView's bounding box with the largest values.

◆ bBoxMin()

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

The coordinate of the corner of the GridView's bounding box with the smallest values.

◆ boundingBoxTree()

template<class GV , class Traits >
const BoundingBoxTree & Dumux::BaseGridGeometry< GV, Traits >::boundingBoxTree ( ) const
inlineinherited

Returns the bounding box tree of the grid.

◆ 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() [1/2]

template<class GV , class Traits >
template<class Scv , std::enable_if_t<!std::is_arithmetic< Scv >::value, int > = 0>
Element Dumux::BaseGridGeometry< GV, Traits >::element ( const Scv &  scv) const
inlineinherited

Get an element from a sub-control volume.

Note
This interface is deprecated

◆ element() [2/2]

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

Get an element from a global element index.

◆ elementMap()

template<class GV , class Traits >
const ElementMap & Dumux::BaseGridGeometry< GV, Traits >::elementMap ( ) const
inlineinherited

Returns the element index to element map.

◆ elementMapper() [1/2]

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

Returns the mapper for elements to indices for possibly adaptive grids.

◆ elementMapper() [2/2]

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

Returns the mapper for elements to indices for constant grids.

◆ 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

Returns the flip scvf index set.

◆ gridInteractionVolumeIndexSets()

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

Returns the grid interaction volume index set class.

◆ gridView()

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

Return the gridView this grid geometry object lives on.

◆ hasBoundaryScvf()

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

Returns whether one of the geometry's scvfs lies on a boundary.

◆ isPeriodic()

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

Returns if the grid geometry is periodic (at all)

◆ mpfaHelper()

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

Returns instance of the mpfa helper type.

◆ numBoundaryScvf()

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

The total number of boundary sub control volume faces.

◆ numDofs()

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

The total number of degrees of freedom.

◆ numScv()

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

The total number of sub control volumes.

◆ numScvf()

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

The total number of sub control volume faces.

◆ scv()

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

Get a sub control volume with a global scv index.

◆ scvf()

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

Get a sub control volume face with a global scvf index.

◆ scvfIndicesOfScv()

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

Get the sub control volume face indices of an scv by global index.

◆ setPeriodic()

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

Set the periodicity of the grid geometry.

◆ update()

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

update all fvElementGeometries (do this again after grid adaption)

◆ vertexMapper() [1/2]

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

Returns the mapper for vertices to indices for possibly adaptive grids.

◆ vertexMapper() [2/2]

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

Returns the mapper for vertices to indices for constant grids.

◆ 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 = DiscretizationMethod::ccmpfa
staticconstexpr

export the discretization method this geometry belongs to

◆ hasSingleInteractionVolumeType

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

State if only a single type is used for interaction volumes.

◆ maxElementStencilSize

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

The maximum admissible stencil size (used for static memory allocation during assembly)


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