Athena++/Atmosphere
Planetary Atmosphere Simulator
AthenaArray< T > Class Template Reference

#include <athena_arrays.hpp>

Inheritance diagram for AthenaArray< T >:
[legend]

Public Types

enum class  DataStatus { empty , shallow_slice , allocated }
 

Public Member Functions

 AthenaArray ()
 
 AthenaArray (int nx1, DataStatus init=DataStatus::allocated)
 
 AthenaArray (int nx2, int nx1, DataStatus init=DataStatus::allocated)
 
 AthenaArray (int nx3, int nx2, int nx1, DataStatus init=DataStatus::allocated)
 
 AthenaArray (int nx4, int nx3, int nx2, int nx1, DataStatus init=DataStatus::allocated)
 
 AthenaArray (int nx5, int nx4, int nx3, int nx2, int nx1, DataStatus init=DataStatus::allocated)
 
 AthenaArray (int nx6, int nx5, int nx4, int nx3, int nx2, int nx1, DataStatus init=DataStatus::allocated)
 
 ~AthenaArray ()
 
 __attribute__ ((nothrow)) AthenaArray(const AthenaArray< T > &t)
 
 __attribute__ ((nothrow)) AthenaArray< T > &operator
 
 __attribute__ ((nothrow)) AthenaArray(AthenaArray< T > &&t)
 
 __attribute__ ((nothrow)) AthenaArray< T > &operator
 
 __attribute__ ((nothrow)) void NewAthenaArray(int nx1)
 
 __attribute__ ((nothrow)) void NewAthenaArray(int nx2
 
 __attribute__ ((nothrow)) void NewAthenaArray(int nx3
 
 __attribute__ ((nothrow)) void NewAthenaArray(int nx4
 
 __attribute__ ((nothrow)) void NewAthenaArray(int nx5
 
 __attribute__ ((nothrow)) void NewAthenaArray(int nx6
 
void DeleteAthenaArray ()
 
void SwapAthenaArray (AthenaArray< T > &array2)
 
void ZeroClear ()
 
int GetDim1 () const
 
int GetDim2 () const
 
int GetDim3 () const
 
int GetDim4 () const
 
int GetDim5 () const
 
int GetDim6 () const
 
void SetDim1 (int nx1)
 
void SetDim2 (int nx2)
 
void SetDim3 (int nx3)
 
void SetDim4 (int nx4)
 
void SetDim5 (int nx5)
 
void SetDim6 (int nx6)
 
int GetSize () const
 
std::size_t GetSizeInBytes () const
 
bool IsShallowSlice ()
 
bool IsEmpty ()
 
bool IsAllocated ()
 
T * data ()
 
const T * data () const
 
T & operator() (const int n)
 
operator() (const int n) const
 
T & operator() (const int n, const int i)
 
operator() (const int n, const int i) const
 
T & operator() (const int n, const int j, const int i)
 
operator() (const int n, const int j, const int i) const
 
T & operator() (const int n, const int k, const int j, const int i)
 
operator() (const int n, const int k, const int j, const int i) const
 
T & operator() (const int m, const int n, const int k, const int j, const int i)
 
operator() (const int m, const int n, const int k, const int j, const int i) const
 
T & operator() (const int p, const int m, const int n, const int k, const int j, const int i)
 
operator() (const int p, const int m, const int n, const int k, const int j, const int i) const
 
void InitWithShallowSlice (AthenaArray< T > &src, const int dim, const int indx, const int nvar)
 
StrideIterator< T * > at (int i) const
 
StrideIterator< T * > at (int j, int i) const
 
StrideIterator< T * > at (int k, int j, int i) const
 

Public Attributes

int nx1
 
int nx2
 
int int nx1
 
int nx3
 
int int nx2
 
int int int nx1
 
int nx4
 
int int nx3
 
int int int nx2
 
int int int int nx1
 
int nx5
 
int int nx4
 
int int int nx3
 
int int int int nx2
 
int int int int int nx1
 

Private Member Functions

void AllocateData ()
 

Private Attributes

T * pdata_
 
int nx1_
 
int nx2_
 
int nx3_
 
int nx4_
 
int nx5_
 
int nx6_
 
DataStatus state_
 

Detailed Description

template<typename T>
class AthenaArray< T >

Definition at line 26 of file athena_arrays.hpp.

Member Enumeration Documentation

◆ DataStatus

template<typename T >
enum AthenaArray::DataStatus
strong
Enumerator
empty 
shallow_slice 
allocated 

Definition at line 28 of file athena_arrays.hpp.

Constructor & Destructor Documentation

◆ AthenaArray() [1/7]

template<typename T >
AthenaArray< T >::AthenaArray ( )
inline

Definition at line 31 of file athena_arrays.hpp.

◆ AthenaArray() [2/7]

template<typename T >
AthenaArray< T >::AthenaArray ( int  nx1,
DataStatus  init = DataStatus::allocated 
)
inlineexplicit

Definition at line 34 of file athena_arrays.hpp.

◆ AthenaArray() [3/7]

template<typename T >
AthenaArray< T >::AthenaArray ( int  nx2,
int  nx1,
DataStatus  init = DataStatus::allocated 
)
inline

Definition at line 37 of file athena_arrays.hpp.

◆ AthenaArray() [4/7]

template<typename T >
AthenaArray< T >::AthenaArray ( int  nx3,
int  nx2,
int  nx1,
DataStatus  init = DataStatus::allocated 
)
inline

Definition at line 40 of file athena_arrays.hpp.

◆ AthenaArray() [5/7]

template<typename T >
AthenaArray< T >::AthenaArray ( int  nx4,
int  nx3,
int  nx2,
int  nx1,
DataStatus  init = DataStatus::allocated 
)
inline

Definition at line 43 of file athena_arrays.hpp.

◆ AthenaArray() [6/7]

template<typename T >
AthenaArray< T >::AthenaArray ( int  nx5,
int  nx4,
int  nx3,
int  nx2,
int  nx1,
DataStatus  init = DataStatus::allocated 
)
inline

Definition at line 46 of file athena_arrays.hpp.

◆ AthenaArray() [7/7]

template<typename T >
AthenaArray< T >::AthenaArray ( int  nx6,
int  nx5,
int  nx4,
int  nx3,
int  nx2,
int  nx1,
DataStatus  init = DataStatus::allocated 
)
inline

Definition at line 50 of file athena_arrays.hpp.

◆ ~AthenaArray()

template<typename T >
AthenaArray< T >::~AthenaArray

Definition at line 191 of file athena_arrays.hpp.

Member Function Documentation

◆ __attribute__() [1/10]

template<typename T >
AthenaArray< T >::__attribute__ ( (nothrow)  ) const &

◆ __attribute__() [2/10]

template<typename T >
AthenaArray< T >::__attribute__ ( (nothrow)  ) &

◆ __attribute__() [3/10]

template<typename T >
AthenaArray< T >::__attribute__ ( (nothrow)  ) &&

◆ __attribute__() [4/10]

template<typename T >
AthenaArray< T >::__attribute__ ( (nothrow)  ) &

◆ __attribute__() [5/10]

template<typename T >
AthenaArray< T >::__attribute__ ( (nothrow)  )

◆ __attribute__() [6/10]

template<typename T >
AthenaArray< T >::__attribute__ ( (nothrow)  )

◆ __attribute__() [7/10]

template<typename T >
AthenaArray< T >::__attribute__ ( (nothrow)  )

◆ __attribute__() [8/10]

template<typename T >
AthenaArray< T >::__attribute__ ( (nothrow)  )

◆ __attribute__() [9/10]

template<typename T >
AthenaArray< T >::__attribute__ ( (nothrow)  )

◆ __attribute__() [10/10]

template<typename T >
AthenaArray< T >::__attribute__ ( (nothrow)  )

◆ DeleteAthenaArray()

template<typename T >
void AthenaArray< T >::DeleteAthenaArray

Definition at line 466 of file athena_arrays.hpp.

◆ SwapAthenaArray()

template<typename T >
void AthenaArray< T >::SwapAthenaArray ( AthenaArray< T > &  array2)

Definition at line 489 of file athena_arrays.hpp.

◆ ZeroClear()

template<typename T >
void AthenaArray< T >::ZeroClear

Definition at line 499 of file athena_arrays.hpp.

◆ GetDim1()

template<typename T >
int AthenaArray< T >::GetDim1 ( ) const
inline

Definition at line 84 of file athena_arrays.hpp.

◆ GetDim2()

template<typename T >
int AthenaArray< T >::GetDim2 ( ) const
inline

Definition at line 85 of file athena_arrays.hpp.

◆ GetDim3()

template<typename T >
int AthenaArray< T >::GetDim3 ( ) const
inline

Definition at line 86 of file athena_arrays.hpp.

◆ GetDim4()

template<typename T >
int AthenaArray< T >::GetDim4 ( ) const
inline

Definition at line 87 of file athena_arrays.hpp.

◆ GetDim5()

template<typename T >
int AthenaArray< T >::GetDim5 ( ) const
inline

Definition at line 88 of file athena_arrays.hpp.

◆ GetDim6()

template<typename T >
int AthenaArray< T >::GetDim6 ( ) const
inline

Definition at line 89 of file athena_arrays.hpp.

◆ SetDim1()

template<typename T >
void AthenaArray< T >::SetDim1 ( int  nx1)
inline

Definition at line 92 of file athena_arrays.hpp.

◆ SetDim2()

template<typename T >
void AthenaArray< T >::SetDim2 ( int  nx2)
inline

Definition at line 93 of file athena_arrays.hpp.

◆ SetDim3()

template<typename T >
void AthenaArray< T >::SetDim3 ( int  nx3)
inline

Definition at line 94 of file athena_arrays.hpp.

◆ SetDim4()

template<typename T >
void AthenaArray< T >::SetDim4 ( int  nx4)
inline

Definition at line 95 of file athena_arrays.hpp.

◆ SetDim5()

template<typename T >
void AthenaArray< T >::SetDim5 ( int  nx5)
inline

Definition at line 96 of file athena_arrays.hpp.

◆ SetDim6()

template<typename T >
void AthenaArray< T >::SetDim6 ( int  nx6)
inline

Definition at line 97 of file athena_arrays.hpp.

◆ GetSize()

template<typename T >
int AthenaArray< T >::GetSize ( ) const
inline

Definition at line 100 of file athena_arrays.hpp.

◆ GetSizeInBytes()

template<typename T >
std::size_t AthenaArray< T >::GetSizeInBytes ( ) const
inline

Definition at line 106 of file athena_arrays.hpp.

◆ IsShallowSlice()

template<typename T >
bool AthenaArray< T >::IsShallowSlice ( )
inline

Definition at line 113 of file athena_arrays.hpp.

◆ IsEmpty()

template<typename T >
bool AthenaArray< T >::IsEmpty ( )
inline

Definition at line 114 of file athena_arrays.hpp.

◆ IsAllocated()

template<typename T >
bool AthenaArray< T >::IsAllocated ( )
inline

Definition at line 115 of file athena_arrays.hpp.

◆ data() [1/2]

template<typename T >
T* AthenaArray< T >::data ( )
inline

Definition at line 119 of file athena_arrays.hpp.

◆ data() [2/2]

template<typename T >
const T* AthenaArray< T >::data ( ) const
inline

Definition at line 120 of file athena_arrays.hpp.

◆ operator()() [1/12]

template<typename T >
T& AthenaArray< T >::operator() ( const int  n)
inline

Definition at line 127 of file athena_arrays.hpp.

◆ operator()() [2/12]

template<typename T >
T AthenaArray< T >::operator() ( const int  n) const
inline

Definition at line 131 of file athena_arrays.hpp.

◆ operator()() [3/12]

template<typename T >
T& AthenaArray< T >::operator() ( const int  n,
const int  i 
)
inline

Definition at line 134 of file athena_arrays.hpp.

◆ operator()() [4/12]

template<typename T >
T AthenaArray< T >::operator() ( const int  n,
const int  i 
) const
inline

Definition at line 136 of file athena_arrays.hpp.

◆ operator()() [5/12]

template<typename T >
T& AthenaArray< T >::operator() ( const int  n,
const int  j,
const int  i 
)
inline

Definition at line 139 of file athena_arrays.hpp.

◆ operator()() [6/12]

template<typename T >
T AthenaArray< T >::operator() ( const int  n,
const int  j,
const int  i 
) const
inline

Definition at line 141 of file athena_arrays.hpp.

◆ operator()() [7/12]

template<typename T >
T& AthenaArray< T >::operator() ( const int  n,
const int  k,
const int  j,
const int  i 
)
inline

Definition at line 144 of file athena_arrays.hpp.

◆ operator()() [8/12]

template<typename T >
T AthenaArray< T >::operator() ( const int  n,
const int  k,
const int  j,
const int  i 
) const
inline

Definition at line 146 of file athena_arrays.hpp.

◆ operator()() [9/12]

template<typename T >
T& AthenaArray< T >::operator() ( const int  m,
const int  n,
const int  k,
const int  j,
const int  i 
)
inline

Definition at line 149 of file athena_arrays.hpp.

◆ operator()() [10/12]

template<typename T >
T AthenaArray< T >::operator() ( const int  m,
const int  n,
const int  k,
const int  j,
const int  i 
) const
inline

Definition at line 151 of file athena_arrays.hpp.

◆ operator()() [11/12]

template<typename T >
T& AthenaArray< T >::operator() ( const int  p,
const int  m,
const int  n,
const int  k,
const int  j,
const int  i 
)
inline

Definition at line 155 of file athena_arrays.hpp.

◆ operator()() [12/12]

template<typename T >
T AthenaArray< T >::operator() ( const int  p,
const int  m,
const int  n,
const int  k,
const int  j,
const int  i 
) const
inline

Definition at line 158 of file athena_arrays.hpp.

◆ InitWithShallowSlice()

template<typename T >
void AthenaArray< T >::InitWithShallowSlice ( AthenaArray< T > &  src,
const int  dim,
const int  indx,
const int  nvar 
)

Definition at line 306 of file athena_arrays.hpp.

◆ at() [1/3]

template<typename T >
StrideIterator<T*> AthenaArray< T >::at ( int  i) const
inline

Definition at line 167 of file athena_arrays.hpp.

◆ at() [2/3]

template<typename T >
StrideIterator<T*> AthenaArray< T >::at ( int  j,
int  i 
) const
inline

Definition at line 171 of file athena_arrays.hpp.

◆ at() [3/3]

template<typename T >
StrideIterator<T*> AthenaArray< T >::at ( int  k,
int  j,
int  i 
) const
inline

Definition at line 175 of file athena_arrays.hpp.

◆ AllocateData()

template<typename T >
void AthenaArray< T >::AllocateData
private

Definition at line 517 of file athena_arrays.hpp.

Member Data Documentation

◆ nx1 [1/5]

template<typename T >
int AthenaArray< T >::nx1

Definition at line 70 of file athena_arrays.hpp.

◆ nx2 [1/4]

template<typename T >
int AthenaArray< T >::nx2

Definition at line 71 of file athena_arrays.hpp.

◆ nx1 [2/5]

template<typename T >
int int AthenaArray< T >::nx1

Definition at line 71 of file athena_arrays.hpp.

◆ nx3 [1/3]

template<typename T >
int AthenaArray< T >::nx3

Definition at line 72 of file athena_arrays.hpp.

◆ nx2 [2/4]

template<typename T >
int int AthenaArray< T >::nx2

Definition at line 72 of file athena_arrays.hpp.

◆ nx1 [3/5]

template<typename T >
int int int AthenaArray< T >::nx1

Definition at line 72 of file athena_arrays.hpp.

◆ nx4 [1/2]

template<typename T >
int AthenaArray< T >::nx4

Definition at line 73 of file athena_arrays.hpp.

◆ nx3 [2/3]

template<typename T >
int int AthenaArray< T >::nx3

Definition at line 73 of file athena_arrays.hpp.

◆ nx2 [3/4]

template<typename T >
int int int AthenaArray< T >::nx2

Definition at line 73 of file athena_arrays.hpp.

◆ nx1 [4/5]

template<typename T >
int int int int AthenaArray< T >::nx1

Definition at line 74 of file athena_arrays.hpp.

◆ nx5

template<typename T >
int AthenaArray< T >::nx5

Definition at line 75 of file athena_arrays.hpp.

◆ nx4 [2/2]

template<typename T >
int int AthenaArray< T >::nx4

Definition at line 75 of file athena_arrays.hpp.

◆ nx3 [3/3]

template<typename T >
int int int AthenaArray< T >::nx3

Definition at line 75 of file athena_arrays.hpp.

◆ nx2 [4/4]

template<typename T >
int int int int AthenaArray< T >::nx2

Definition at line 76 of file athena_arrays.hpp.

◆ nx1 [5/5]

template<typename T >
int int int int int AthenaArray< T >::nx1

Definition at line 76 of file athena_arrays.hpp.

◆ pdata_

template<typename T >
T* AthenaArray< T >::pdata_
private

Definition at line 180 of file athena_arrays.hpp.

◆ nx1_

template<typename T >
int AthenaArray< T >::nx1_
private

Definition at line 181 of file athena_arrays.hpp.

◆ nx2_

template<typename T >
int AthenaArray< T >::nx2_
private

Definition at line 181 of file athena_arrays.hpp.

◆ nx3_

template<typename T >
int AthenaArray< T >::nx3_
private

Definition at line 181 of file athena_arrays.hpp.

◆ nx4_

template<typename T >
int AthenaArray< T >::nx4_
private

Definition at line 181 of file athena_arrays.hpp.

◆ nx5_

template<typename T >
int AthenaArray< T >::nx5_
private

Definition at line 181 of file athena_arrays.hpp.

◆ nx6_

template<typename T >
int AthenaArray< T >::nx6_
private

Definition at line 181 of file athena_arrays.hpp.

◆ state_

template<typename T >
DataStatus AthenaArray< T >::state_
private

Definition at line 182 of file athena_arrays.hpp.


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