ASCOT5
Loading...
Searching...
No Matches
mhd_nonstat.h
Go to the documentation of this file.
1
5#ifndef MHD_NONSTAT_H
6#define MHD_NONSTAT_H
7
8#include "../ascot5.h"
9#include "../offload.h"
10#include "../error.h"
11#include "../boozer.h"
12#include "../spline/interp.h"
13#include "../B_field.h"
14
37
38int mhd_nonstat_init(mhd_nonstat_data* data, int nmode, int nrho, int ntime,
39 real rhomin, real rhomax, real tmin, real tmax,
40 int* moden, int* modem, real* amplitude_nm,
41 real* omega_nm, real* phase_nm, real* alpha, real* phi);
44DECLARE_TARGET_SIMD_UNIFORM(boozerdata, mhddata, Bdata, includemode)
45a5err mhd_nonstat_eval(real mhd_dmhd[10], real r, real phi, real z, real t,
46 int includemode, boozer_data* boozerdata,
47 mhd_nonstat_data* mhddata, B_field_data* Bdata);
48DECLARE_TARGET_SIMD_UNIFORM(boozerdata, mhddata, Bdata, pertonly,\
49 includemode)
50a5err mhd_nonstat_perturbations(real pert_field[7], real r, real phi, real z,
51 real t, int pertonly, int includemode,
52 boozer_data* boozerdata,
53 mhd_nonstat_data* mhddata, B_field_data* Bdata);
54
55
56#endif
Header file for B_field.c.
Main header file for ASCOT5.
double real
Definition ascot5.h:85
Header file for boozer.c.
Error module for ASCOT5.
unsigned long int a5err
Simulation error flag.
Definition error.h:17
Spline interpolation library.
a5err mhd_nonstat_perturbations(real pert_field[7], real r, real phi, real z, real t, int pertonly, int includemode, boozer_data *boozerdata, mhd_nonstat_data *mhddata, B_field_data *Bdata)
Evaluate mhd perturbed fields Btilde, Etilde and potential Phi for full orbit.
void mhd_nonstat_free(mhd_nonstat_data *data)
Free allocated resources.
Definition mhd_nonstat.c:86
void mhd_nonstat_offload(mhd_nonstat_data *data)
Offload data to the accelerator.
int mhd_nonstat_init(mhd_nonstat_data *data, int nmode, int nrho, int ntime, real rhomin, real rhomax, real tmin, real tmax, int *moden, int *modem, real *amplitude_nm, real *omega_nm, real *phase_nm, real *alpha, real *phi)
Load MHD data.
Definition mhd_nonstat.c:23
a5err mhd_nonstat_eval(real mhd_dmhd[10], real r, real phi, real z, real t, int includemode, boozer_data *boozerdata, mhd_nonstat_data *mhddata, B_field_data *Bdata)
Evaluate the needed quantities from MHD mode for orbit following.
Magnetic field simulation data.
Definition B_field.h:41
Data for mapping between the cylindrical and Boozer coordinates.
Definition boozer.h:16
Bicubic interpolation struct.
Definition interp.h:68
MHD parameters.
Definition mhd_nonstat.h:18
interp2D_data * phi_nm
2D splines (rho,time) for each mode's electric eigenfunction
Definition mhd_nonstat.h:35
interp2D_data * alpha_nm
2D splines (rho,time) for each mode's magnetic eigenfunction
Definition mhd_nonstat.h:31