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 34 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::FaceElementStencil, geosx::BoundaryStencil, geosx::CellElementStencilMPFA, and geosx::CellElementStencilTPFA.

◆ 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 130 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 118 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 124 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 136 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::FaceElementStencil.

Definition at line 191 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::CellElementStencilMPFA.

Definition at line 159 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 182 of file StencilBase.hpp.

◆ size()

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

Give the number of stencil entries.

Returns
The number of stencil entries

Implemented in geosx::FaceElementStencil, geosx::BoundaryStencil, geosx::CellElementStencilMPFA, and geosx::CellElementStencilTPFA.

◆ 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 169 of file StencilBase.hpp.


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