86 real** offload_array,
char* qid) {
88 #define NPATH "/neutral/N0_1D_XXXXXXXXXX/"
92 f, qid, __FILE__, __LINE__) ) {
return 1;}
94 f, qid, __FILE__, __LINE__) ) {
return 1;}
96 f, qid, __FILE__, __LINE__) ) {
return 1;}
100 f, qid, __FILE__, __LINE__) ) {
return 1;}
102 f, qid, __FILE__, __LINE__) ) {
return 1;}
104 f, qid, __FILE__, __LINE__) ) {
return 1;}
106 f, qid, __FILE__, __LINE__) ) {
return 1;}
108 int N0_size = offload_data->
n_rho;
109 int T0_size = offload_data->
n_rho;
112 * (N0_size + T0_size)
117 real* n0 = &(*offload_array)[0];
118 real* t0 = &(*offload_array)[offload_data->
n_species * N0_size];
122 f, qid, __FILE__, __LINE__) ) {
return 1;}
124 f, qid, __FILE__, __LINE__) ) {
return 1;}
126 for(
int i = 0; i < offload_data->
n_species * T0_size; i++) {
147 real** offload_array,
char* qid) {
149 #define NPATH "/neutral/N0_3D_XXXXXXXXXX/"
153 f, qid, __FILE__, __LINE__) ) {
return 1;}
155 f, qid, __FILE__, __LINE__) ) {
return 1;}
157 f, qid, __FILE__, __LINE__) ) {
return 1;}
159 f, qid, __FILE__, __LINE__) ) {
return 1;}
161 f, qid, __FILE__, __LINE__) ) {
return 1;}
163 f, qid, __FILE__, __LINE__) ) {
return 1;}
165 f, qid, __FILE__, __LINE__) ) {
return 1;}
167 f, qid, __FILE__, __LINE__) ) {
return 1;}
169 f, qid, __FILE__, __LINE__) ) {
return 1;}
177 f, qid, __FILE__, __LINE__) ) {
return 1;}
179 f, qid, __FILE__, __LINE__) ) {
return 1;}
181 f, qid, __FILE__, __LINE__) ) {
return 1;}
183 f, qid, __FILE__, __LINE__) ) {
return 1;}
185 int N0_size = offload_data->
n_r * offload_data->
n_phi * offload_data->
n_z;
186 int T0_size = offload_data->
n_r * offload_data->
n_phi * offload_data->
n_z;
188 *offload_array = (
real*) malloc(
189 offload_data->
n_species * (N0_size + T0_size) *
sizeof(
real));
193 real* n0 = &(*offload_array)[0];
194 real* t0 = &(*offload_array)[offload_data->
n_species * N0_size];
198 f, qid, __FILE__, __LINE__) ) {
return 1;}
200 f, qid, __FILE__, __LINE__) ) {
return 1;}
202 for(
int i = 0; i < offload_data->
n_species * T0_size; i++) {
int hdf5_read_double(const char *var, real *ptr, hid_t file, char *qid, const char *errfile, int errline)
Read double-valued data from ASCOT5 HDF5 file.
int hdf5_read_int(const char *var, int *ptr, hid_t file, char *qid, const char *errfile, int errline)
Read int-valued data from ASCOT5 HDF5 file.
int hdf5_neutral_init_offload(hid_t f, neutral_offload_data *offload_data, real **offload_array, char *qid)
Initialize neutral data from HDF5 file.
int hdf5_neutral_read_1D(hid_t f, N0_1D_offload_data *offload_data, real **offload_array, char *qid)
Load neutral data from HDF5 file and prepare parameters.
int hdf5_neutral_read_3D(hid_t f, N0_3D_offload_data *offload_data, real **offload_array, char *qid)
Load neutral data from HDF5 file and prepare parameters.