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

#include <StencilBase.hpp>

Public Member Functions

virtual ~StencilBase ()=default
 Destructor.
 
 StencilBase (StencilBase const &)=default
 Constructor.
 
 StencilBase (StencilBase &&)=default
 Move constructor.
 
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...
 
LEAFCLASSTRAITS::IndexContainerViewConstType getElementRegionIndices () const
 Const access to the element regions indices. More...
 
LEAFCLASSTRAITS::IndexContainerViewConstType getElementSubRegionIndices () const
 Const access to the element subregions indices. More...
 
LEAFCLASSTRAITS::IndexContainerViewConstType getElementIndices () const
 Const access to the element indices. More...
 
LEAFCLASSTRAITS::WeightContainerViewConstType getWeights () const
 Const access to the stencil weights. More...
 

Protected Attributes

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

Detailed Description

template<typename LEAFCLASSTRAITS, typename LEAFCLASS>
class geosx::StencilBase< LEAFCLASSTRAITS, LEAFCLASS >

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

Definition at line 107 of file StencilBase.hpp.

Member Function Documentation

◆ add()

template<typename LEAFCLASSTRAITS, typename LEAFCLASS>
virtual void geosx::StencilBase< LEAFCLASSTRAITS, 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 geosx::SurfaceElementStencil, geosx::FaceElementToCellStencil, geosx::EmbeddedSurfaceToCellStencil, geosx::CellElementStencilTPFA, geosx::BoundaryStencil, and geosx::CellElementStencilMPFA.

◆ getElementIndices()

template<typename LEAFCLASSTRAITS, typename LEAFCLASS>
LEAFCLASSTRAITS::IndexContainerViewConstType geosx::StencilBase< LEAFCLASSTRAITS, LEAFCLASS >::getElementIndices ( ) const
inline

Const access to the element indices.

Returns
A view to const

Definition at line 203 of file StencilBase.hpp.

◆ getElementRegionIndices()

template<typename LEAFCLASSTRAITS, typename LEAFCLASS>
LEAFCLASSTRAITS::IndexContainerViewConstType geosx::StencilBase< LEAFCLASSTRAITS, LEAFCLASS >::getElementRegionIndices ( ) const
inline

Const access to the element regions indices.

Returns
A view to const

Definition at line 191 of file StencilBase.hpp.

◆ getElementSubRegionIndices()

template<typename LEAFCLASSTRAITS, typename LEAFCLASS>
LEAFCLASSTRAITS::IndexContainerViewConstType geosx::StencilBase< LEAFCLASSTRAITS, LEAFCLASS >::getElementSubRegionIndices ( ) const
inline

Const access to the element subregions indices.

Returns
A view to const

Definition at line 197 of file StencilBase.hpp.

◆ getWeights()

template<typename LEAFCLASSTRAITS, typename LEAFCLASS>
LEAFCLASSTRAITS::WeightContainerViewConstType geosx::StencilBase< LEAFCLASSTRAITS, LEAFCLASS >::getWeights ( ) const
inline

Const access to the stencil weights.

Returns
A view to const

Definition at line 209 of file StencilBase.hpp.

◆ move()

template<typename LEAFCLASSTRAITS , typename LEAFCLASS >
void geosx::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 geosx::SurfaceElementStencil, geosx::FaceElementToCellStencil, and geosx::EmbeddedSurfaceToCellStencil.

Definition at line 264 of file StencilBase.hpp.

◆ reserve()

template<typename LEAFCLASSTRAITS , typename LEAFCLASS >
void geosx::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 geosx::FaceElementToCellStencil, geosx::CellElementStencilTPFA, and geosx::CellElementStencilMPFA.

Definition at line 232 of file StencilBase.hpp.

◆ setName()

template<typename LEAFCLASSTRAITS , typename LEAFCLASS >
void geosx::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 255 of file StencilBase.hpp.

◆ size()

template<typename LEAFCLASSTRAITS, typename LEAFCLASS>
virtual localIndex geosx::StencilBase< LEAFCLASSTRAITS, LEAFCLASS >::size ( ) const
pure virtual

◆ zero()

template<typename LEAFCLASSTRAITS , typename LEAFCLASS >
bool geosx::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 242 of file StencilBase.hpp.


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