ASCOT5
|
Header file for simulate.c. More...
#include "ascot5.h"
#include "B_field.h"
#include "E_field.h"
#include "plasma.h"
#include "neutral.h"
#include "wall.h"
#include "boozer.h"
#include "mhd.h"
#include "asigma.h"
#include "nbi.h"
#include "diag.h"
#include "random.h"
#include "simulate/mccc/mccc.h"
Go to the source code of this file.
Data Structures | |
struct | sim_data |
Simulation data struct. More... | |
Enumerations | |
enum | SIMULATION_MODE { simulate_mode_fo = 1 , simulate_mode_gc = 2 , simulate_mode_hybrid = 3 , simulate_mode_ml = 4 } |
Simulaton modes. More... | |
Functions | |
void | simulate_init (sim_data *sim) |
Initialize simulation data struct. | |
void | simulate (int n_particles, particle_state *p, sim_data *sim) |
Execute marker simulation. | |
Header file for simulate.c.
Contains declarations of simulation_offload_data and simulation_data structs. Also simulation mode enums are declared here.
Definition in file simulate.h.
enum SIMULATION_MODE |
Simulaton modes.
These enums are used to determine which simulation mode will be executed.
Enumerator | |
---|---|
simulate_mode_fo | Models markers as particles using particle_simd_fo struct and simulate_fo_fixed.c simulation loop |
simulate_mode_gc | Models markers as guiding centers using particle_simd_gc struct and simulate_gc_fixed.c or simulate_gc_adaptive.c simulation loops |
simulate_mode_hybrid | Models markers first like using simulate_mode_gc. Additional end condition is used for markers that get close to wall. After all markers are finished, simulation for markers that were close to the wall is continued with using simulate_mode_fo mode |
simulate_mode_ml | Models markers as field lines using particle_simd_ml struct and simulate_ml_adaptive.c simulation loop |
Definition at line 30 of file simulate.h.
void simulate_init | ( | sim_data * | sim | ) |
Initialize simulation data struct.
sim | pointer to data struct |
Definition at line 306 of file simulate.c.
void simulate | ( | int | n_particles, |
particle_state * | p, | ||
sim_data * | sim ) |
Execute marker simulation.
This simulates markers using given inputs and options. All different types of simulations are initialized and run via this function.
This function proceeds as follows:
n_particles | total number of markers to be simulated |
p | pointer to array storing all marker states to be simulated |
sim_offload | pointer to simulation offload data |
offload_data | pointer to the rest of the offload data |
offload_array | pointer to input data offload array |
int_offload_array | pointer to input data int offload array |
diag_offload_array | pointer to diagnostics offload array |
Definition at line 83 of file simulate.c.