3.6-git
DUNE for Multi-{Phase, Component, Scale, Physics, ...} flow and transport in porous media
Classes | Public Types | Public Member Functions | Static Public Attributes | Protected Member Functions | List of all members
Dumux::BoxFVGridGeometry< Scalar, GV, true, Traits > Class Template Reference

Base class for the finite volume geometry vector for box schemes This builds up the sub control volumes and sub control volume faces. More...

#include <dumux/discretization/box/fvgridgeometry.hh>

Inheritance diagram for Dumux::BoxFVGridGeometry< Scalar, GV, true, Traits >:

Description

template<class Scalar, class GV, class Traits>
class Dumux::BoxFVGridGeometry< Scalar, GV, true, Traits >

Base class for the finite volume geometry vector for box schemes 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 DiscretizationMethod = DiscretizationMethods::Box
 export the discretization method this geometry belongs to 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 DofMapper = typename Traits::VertexMapper
 export dof mapper type More...
 
using FeCache = Dune::LagrangeLocalFiniteElementCache< CoordScalar, Scalar, dim, 1 >
 export the finite element cache type More...
 
using GridView = GV
 export the grid view type More...
 
using Cache = BoxGridGeometryCache
 
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

 BoxFVGridGeometry (const GridView gridView)
 Constructor. 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 sun control volume faces. More...
 
std::size_t numBoundaryScvf () const
 
std::size_t numDofs () const
 The total number of degrees of freedom. More...
 
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...
 
const FeCachefeCache () const
 The finite element cache for creating local FE bases. More...
 
const std::vector< SubControlVolume > & scvs (GridIndexType eIdx) const
 Get the local scvs for an element. More...
 
const std::vector< SubControlVolumeFace > & scvfs (GridIndexType eIdx) const
 Get the local scvfs for an element. More...
 
bool dofOnBoundary (GridIndexType dofIdx) const
 If a vertex / d.o.f. is on the boundary. More...
 
bool dofOnPeriodicBoundary (GridIndexType dofIdx) const
 If a vertex / d.o.f. is on a periodic boundary. More...
 
GridIndexType periodicallyMappedDof (GridIndexType dofIdx) const
 The index of the vertex / d.o.f. on the other side of the periodic boundary. More...
 
const std::unordered_map< GridIndexType, GridIndexType > & periodicVertexMap () const
 Returns the map between dofs across periodic boundaries. More...
 
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 {}
 

Protected Member Functions

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

Member Typedef Documentation

◆ Cache

template<class Scalar , class GV , class Traits >
using Dumux::BoxFVGridGeometry< Scalar, GV, true, Traits >::Cache = BoxGridGeometryCache

the cache type (only the caching implementation has this) this alias should only be used by the local view implementation

◆ DiscretizationMethod

template<class Scalar , class GV , class Traits >
using Dumux::BoxFVGridGeometry< Scalar, GV, true, Traits >::DiscretizationMethod = DiscretizationMethods::Box

export the discretization method this geometry belongs to

◆ DofMapper

template<class Scalar , class GV , class Traits >
using Dumux::BoxFVGridGeometry< Scalar, GV, true, Traits >::DofMapper = typename Traits::VertexMapper

export dof mapper type

◆ ElementMapper

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

export the element mapper type

◆ Extrusion

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

export the type of extrusion

◆ FeCache

template<class Scalar , class GV , class Traits >
using Dumux::BoxFVGridGeometry< Scalar, GV, true, Traits >::FeCache = Dune::LagrangeLocalFiniteElementCache<CoordScalar, Scalar, dim, 1>

export the finite element cache type

◆ GlobalCoordinate

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

export the global coordinate type

◆ Grid

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

export the grid type

◆ GridView

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

export the grid view type

◆ LocalView

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

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

◆ SubControlVolume

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

export the type of sub control volume

◆ SubControlVolumeFace

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

export the type of sub control volume

◆ VertexMapper

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

export the vertex mapper type

Constructor & Destructor Documentation

◆ BoxFVGridGeometry()

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

Constructor.

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 >
decltype(auto) Dumux::BaseGridGeometry< GV, Traits >::boundingBoxTree ( ) const
inlineinherited

Returns the bounding box tree of the grid.

◆ dofMapper()

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

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

◆ dofOnBoundary()

template<class Scalar , class GV , class Traits >
bool Dumux::BoxFVGridGeometry< Scalar, GV, true, Traits >::dofOnBoundary ( GridIndexType  dofIdx) const
inline

If a vertex / d.o.f. is on the boundary.

◆ dofOnPeriodicBoundary()

template<class Scalar , class GV , class Traits >
bool Dumux::BoxFVGridGeometry< Scalar, GV, true, Traits >::dofOnPeriodicBoundary ( GridIndexType  dofIdx) const
inline

If a vertex / d.o.f. is on a periodic boundary.

◆ element()

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 >
decltype(auto) 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.

◆ feCache()

template<class Scalar , class GV , class Traits >
const FeCache & Dumux::BoxFVGridGeometry< Scalar, GV, true, Traits >::feCache ( ) const
inline

The finite element cache for creating local FE bases.

◆ 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 Scalar , class GV , class Traits >
bool Dumux::BoxFVGridGeometry< Scalar, GV, true, Traits >::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)

◆ numBoundaryScvf()

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

The total number of boundary sub control volume faces For compatibility reasons with cc methods

◆ numDofs()

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

The total number of degrees of freedom.

◆ numScv()

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

The total number of sub control volumes.

◆ numScvf()

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

The total number of sun control volume faces.

◆ periodicallyMappedDof()

template<class Scalar , class GV , class Traits >
GridIndexType Dumux::BoxFVGridGeometry< Scalar, GV, true, Traits >::periodicallyMappedDof ( GridIndexType  dofIdx) const
inline

The index of the vertex / d.o.f. on the other side of the periodic boundary.

◆ periodicVertexMap()

template<class Scalar , class GV , class Traits >
const std::unordered_map< GridIndexType, GridIndexType > & Dumux::BoxFVGridGeometry< Scalar, GV, true, Traits >::periodicVertexMap ( ) const
inline

Returns the map between dofs across periodic boundaries.

◆ scvfs()

template<class Scalar , class GV , class Traits >
const std::vector< SubControlVolumeFace > & Dumux::BoxFVGridGeometry< Scalar, GV, true, Traits >::scvfs ( GridIndexType  eIdx) const
inline

Get the local scvfs for an element.

◆ scvs()

template<class Scalar , class GV , class Traits >
const std::vector< SubControlVolume > & Dumux::BoxFVGridGeometry< Scalar, GV, true, Traits >::scvs ( GridIndexType  eIdx) const
inline

Get the local scvs for an element.

◆ setPeriodic()

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

Set the periodicity of the grid geometry.

◆ update() [1/2]

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

update all fvElementGeometries (call this after grid adaption)

◆ update() [2/2]

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

update all fvElementGeometries (call this 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.

Member Data Documentation

◆ discMethod

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

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