25 real** offload_array) {
26 int N0_size = offload_data->
n_r * offload_data->
n_phi * offload_data->
n_z;
27 int T0_size = offload_data->
n_r * offload_data->
n_phi * offload_data->
n_z;
43 " Number of neutral species = %d\n",
46 "Species Z/A (Maxwellian)\n");
47 for(
int i=0; i < offload_data->
n_species; i++) {
50 (
int)(offload_data->
znum[i]),
51 (
int)(offload_data->
anum[i]),
67 real** offload_array) {
69 *offload_array = NULL;
87 real* offload_array) {
88 int N0_size = offload_data->
n_r * offload_data->
n_phi * offload_data->
n_z;
89 int T0_size = offload_data->
n_r * offload_data->
n_phi * offload_data->
n_z;
91 for(
int i = 0; i < offload_data->
n_species; i++) {
92 ndata->
anum[i] = offload_data->
anum[i];
93 ndata->
znum[i] = offload_data->
znum[i];
97 &ndata->
n0[i], &offload_array[i * N0_size],
98 offload_data->
n_r, offload_data->
n_phi, offload_data->
n_z,
106 &offload_array[i * T0_size + offload_data->
n_species * N0_size],
107 offload_data->
n_r, offload_data->
n_phi, offload_data->
n_z,
a5err N0_3D_eval_n0(real *n0, real r, real phi, real z, N0_3D_data *ndata)
Evaluate neutral density.
int N0_3D_get_n_species(N0_3D_data *ndata)
Return number of neutral species.
void N0_3D_free_offload(N0_3D_offload_data *offload_data, real **offload_array)
Free offload array and reset parameters.
a5err N0_3D_eval_t0(real *t0, real r, real phi, real z, N0_3D_data *ndata)
Evaluate neutral temperature.
void N0_3D_init(N0_3D_data *ndata, N0_3D_offload_data *offload_data, real *offload_array)
Initialize neutral data on target.
int N0_3D_init_offload(N0_3D_offload_data *offload_data, real **offload_array)
Initialize offload data.
Main header file for ASCOT5.
unsigned long int a5err
Simulation error flag.
static DECLARE_TARGET_SIMD a5err error_raise(error_type type, int line, error_file file)
Raise a new error.
Linear interpolation library.
DECLARE_TARGET_END int linint3D_eval_f(real *f, linint3D_data *str, real x, real y, real z)
Evaluate interpolated value of 3D scalar field.
void linint3D_init(linint3D_data *str, real *c, int n_x, int n_y, int n_z, int bc_x, int bc_y, int bc_z, real x_min, real x_max, real y_min, real y_max, real z_min, real z_max)
Initialize linear interpolation struct for scalar 3D data.
Macros for printing console output.
#define print_out(v,...)
Print to standard output.
3D neutral parameters on the target
linint3D_data t0[MAX_SPECIES]
linint3D_data n0[MAX_SPECIES]
int maxwellian[MAX_SPECIES]
3D neutral parameters on the host
int maxwellian[MAX_SPECIES]