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 "../error.h"
10#include "../boozer.h"
11#include "../spline/interp.h"
12#include "../B_field.h"
13
32
57
59 real** offload_array);
60
62 real** offload_array);
63
64void mhd_stat_init(mhd_stat_data* mhdata, mhd_stat_offload_data* offload_data,
65 real* offload_array);
66DECLARE_TARGET_SIMD_UNIFORM(boozerdata, mhddata, includemode)
67a5err mhd_stat_eval(real mhd_dmhd[10], real r, real phi, real z, real t,
68 int includemode, boozer_data* boozerdata,
69 mhd_stat_data* mhddata, B_field_data* Bdata);
70DECLARE_TARGET_SIMD_UNIFORM(boozerdata, mhddata, Bdata, pertonly,\
71 includemode)
72a5err mhd_stat_perturbations(real pert_field[7], real r, real phi, real z,
73 real t, int pertonly, int includemode,
74 boozer_data* boozerdata,
75 mhd_stat_data* mhddata, B_field_data* Bdata);
76
77
78#endif
Header file for B_field.c.
Main header file for ASCOT5.
double real
Definition ascot5.h:85
#define MHD_MODES_MAX_NUM
Maximum number of MHD modes.
Definition ascot5.h:98
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_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:299
void mhd_stat_free_offload(mhd_stat_offload_data *offload_data, real **offload_array)
Free offload array.
Definition mhd_stat.c:100
void mhd_stat_init(mhd_stat_data *mhdata, mhd_stat_offload_data *offload_data, real *offload_array)
Initialize MHD data struct on target.
Definition mhd_stat.c:112
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:174
int mhd_stat_init_offload(mhd_stat_offload_data *offload_data, real **offload_array)
Load MHD data and prepare parameters for offload.
Definition mhd_stat.c:37
Magnetic field simulation data.
Definition B_field.h:63
Boozer parameters on the target.
Definition boozer.h:29
Cubic interpolation struct.
Definition interp.h:56
MHD stat parameters on the target.
Definition mhd_stat.h:36
MHD stat parameters that will be offloaded to target.
Definition mhd_stat.h:17