ASCOT5
Loading...
Searching...
No Matches
Functions
step_gc_rk4.c File Reference

Guiding center integration with RK4. More...

#include <stdio.h>
#include <math.h>
#include "../../ascot5.h"
#include "../../consts.h"
#include "../../B_field.h"
#include "../../E_field.h"
#include "../../boozer.h"
#include "../../mhd.h"
#include "../../particle.h"
#include "../../error.h"
#include "step_gceom.h"
#include "step_gceom_mhd.h"
#include "step_gc_rk4.h"

Go to the source code of this file.

Functions

void step_gc_rk4 (particle_simd_gc *p, real *h, B_field_data *Bdata, E_field_data *Edata)
 Integrate a guiding center step for a struct of markers with RK4.
 
void step_gc_rk4_mhd (particle_simd_gc *p, real *h, B_field_data *Bdata, E_field_data *Edata, boozer_data *boozer, mhd_data *mhd)
 Integrate a guiding center step with RK4 with MHD modes present.
 

Detailed Description

Guiding center integration with RK4.

Definition in file step_gc_rk4.c.

Function Documentation

◆ step_gc_rk4()

void step_gc_rk4 ( particle_simd_gc * p,
real * h,
B_field_data * Bdata,
E_field_data * Edata )

Integrate a guiding center step for a struct of markers with RK4.

This function calculates a guiding center step for a struct of NSIMD markers with RK4 simultaneously using SIMD instructions. All arrays in the function are of NSIMD length so vectorization can be performed directly without gather and scatter operations.

Parameters
psimd_gc struct that will be updated
hpointer to array containing time steps
Bdatapointer to magnetic field data
Edatapointer to electric field data

Definition at line 33 of file step_gc_rk4.c.

◆ step_gc_rk4_mhd()

void step_gc_rk4_mhd ( particle_simd_gc * p,
real * h,
B_field_data * Bdata,
E_field_data * Edata,
boozer_data * boozer,
mhd_data * mhd )

Integrate a guiding center step with RK4 with MHD modes present.

Same as previous function but with MHD present

Parameters
psimd_gc struct that will be updated
hpointer to array containing time steps
Bdatapointer to magnetic field data
Edatapointer to electric field data
boozerpointer to boozer data
mhdpointer to MHD data

Definition at line 230 of file step_gc_rk4.c.