19 #ifndef GEOSX_FINITEVOLUME_STENCILBASE_HPP_ 20 #define GEOSX_FINITEVOLUME_STENCILBASE_HPP_ 23 #include "codingUtilities/Utilities.hpp" 33 template<
typename LEAFCLASSTRAITS,
typename LEAFCLASS >
89 localIndex const *
const elementSubRegionIndices,
91 real64 const *
const weights,
112 void setName(
string const & name );
136 typename LEAFCLASSTRAITS::WeightContainerViewConstType
getWeights()
const {
return m_weights.toViewConst(); }
149 typename LEAFCLASSTRAITS::WeightContainerType
m_weights;
158 template<
typename LEAFCLASSTRAITS,
typename LEAFCLASS >
168 template<
typename LEAFCLASSTRAITS,
typename LEAFCLASS >
174 for(
localIndex i = 0; i < static_cast< LEAFCLASS * >(
this)->stencilSize( connectorIndex ); ++i )
181 template<
typename LEAFCLASSTRAITS,
typename LEAFCLASS >
190 template<
typename LEAFCLASSTRAITS,
typename LEAFCLASS >
virtual bool zero(localIndex const connectorIndex)
Zero weights for a stencil entry.
virtual void reserve(localIndex const size)
Reserve the size of the stencil.
LEAFCLASSTRAITS::WeightContainerType m_weights
The container for the weights for each point in each stencil.
map< localIndex, localIndex > m_connectorIndices
The map that provides the stencil index given the index of the underlying connector object...
LEAFCLASSTRAITS::IndexContainerType m_elementIndices
The container for the element indices for each point in each stencil.
virtual ~StencilBase()=default
Destructor.
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.
Base template for ordered and unordered maps.
void setName(string const &name)
Set the name used in data movement logging callbacks.
virtual localIndex size() const =0
Give the number of stencil entries.
double real64
64-bit floating point type.
LEAFCLASSTRAITS::IndexContainerType m_elementSubRegionIndices
The container for the element sub region indices for each point in each stencil.
LEAFCLASSTRAITS::IndexContainerViewConstType getElementIndices() const
Const access to the element indices.
MemorySpace
An enum containing the available memory spaces.
virtual void move(LvArray::MemorySpace const space)
Move the data arrays associated with the stencil to a specified memory space.
LEAFCLASSTRAITS::WeightContainerViewConstType getWeights() const
Const access to the stencil weights.
LEAFCLASSTRAITS::IndexContainerViewConstType getElementSubRegionIndices() const
Const access to the element subregions indices.
LEAFCLASSTRAITS::IndexContainerType m_elementRegionIndices
The container for the element region indices for each point in each stencil.
std::ptrdiff_t localIndex
Local index type (for indexing objects within an MPI partition).
LEAFCLASSTRAITS::IndexContainerViewConstType getElementRegionIndices() const
Const access to the element regions indices.