ASCOT5
|
Simulate particles using fixed time-step. More...
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <omp.h>
#include <math.h>
#include "../ascot5.h"
#include "../physlib.h"
#include "../simulate.h"
#include "../particle.h"
#include "../wall.h"
#include "../diag.h"
#include "../B_field.h"
#include "../E_field.h"
#include "../plasma.h"
#include "../endcond.h"
#include "../consts.h"
#include "../copytogpu.h"
#include "simulate_fo_fixed.h"
#include "step/step_fo_vpa.h"
#include "mccc/mccc.h"
#include "atomic.h"
Go to the source code of this file.
Functions | |
real | simulate_fo_fixed_inidt (sim_data *sim, particle_simd_fo *p, int i) |
Calculates time step value. | |
void | simulate_fo_fixed (particle_queue *pq, sim_data *sim, int mrk_array_size) |
Simulates particles using fixed time-step. | |
Simulate particles using fixed time-step.
Definition in file simulate_fo_fixed.c.
real simulate_fo_fixed_inidt | ( | sim_data * | sim, |
particle_simd_fo * | p, | ||
int | i ) |
Calculates time step value.
The time step is calculated as a user-defined fraction of gyro time, whose formula accounts for relativity, or an user defined value is used as is depending on simulation options.
sim | pointer to simulation data struct |
p | SIMD array of markers |
i | index of marker for which time step is assessed |
Definition at line 233 of file simulate_fo_fixed.c.
void simulate_fo_fixed | ( | particle_queue * | pq, |
sim_data * | sim, | ||
int | mrk_array_size ) |
Simulates particles using fixed time-step.
The simulation includes:
The simulation is carried until all markers have met some end condition or are aborted/rejected. The final state of the markers is stored in the given marker array. Other output is stored in the diagnostic array.
The time-step is user-defined: either a directly given fixed value or a given fraction of gyrotime.
pq | particles to be simulated |
sim | simulation data struct |
mrk_array_size | size of particle arrays |
Definition at line 50 of file simulate_fo_fixed.c.