ASCOT5
Loading...
Searching...
No Matches
mhd_stat.h
Go to the documentation of this file.
1
5#ifndef MHD_STAT_H
6#define MHD_STAT_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
38
39int mhd_stat_init(mhd_stat_data* data, int nmode, int nrho,
40 real rhomin, real rhomax, int* moden, int* modem,
41 real* amplitude_nm, real* omega_nm, real* phase_nm,
42 real* alpha, real* phi);
45DECLARE_TARGET_SIMD_UNIFORM(boozerdata, mhddata, includemode)
47 real mhd_dmhd[10], real r, real phi, real z, real t, int includemode,
48 boozer_data* boozerdata, mhd_stat_data* mhddata, B_field_data* Bdata);
49DECLARE_TARGET_SIMD_UNIFORM(boozerdata, mhddata, Bdata, pertonly, includemode)
51 real pert_field[7], real r, real phi, real z, real t, int pertonly,
52 int includemode, boozer_data* boozerdata, mhd_stat_data* mhddata,
53 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.
void mhd_stat_offload(mhd_stat_data *data)
Offload data to the accelerator.
Definition mhd_stat.c:99
a5err mhd_stat_perturbations(real pert_field[7], real r, real phi, real z, real t, int pertonly, int includemode, boozer_data *boozerdata, mhd_stat_data *mhddata, B_field_data *Bdata)
Evaluate perturbed fields Btilde, Etilde and potential Phi explicitly.
Definition mhd_stat.c:258
int mhd_stat_init(mhd_stat_data *data, int nmode, int nrho, real rhomin, real rhomax, int *moden, int *modem, real *amplitude_nm, real *omega_nm, real *phase_nm, real *alpha, real *phi)
Load MHD data.
Definition mhd_stat.c:23
a5err mhd_stat_eval(real mhd_dmhd[10], real r, real phi, real z, real t, int includemode, boozer_data *boozerdata, mhd_stat_data *mhddata, B_field_data *Bdata)
Evaluate the needed quantities from MHD mode for orbit following.
Definition mhd_stat.c:133
void mhd_stat_free(mhd_stat_data *data)
Free allocated resources.
Definition mhd_stat.c:82
Magnetic field simulation data.
Definition B_field.h:41
Data for mapping between the cylindrical and Boozer coordinates.
Definition boozer.h:16
Cubic interpolation struct.
Definition interp.h:56
MHD stat parameters on the target.
Definition mhd_stat.h:18
real * omega_nm
Definition mhd_stat.h:25
interp1D_data * alpha_nm
1D splines (rho) for each mode's magnetic eigenfunction
Definition mhd_stat.h:31
real * phase_nm
Definition mhd_stat.h:26
interp1D_data * phi_nm
1D splines (rho) for each mode's electric eigenfunction
Definition mhd_stat.h:36
real * amplitude_nm
Definition mhd_stat.h:24
int * mmode
Definition mhd_stat.h:23
int * nmode
Definition mhd_stat.h:22