|
ASCOT5
|
Header file for E_field.c. More...
#include "ascot5.h"#include "offload.h"#include "error.h"#include "B_field.h"#include "Efield/E_TC.h"#include "Efield/E_1DS.h"Go to the source code of this file.
Data Structures | |
| struct | E_field_data |
| Electric field simulation data. More... | |
Typedefs | |
| typedef enum E_field_type | E_field_type |
| Electric field types. | |
Enumerations | |
| enum | E_field_type { E_field_type_TC , E_field_type_1DS } |
| Electric field types. More... | |
Functions | |
| void | E_field_free (E_field_data *data) |
| Free allocated resources. | |
| void | E_field_offload (E_field_data *data) |
| Offload data to the accelerator. | |
| a5err | E_field_eval_E (real E[3], real r, real phi, real z, real t, E_field_data *Edata, B_field_data *Bdata) |
| Evaluate electric field. | |
Header file for E_field.c.
Contains a list declaring all E_field_types, and declaration of E_field_offload_data and E_field_data structs.
Definition in file E_field.h.
| typedef enum E_field_type E_field_type |
Electric field types.
Electric field types are used in the electric field interface (E_field.c) to direct function calls to correct electric field instances. Each electric field instance must have a corresponding type.
| enum E_field_type |
Electric field types.
Electric field types are used in the electric field interface (E_field.c) to direct function calls to correct electric field instances. Each electric field instance must have a corresponding type.
| Enumerator | |
|---|---|
| E_field_type_TC | Trivial Cartesian electric field |
| E_field_type_1DS | Spline-interpolated radial electric field |
| void E_field_free | ( | E_field_data * | data | ) |
| void E_field_offload | ( | E_field_data * | data | ) |
| a5err E_field_eval_E | ( | real | E[3], |
| real | r, | ||
| real | phi, | ||
| real | z, | ||
| real | t, | ||
| E_field_data * | Edata, | ||
| B_field_data * | Bdata ) |
Evaluate electric field.
This function evaluates the electric field at the given coordinates. Note that magnetic field data is also required in case electric field is e.g. a flux quantity.
The values are stored in the given array as:
This is a SIMD function.
| E | pointer to array where electric field values are stored |
| r | R coordinate [m] |
| phi | phi coordinate [deg] |
| z | z coordinate [m] |
| t | time coordinate [s] |
| Edata | pointer to electric field data struct |
| Bdata | pointer to magnetic field data struct |