chombo-discharge
Public Member Functions | Protected Attributes | List of all members
EBAMRData< T > Class Template Reference

Default class for holding LevelData<T> data across an EBAMR realm. More...

#include <CD_EBAMRData.H>

Inheritance diagram for EBAMRData< T >:
Inheritance graph
[legend]

Public Member Functions

 EBAMRData () noexcept
 Default constructor. Does nothing.
 
 EBAMRData (const int a_size) noexcept
 Destructor. Sets m_data to size a_size but does not allocate anything.
 
virtual ~EBAMRData () noexcept
 Destructor. Does nothing.
 
RefCountedPtr< LevelData< T > > & operator[] (int a_level) noexcept
 Indexing operators. Returns m_data[a_level]. More...
 
const RefCountedPtr< LevelData< T > > & operator[] (int a_level) const noexcept
 Indexing operators. Returns const m_data[a_level]. More...
 
void resize (const int a_size) noexcept
 Resize m_data to having size a_size. More...
 
void setRealm (const std::string a_realm) noexcept
 Sets the realm for this object. More...
 
int size () const noexcept
 Get size of m_data.
 
void exchange () noexcept
 Exchange on all AMR levels.
 
void clear () noexcept
 Delete all data.
 
void reserve () noexcept
 Reserve data.
 
void release () noexcept
 Release data.
 
bool isReserved () const noexcept
 Check if data is reserved.
 
Vector< RefCountedPtr< LevelData< T > > > & getData () noexcept
 Get underlying data. Returns m_data.
 
const Vector< RefCountedPtr< LevelData< T > > > & getData () const noexcept
 Get underlying data. Returns const m_data.
 
void push_back (RefCountedPtr< LevelData< T >> &a_levelData) noexcept
 Push a LevelData<T> object to the back of the data vector. More...
 
const std::string getRealm () const noexcept
 Returns the string identifier for whatever realm this data is supposed to be allocated over.
 

Protected Attributes

std::string m_realm
 Identifier for realm.
 
bool m_reserved
 Reserved or not.
 
Vector< RefCountedPtr< LevelData< T > > > m_data
 Underlying data.
 

Detailed Description

template<typename T>
class EBAMRData< T >

Default class for holding LevelData<T> data across an EBAMR realm.

This class is a base class for holding LevelData<T> over a realm. The class does not have arithmetic operators or assignment operators because LevelData<T> does not have them. Manipulating the data is done directly by fetching the data on a level through the indexing operator [], or by fetching all the data through getData.

Member Function Documentation

◆ operator[]() [1/2]

template<typename T >
const RefCountedPtr< LevelData< T > > & EBAMRData< T >::operator[] ( int  a_level) const
noexcept

Indexing operators. Returns const m_data[a_level].

Parameters
[in]a_levelGrid level

◆ operator[]() [2/2]

template<typename T >
RefCountedPtr< LevelData< T > > & EBAMRData< T >::operator[] ( int  a_level)
noexcept

Indexing operators. Returns m_data[a_level].

Parameters
[in]a_levelGrid level

◆ push_back()

template<typename T >
void EBAMRData< T >::push_back ( RefCountedPtr< LevelData< T >> &  a_levelData)
noexcept

Push a LevelData<T> object to the back of the data vector.

Parameters
[in]a_levelDataData to append to vector

◆ resize()

template<typename T >
void EBAMRData< T >::resize ( const int  a_size)
noexcept

Resize m_data to having size a_size.

Parameters
[in]a_sizeData size

◆ setRealm()

template<typename T >
void EBAMRData< T >::setRealm ( const std::string  a_realm)
noexcept

Sets the realm for this object.

Parameters
[in]a_realmRealm name

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