25 real** offload_array) {
26 int N0_size = offload_data->
n_rho;
27 int T0_size = offload_data->
n_rho;
37 " Number of neutral species = %d\n",
40 "Species Z/A (Maxwellian)\n");
41 for(
int i=0; i < offload_data->
n_species; i++) {
44 (
int)(offload_data->
znum[i]),
45 (
int)(offload_data->
anum[i]),
61 real** offload_array) {
63 *offload_array = NULL;
81 real* offload_array) {
82 int N0_size = offload_data->
n_rho;
83 int T0_size = offload_data->
n_rho;
85 for(
int i = 0; i < offload_data->
n_species; i++) {
86 ndata->
anum[i] = offload_data->
anum[i];
87 ndata->
znum[i] = offload_data->
znum[i];
91 &ndata->
n0[i], &offload_array[i * N0_size],
97 &offload_array[i * T0_size + offload_data->
n_species * N0_size],
int N0_1D_init_offload(N0_1D_offload_data *offload_data, real **offload_array)
Initialize offload data.
a5err N0_1D_eval_n0(real *n0, real rho, N0_1D_data *ndata)
Evaluate neutral density.
void N0_1D_free_offload(N0_1D_offload_data *offload_data, real **offload_array)
Free offload array and reset parameters.
a5err N0_1D_eval_t0(real *t0, real rho, N0_1D_data *ndata)
Evaluate neutral temperature.
void N0_1D_init(N0_1D_data *ndata, N0_1D_offload_data *offload_data, real *offload_array)
Initialize neutral data on target.
int N0_1D_get_n_species(N0_1D_data *ndata)
Return number of neutral species.
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.
int linint1D_eval_f(real *f, linint1D_data *str, real x)
Evaluate interpolated value of 1D scalar field.
void linint1D_init(linint1D_data *str, real *c, int n_x, int bc_x, real x_min, real x_max)
Initialize linear interpolation struct for scalar 1D data.
Macros for printing console output.
#define print_out(v,...)
Print to standard output.
1D neutral parameters on the target
linint1D_data t0[MAX_SPECIES]
int maxwellian[MAX_SPECIES]
linint1D_data n0[MAX_SPECIES]
1D neutral parameters on the host
int maxwellian[MAX_SPECIES]