GEOSX
Public Member Functions | Protected Attributes | List of all members
geos::StencilBase< TRAITS, LEAFCLASS > Class Template Referenceabstract

Provides management of the interior stencil points when using Two-Point flux approximation. More...

#include <StencilBase.hpp>

Inheritance diagram for geos::StencilBase< TRAITS, LEAFCLASS >:
Inheritance graph
[legend]

Public Member Functions

virtual ~StencilBase ()=default
 Destructor.
 
virtual void reserve (localIndex const size)
 Reserve the size of the stencil. More...
 
virtual void move (LvArray::MemorySpace const space)
 Move the data arrays associated with the stencil to a specified memory space. More...
 
virtual void add (localIndex const numPts, localIndex const *const elementRegionIndices, localIndex const *const elementSubRegionIndices, localIndex const *const elementIndices, real64 const *const weights, localIndex const connectorIndex)=0
 Add an entry to the stencil. More...
 
virtual bool zero (localIndex const connectorIndex)
 Zero weights for a stencil entry. More...
 
virtual localIndex size () const =0
 Give the number of stencil entries. More...
 
void setName (string const &name)
 Set the name used in data movement logging callbacks. More...
 
TRAITS::IndexContainerViewConstType getElementRegionIndices () const
 Const access to the element regions indices. More...
 
TRAITS::IndexContainerViewConstType getElementSubRegionIndices () const
 Const access to the element subregions indices. More...
 
TRAITS::IndexContainerViewConstType getElementIndices () const
 Const access to the element indices. More...
 
TRAITS::WeightContainerViewConstType getWeights () const
 Const access to the stencil weights. More...
 

Protected Attributes

TRAITS::IndexContainerType m_elementRegionIndices
 The container for the element region indices for each point in each stencil.
 
TRAITS::IndexContainerType m_elementSubRegionIndices
 The container for the element sub region indices for each point in each stencil.
 
TRAITS::IndexContainerType m_elementIndices
 The container for the element indices for each point in each stencil.
 
TRAITS::WeightContainerType m_weights
 The container for the weights for each point in each stencil.
 
unordered_map< localIndex, localIndexm_connectorIndices
 The map that provides the stencil index given the index of the underlying connector object.
 

Detailed Description

template<typename TRAITS, typename LEAFCLASS>
class geos::StencilBase< TRAITS, LEAFCLASS >

Provides management of the interior stencil points when using Two-Point flux approximation.

Template Parameters
TRAITSthe traits class describing properties of the stencil
LEAFCLASSderived type for CRTP

Definition at line 150 of file StencilBase.hpp.

Member Function Documentation

◆ add()

template<typename TRAITS , typename LEAFCLASS >
virtual void geos::StencilBase< TRAITS, LEAFCLASS >::add ( localIndex const  numPts,
localIndex const *const  elementRegionIndices,
localIndex const *const  elementSubRegionIndices,
localIndex const *const  elementIndices,
real64 const *const  weights,
localIndex const  connectorIndex 
)
pure virtual

Add an entry to the stencil.

Parameters
[in]numPtsThe number of points in the stencil entry
[in]elementRegionIndicesThe element region indices for each point in the stencil entry
[in]elementSubRegionIndicesThe element sub-region indices for each point in the stencil entry
[in]elementIndicesThe element indices for each point in the stencil entry
[in]weightsThe weights each point in the stencil entry
[in]connectorIndexThe index of the connector element that the stencil acts across

Implemented in geos::CellElementStencilMPFA, geos::SurfaceElementStencil, geos::FaceElementToCellStencil, geos::EmbeddedSurfaceToCellStencil, geos::CellElementStencilTPFA, and geos::BoundaryStencil.

◆ getElementIndices()

template<typename TRAITS , typename LEAFCLASS >
TRAITS::IndexContainerViewConstType geos::StencilBase< TRAITS, LEAFCLASS >::getElementIndices ( ) const
inline

Const access to the element indices.

Returns
A view to const

Definition at line 231 of file StencilBase.hpp.

◆ getElementRegionIndices()

template<typename TRAITS , typename LEAFCLASS >
TRAITS::IndexContainerViewConstType geos::StencilBase< TRAITS, LEAFCLASS >::getElementRegionIndices ( ) const
inline

Const access to the element regions indices.

Returns
A view to const

Definition at line 217 of file StencilBase.hpp.

◆ getElementSubRegionIndices()

template<typename TRAITS , typename LEAFCLASS >
TRAITS::IndexContainerViewConstType geos::StencilBase< TRAITS, LEAFCLASS >::getElementSubRegionIndices ( ) const
inline

Const access to the element subregions indices.

Returns
A view to const

Definition at line 224 of file StencilBase.hpp.

◆ getWeights()

template<typename TRAITS , typename LEAFCLASS >
TRAITS::WeightContainerViewConstType geos::StencilBase< TRAITS, LEAFCLASS >::getWeights ( ) const
inline

Const access to the stencil weights.

Returns
A view to const

Definition at line 238 of file StencilBase.hpp.

◆ move()

template<typename LEAFCLASSTRAITS , typename LEAFCLASS >
void geos::StencilBase< LEAFCLASSTRAITS, LEAFCLASS >::move ( LvArray::MemorySpace const  space)
virtual

Move the data arrays associated with the stencil to a specified memory space.

Parameters
spaceThe target memory space.
Note
The existence of this function indicates we need to redesign the stencil classes.

Reimplemented in geos::SurfaceElementStencil, geos::FaceElementToCellStencil, and geos::EmbeddedSurfaceToCellStencil.

Definition at line 293 of file StencilBase.hpp.

◆ reserve()

template<typename LEAFCLASSTRAITS , typename LEAFCLASS >
void geos::StencilBase< LEAFCLASSTRAITS, LEAFCLASS >::reserve ( localIndex const  size)
virtual

Reserve the size of the stencil.

Parameters
[in]sizethe size of the stencil to reserve

Reimplemented in geos::FaceElementToCellStencil, geos::CellElementStencilTPFA, and geos::CellElementStencilMPFA.

Definition at line 261 of file StencilBase.hpp.

◆ setName()

template<typename LEAFCLASSTRAITS , typename LEAFCLASS >
void geos::StencilBase< LEAFCLASSTRAITS, LEAFCLASS >::setName ( string const &  name)

Set the name used in data movement logging callbacks.

Parameters
namethe name prefix for the stencil's data arrays

Definition at line 284 of file StencilBase.hpp.

◆ size()

template<typename TRAITS , typename LEAFCLASS >
virtual localIndex geos::StencilBase< TRAITS, LEAFCLASS >::size ( ) const
pure virtual

Give the number of stencil entries.

Returns
The number of stencil entries

◆ zero()

template<typename LEAFCLASSTRAITS , typename LEAFCLASS >
bool geos::StencilBase< LEAFCLASSTRAITS, LEAFCLASS >::zero ( localIndex const  connectorIndex)
virtual

Zero weights for a stencil entry.

Parameters
[in]connectorIndexThe index of the connector element that the stencil acts across for which the weights are to be zero.
Returns
True if a valid connectorIndex was found, and had its corresponding weights set to zero.

Definition at line 271 of file StencilBase.hpp.


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