ASCOT5
Loading...
Searching...
No Matches
plasma_1DS.h
Go to the documentation of this file.
1
5#ifndef PLASMA_1DS_H
6#define PLASMA_1DS_H
7#include "../ascot5.h"
8#include "../error.h"
9#include "../spline/interp.h"
10
26
30typedef struct {
34 real charge[MAX_SPECIES];
35 int anum[MAX_SPECIES];
36 int znum[MAX_SPECIES];
37 interp1D_data temp[2];
42
44 real** offload_array);
45
47 real** offload_array);
48
49void plasma_1DS_init(plasma_1DS_data* pls_data,
50 plasma_1DS_offload_data* offload_data,
51 real* offload_array);
52GPU_DECLARE_TARGET_SIMD_UNIFORM(pls_data)
53a5err plasma_1DS_eval_temp(real* temp, real rho, int species,
54 plasma_1DS_data* pls_data);
55DECLARE_TARGET_END
56GPU_DECLARE_TARGET_SIMD_UNIFORM(pls_data)
57a5err plasma_1DS_eval_dens(real* dens, real rho, int species,
58 plasma_1DS_data* pls_data);
59DECLARE_TARGET_END
60GPU_DECLARE_TARGET_SIMD_UNIFORM(pls_data)
62 plasma_1DS_data* pls_data);
63DECLARE_TARGET_END
64
65#endif
Main header file for ASCOT5.
double real
Definition ascot5.h:85
#define MAX_SPECIES
Maximum number of plasma species.
Definition ascot5.h:95
Error module for ASCOT5.
unsigned long int a5err
Simulation error flag.
Definition error.h:17
Spline interpolation library.
void plasma_1DS_free_offload(plasma_1DS_offload_data *offload_data, real **offload_array)
Free offload array and reset parameters.
Definition plasma_1DS.c:174
DECLARE_TARGET_END a5err plasma_1DS_eval_dens(real *dens, real rho, int species, plasma_1DS_data *pls_data)
Evaluate plasma density.
Definition plasma_1DS.c:265
DECLARE_TARGET_END a5err plasma_1DS_eval_densandtemp(real *dens, real *temp, real rho, plasma_1DS_data *pls_data)
Evaluate plasma density and temperature for all species.
Definition plasma_1DS.c:300
int plasma_1DS_init_offload(plasma_1DS_offload_data *offload_data, real **offload_array)
Initialize 1DS plasma data and check inputs.
Definition plasma_1DS.c:56
void plasma_1DS_init(plasma_1DS_data *pls_data, plasma_1DS_offload_data *offload_data, real *offload_array)
Initialize magnetic field data struct on target.
Definition plasma_1DS.c:191
a5err plasma_1DS_eval_temp(real *temp, real rho, int species, plasma_1DS_data *pls_data)
Evaluate plasma temperature.
Definition plasma_1DS.c:234
Cubic interpolation struct.
Definition interp.h:56
1D spline plasma parameters on the target
Definition plasma_1DS.h:30
1D spline plasma parameters that will be offloaded to target
Definition plasma_1DS.h:14