|
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 | |
| 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::shared_ptr< 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 |
get the data pointer
Definition at line 49 of file REMORA_NCFile.H.
|
inline |
get the variable name
Definition at line 54 of file REMORA_NCFile.H.
|
inline |
get the variable data shape
Definition at line 59 of file REMORA_NCFile.H.
|
inline |
return the total number of data
Definition at line 64 of file REMORA_NCFile.H.
|
inline |
set the data shape information
Definition at line 72 of file REMORA_NCFile.H.
Definition at line 79 of file REMORA_NCFile.H.
Referenced by NDArray< DataType >::get_data().
|
private |
Definition at line 77 of file REMORA_NCFile.H.
Referenced by NDArray< DataType >::get_vname().
|
private |
Definition at line 78 of file REMORA_NCFile.H.
Referenced by NDArray< DataType >::get_vshape(), NDArray< DataType >::ndim(), and NDArray< DataType >::set_vshape().