ASCOT5
Loading...
Searching...
No Matches
simulate.h
Go to the documentation of this file.
1
8#ifndef SIMULATE_H
9#define SIMULATE_H
10
11#include "ascot5.h"
12#include "B_field.h"
13#include "E_field.h"
14#include "plasma.h"
15#include "neutral.h"
16#include "wall.h"
17#include "boozer.h"
18#include "mhd.h"
19#include "asigma.h"
20#include "nbi.h"
21#include "diag.h"
22#include "offload.h"
23#include "random.h"
24#include "simulate/mccc/mccc.h"
25
47
55typedef struct {
56 /* Input and diagnostic interface offload data */
68 /* Options - general */
73 /* Options - fixed time-step */
79 /* Options - adaptive time-step */
89 /* Options - physics */
105 /* Options - end conditions */
119 /* Metadata */
120 char hdf5_in[256];
121 char hdf5_out[256];
122 char qid[256];
123 char description[256];
129 /* QIDs for inputs if the active inputs are not used */
130 char qid_options[256];
131 char qid_bfield[256];
132 char qid_efield[256];
133 char qid_marker[256];
134 char qid_wall[256];
135 char qid_plasma[256];
136 char qid_neutral[256];
137 char qid_boozer[256];
138 char qid_mhd[256];
139 char qid_asigma[256];
140 char qid_nbi[256];
143
223
225
226void sim_init(sim_data* sim, sim_offload_data* sim_offload);
227
228void simulate(int id, int n_particles, particle_state* p,
229 sim_offload_data* sim_offload,
230 offload_package* offload_data,
231 real* offload_array, int* int_offload_array,
232 real* diag_offload_array);
233
234#endif
Header file for B_field.c.
Header file for E_field.c.
Main header file for ASCOT5.
double real
Definition ascot5.h:85
Header file for asigma.c.
Header file for boozer.c.
Header file for diag.c.
Header file for mccc package.
Header file for mhd.c.
Header file for nbi.c.
Header file for neutral.c.
Header file for offload.h.
Header file for plasma.c.
Header file for random.c.
void * random_data
Definition random.h:87
void simulate_init_offload(sim_offload_data *sim)
Initializes simulation settings.
Definition simulate.c:349
void sim_init(sim_data *sim, sim_offload_data *sim_offload)
Initialize simulation data struct on target.
Definition simulate.c:365
SIMULATION_MODE
Simulaton modes.
Definition simulate.h:31
@ simulate_mode_fo
Definition simulate.h:34
@ simulate_mode_ml
Definition simulate.h:45
@ simulate_mode_gc
Definition simulate.h:37
@ simulate_mode_hybrid
Definition simulate.h:42
void simulate(int id, int n_particles, particle_state *p, sim_offload_data *sim_offload, offload_package *offload_data, real *offload_array, int *int_offload_array, real *diag_offload_array)
Execute marker simulation.
Definition simulate.c:80
Magnetic field simulation data.
Definition B_field.h:63
Magnetic field offload data.
Definition B_field.h:44
Electric field simulation data.
Definition E_field.h:55
Electric field offload data.
Definition E_field.h:39
Atomic reaction simulation data.
Definition asigma.h:66
Atomic reaction offload data.
Definition asigma.h:53
Boozer parameters on the target.
Definition boozer.h:29
offload data for maps between boozer and cylindrical coordinates
Definition boozer.h:16
Diagnostics data struct.
Definition diag.h:54
Diagnostics offload data struct.
Definition diag.h:21
Parameters and data required to evaluate Coulomb collisions.
Definition mccc.h:27
MHD simulation data.
Definition mhd.h:57
MHD offload data.
Definition mhd.h:41
NBI data on target.
Definition nbi.h:61
NBI parameters consisting of a bundle of injectors.
Definition nbi.h:40
Neutral simulation data.
Definition neutral.h:53
Neutral offload data.
Definition neutral.h:37
Struct to keep track of the offload array length and unpack status.
Definition offload.h:11
General representation of a marker.
Definition particle.h:40
Plasma simulation data.
Definition plasma.h:57
Plasma offload data.
Definition plasma.h:40
Simulation data struct.
Definition simulate.h:154
int enable_orbfol
Definition simulate.h:194
real endcond_min_ekin
Definition simulate.h:215
int endcond_torandpol
Definition simulate.h:220
real endcond_max_rho
Definition simulate.h:214
int record_mode
Definition simulate.h:175
int sim_mode
Definition simulate.h:173
int disable_energyccoll
Definition simulate.h:200
real ada_max_drho
Definition simulate.h:188
real ada_tol_clmbcol
Definition simulate.h:186
plasma_data plasma_data
Definition simulate.h:158
mhd_data mhd_data
Definition simulate.h:162
real endcond_max_tororb
Definition simulate.h:218
int enable_atomic
Definition simulate.h:197
int disable_gcdiffccoll
Definition simulate.h:204
real endcond_min_thermal
Definition simulate.h:216
real endcond_max_mileage
Definition simulate.h:211
real fix_usrdef_val
Definition simulate.h:179
E_field_data E_data
Definition simulate.h:157
int disable_pitchccoll
Definition simulate.h:202
int enable_mhd
Definition simulate.h:196
int endcond_active
Definition simulate.h:209
int fix_usrdef_use
Definition simulate.h:178
mccc_data mccc_data
Definition simulate.h:169
real endcond_max_polorb
Definition simulate.h:219
random_data random_data
Definition simulate.h:168
neutral_data neutral_data
Definition simulate.h:159
int fix_gyrodef_nstep
Definition simulate.h:180
real endcond_max_cputime
Definition simulate.h:212
boozer_data boozer_data
Definition simulate.h:161
real endcond_min_rho
Definition simulate.h:213
real endcond_lim_simtime
Definition simulate.h:210
int enable_ada
Definition simulate.h:174
B_field_data B_data
Definition simulate.h:156
wall_data wall_data
Definition simulate.h:160
int reverse_time
Definition simulate.h:206
real ada_max_dphi
Definition simulate.h:190
asigma_data asigma_data
Definition simulate.h:163
int enable_clmbcol
Definition simulate.h:195
int disable_gctransform
Definition simulate.h:198
real ada_tol_orbfol
Definition simulate.h:184
diag_data diag_data
Definition simulate.h:165
nbi_data nbi_data
Definition simulate.h:164
Simulation offload struct.
Definition simulate.h:55
int disable_gcdiffccoll
Definition simulate.h:101
int fix_gyrodef_nstep
Definition simulate.h:76
B_field_offload_data B_offload_data
Definition simulate.h:57
real endcond_min_ekin
Definition simulate.h:112
real endcond_max_mileage
Definition simulate.h:108
plasma_offload_data plasma_offload_data
Definition simulate.h:59
int disable_pitchccoll
Definition simulate.h:99
real ada_tol_clmbcol
Definition simulate.h:82
neutral_offload_data neutral_offload_data
Definition simulate.h:60
mhd_offload_data mhd_offload_data
Definition simulate.h:63
int disable_gctransform
Definition simulate.h:95
real endcond_max_tororb
Definition simulate.h:115
asigma_offload_data asigma_offload_data
Definition simulate.h:64
boozer_offload_data boozer_offload_data
Definition simulate.h:62
wall_offload_data wall_offload_data
Definition simulate.h:61
real endcond_max_polorb
Definition simulate.h:116
real endcond_min_thermal
Definition simulate.h:113
real endcond_lim_simtime
Definition simulate.h:107
nbi_offload_data nbi_offload_data
Definition simulate.h:65
real ada_tol_orbfol
Definition simulate.h:80
E_field_offload_data E_offload_data
Definition simulate.h:58
real fix_usrdef_val
Definition simulate.h:75
int disable_energyccoll
Definition simulate.h:97
real endcond_max_cputime
Definition simulate.h:109
diag_offload_data diag_offload_data
Definition simulate.h:66
Wall model simulation data.
Definition wall.h:55
Wall model offload data.
Definition wall.h:38
Header file for wall.c.