Class BaseState
-
template<class T>
class BaseState Public Functions
-
inline BaseState() noexcept
-
explicit BaseState(const int num_levs, const int length = 1, const int ncomp = 1, const T val = T())
-
BaseState(const amrex::Gpu::ManagedVector<T> &src, const int num_levs, const int length = 1, const int ncomp = 1)
create a BaseState object from an existing Fortran-friendly base state
-
BaseState(const amrex::Vector<T> &src, const int num_levs, const int length = 1, const int ncomp = 1)
-
~BaseState() = default
- inline AMREX_FORCE_INLINE BaseStateArray< T const > array () const noexcept
return a BaseStateArray object to allow for accessing the underlying data
- inline AMREX_FORCE_INLINE BaseStateArray< T > array () noexcept
return a BaseStateArray object to allow for accessing the underlying data
- inline AMREX_FORCE_INLINE BaseStateArray< const T > const_array () const noexcept
- inline AMREX_FORCE_INLINE T array (const int i) noexcept
return ith element of underlying data array
-
void define(const int num_levs, const int length = 1, const int ncomp = 1, const T val = T())
allocate memory for the BaseState
- inline AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE int nLevels () const noexcept
number of levels in base
- inline AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE int length () const noexcept
number of cells in base
- inline AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE int nComp () const noexcept
number of components
-
void copy(const BaseStateArray<T> src)
- inline AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE T * dataPtr () const noexcept
-
BaseState(const int, const int, const int, const bool) = delete
make sure that this class is never instantiated with bool
Friends
-
template<class U>
friend BaseState<U> operator+(const U val, const BaseState<U> &p) scalar addition to the whole base state
-
template<class U>
friend BaseState<U> operator+(const BaseState<U> &lhs, const BaseState<U> &rhs) element-wise addition
-
template<class U>
friend BaseState<U> operator-(const U val, const BaseState<U> &p) scalar subtraction from the whole base state
-
template<class U>
friend BaseState<U> operator-(const BaseState<U> &lhs, const BaseState<U> &rhs) element-wise subtraction
-
template<class U>
friend BaseState<U> operator*(const U val, const BaseState<U> &p) scalar multiplication of the whole base state
-
template<class U>
friend BaseState<U> operator*(const BaseState<U> &lhs, const BaseState<U> &rhs) element-wise multiplication
-
template<class U>
friend BaseState<U> operator/(const U val, const BaseState<U> &p) scalar division of the whole base state
-
template<class U>
friend BaseState<U> operator/(const BaseState<U> &lhs, const BaseState<U> &rhs) element-wise division
-
inline BaseState() noexcept