REMORA
Regional Modeling of Oceans Refined Adaptively
|
NDArray is the datatype designed to hold any data, including scalars, multidimensional arrays, that read from the NetCDF file. More...
#include <REMORA_NCFile.H>
Public Types | |
using | DType = typename std::remove_const< DataType >::type |
Public Member Functions | |
NDArray (const std::string vname, const std::vector< MPI_Offset > &vshape) | |
constructor | |
NDArray () | |
default constructor | |
NDArray (const NDArray &array) | |
copy constructor | |
NDArray & | operator= (const NDArray &array) |
copy assignment | |
~NDArray () | |
destructor | |
decltype(auto) | get_data () |
get the data pointer | |
std::string | get_vname () |
get the variable name | |
std::vector< MPI_Offset > | get_vshape () |
get the variable data shape | |
size_t | ndim () |
return the total number of data | |
void | set_vshape (std::vector< MPI_Offset > vshape) |
set the data shape information | |
Private Attributes | |
std::string | name |
std::vector< MPI_Offset > | shape |
std::atomic< size_t > | ref_counted |
bool | owned |
DType * | data |
NDArray is the datatype designed to hold any data, including scalars, multidimensional arrays, that read from the NetCDF file.
The data read from NetCDF file are stored in a continuous memory, and the data layout is described by using a vector (shape). AMRex Box can be constructed using the data shape information, and MultiFab data array can be setup using the data that stored in the NDArray.
Definition at line 35 of file REMORA_NCFile.H.
using NDArray< DataType >::DType = typename std::remove_const<DataType>::type |
Definition at line 37 of file REMORA_NCFile.H.
|
inlineexplicit |
constructor
Definition at line 40 of file REMORA_NCFile.H.
default constructor
Definition at line 46 of file REMORA_NCFile.H.
|
inline |
copy constructor
Definition at line 49 of file REMORA_NCFile.H.
destructor
Definition at line 68 of file REMORA_NCFile.H.
|
inline |
get the data pointer
Definition at line 74 of file REMORA_NCFile.H.
|
inline |
get the variable name
Definition at line 80 of file REMORA_NCFile.H.
|
inline |
get the variable data shape
Definition at line 85 of file REMORA_NCFile.H.
|
inline |
return the total number of data
Definition at line 90 of file REMORA_NCFile.H.
Referenced by NDArray< DataType >::NDArray().
|
inline |
copy assignment
Definition at line 58 of file REMORA_NCFile.H.
|
inline |
set the data shape information
Definition at line 98 of file REMORA_NCFile.H.
Definition at line 107 of file REMORA_NCFile.H.
Referenced by NDArray< DataType >::get_data(), NDArray< DataType >::NDArray(), NDArray< DataType >::NDArray(), NDArray< DataType >::operator=(), and NDArray< DataType >::~NDArray().
|
private |
Definition at line 103 of file REMORA_NCFile.H.
Referenced by NDArray< DataType >::get_vname(), NDArray< DataType >::NDArray(), and NDArray< DataType >::operator=().
|
private |
Definition at line 106 of file REMORA_NCFile.H.
Referenced by NDArray< DataType >::NDArray(), NDArray< DataType >::operator=(), and NDArray< DataType >::~NDArray().
|
mutableprivate |
Definition at line 105 of file REMORA_NCFile.H.
Referenced by NDArray< DataType >::get_data(), NDArray< DataType >::NDArray(), NDArray< DataType >::operator=(), and NDArray< DataType >::~NDArray().
|
private |
Definition at line 104 of file REMORA_NCFile.H.
Referenced by NDArray< DataType >::get_vshape(), NDArray< DataType >::NDArray(), NDArray< DataType >::ndim(), NDArray< DataType >::operator=(), and NDArray< DataType >::set_vshape().