ASCOT5
|
Simulate guiding centers using adaptive time-step. More...
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <omp.h>
#include <math.h>
#include "../ascot5.h"
#include "../endcond.h"
#include "../consts.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 "../boozer.h"
#include "../mhd.h"
#include "../plasma.h"
#include "simulate_gc_adaptive.h"
#include "step/step_gc_cashkarp.h"
#include "mccc/mccc.h"
#include "mccc/mccc_wiener.h"
Go to the source code of this file.
Macros | |
#define | DUMMY_TIMESTEP_VAL 1.0 |
Functions | |
real | simulate_gc_adaptive_inidt (sim_data *sim, particle_simd_gc *p, int i) |
Calculates time step value. | |
void | simulate_gc_adaptive (particle_queue *pq, sim_data *sim) |
Simulates guiding centers using adaptive time-step. | |
Simulate guiding centers using adaptive time-step.
Definition in file simulate_gc_adaptive.c.
#define DUMMY_TIMESTEP_VAL 1.0 |
Dummy time step value
Definition at line 33 of file simulate_gc_adaptive.c.
real simulate_gc_adaptive_inidt | ( | sim_data * | sim, |
particle_simd_gc * | p, | ||
int | i ) |
Calculates time step value.
The returned time step is either directly user-defined, 1/100th of collision frequency or user-defined fraction of gyro-motion.
sim | pointer to simulation data struct |
p | SIMD array of markers |
i | index of marker for which time step is assessed |
Definition at line 280 of file simulate_gc_adaptive.c.
void simulate_gc_adaptive | ( | particle_queue * | pq, |
sim_data * | sim ) |
Simulates guiding centers using adaptive time-step.
The simulation includes:
The simulation is carried until all marker 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 adaptive time-step is determined by integrator error tolerances as well as user-defined limits for how much marker state can change during a single time-step.
pq | particles to be simulated |
sim | simulation data |
Definition at line 55 of file simulate_gc_adaptive.c.