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

Calculate a full orbit step for a struct of particles with VPA. More...

#include <math.h>
#include <stdio.h>
#include "../../offload_acc_omp.h"
#include "../../ascot5.h"
#include "../../consts.h"
#include "../../physlib.h"
#include "../../error.h"
#include "../../B_field.h"
#include "../../E_field.h"
#include "../../boozer.h"
#include "../../mhd.h"
#include "../../particle.h"
#include "step_fo_vpa.h"

Go to the source code of this file.

Functions

void step_fo_vpa (particle_simd_fo *p, real *h, B_field_data *Bdata, E_field_data *Edata)
 Integrate a full orbit step for a struct of particles with VPA.
 
void step_fo_vpa_mhd (particle_simd_fo *p, real *h, B_field_data *Bdata, E_field_data *Edata, boozer_data *boozer, mhd_data *mhd)
 Integrate a full orbit step with VPA and MHd modes present.
 

Detailed Description

Calculate a full orbit step for a struct of particles with VPA.

Definition in file step_fo_vpa.c.

Function Documentation

◆ step_fo_vpa()

void step_fo_vpa ( particle_simd_fo * p,
real * h,
B_field_data * Bdata,
E_field_data * Edata )

Integrate a full orbit step for a struct of particles with VPA.

The integration is performed for a struct of NSIMD particles using the volume preserving algorithm (Boris method for relativistic particles) see Zhang 2015.

This algorithm is valid for neutral particles as well, in which case the motion reduces to ballistic motion where momentum remains constant.

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

Definition at line 35 of file step_fo_vpa.c.

◆ step_fo_vpa_mhd()

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

Integrate a full orbit step with VPA and MHd modes present.

Same as previous method but with MHD present.

Parameters
pparticle_simd_fo 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 212 of file step_fo_vpa.c.