Header file for plasma.c.
More...
Go to the source code of this file.
|
|
typedef enum plasma_type | plasma_type |
| | Plasma data types.
|
| |
|
| void | plasma_free (plasma_data *data) |
| | Free allocated resources.
|
| |
| void | plasma_offload (plasma_data *data) |
| | Offload data to the accelerator.
|
| |
| a5err | plasma_eval_temp (real *temp, real rho, real r, real phi, real z, real t, int species, plasma_data *pls_data) |
| | Evaluate plasma temperature.
|
| |
| DECLARE_TARGET_END a5err | plasma_eval_dens (real *dens, real rho, real r, real phi, real z, real t, int species, plasma_data *pls_data) |
| | Evaluate plasma density.
|
| |
| DECLARE_TARGET_END a5err | plasma_eval_densandtemp (real *dens, real *temp, real rho, real r, real phi, real z, real t, plasma_data *pls_data) |
| | Evaluate plasma density and temperature for all species.
|
| |
| DECLARE_TARGET_END a5err | plasma_eval_flow (real *vflow, real rho, real r, real phi, real z, real t, plasma_data *pls_data) |
| | Evalate plasma flow along the field lines.
|
| |
| DECLARE_TARGET_END int | plasma_get_n_species (plasma_data *pls_data) |
| | Get the number of plasma species.
|
| |
| DECLARE_TARGET_END const real * | plasma_get_species_mass (plasma_data *pls_data) |
| | Get mass of all plasma species.
|
| |
| DECLARE_TARGET_END const real * | plasma_get_species_charge (plasma_data *pls_data) |
| | Get charge of all plasma species.
|
| |
| DECLARE_TARGET_END const int * | plasma_get_species_znum (plasma_data *pls_data) |
| | Get charge number of ion species.
|
| |
| DECLARE_TARGET_END const int * | plasma_get_species_anum (plasma_data *pls_data) |
| | Get atomic mass number of ion species.
|
| |
Header file for plasma.c.
Contains a list declaring all plasma data, and declaration of plasma_offload_data and plasma_data structs.
Definition in file plasma.h.
◆ plasma_type
Plasma data types.
| Enumerator |
|---|
| plasma_type_1D | Linear-interpolated 1D plasma data
|
| plasma_type_1Dt | Linear-interpolated time-dependent 1D plasma data
|
| plasma_type_1DS | Spline-interpolated 1D plasma data
|
Definition at line 20 of file plasma.h.
◆ plasma_free()
Free allocated resources.
- Parameters
-
| data | pointer to the data struct |
Definition at line 38 of file plasma.c.
◆ plasma_offload()
Offload data to the accelerator.
- Parameters
-
| data | pointer to the data struct |
Definition at line 57 of file plasma.c.
◆ plasma_eval_temp()
Evaluate plasma temperature.
This function evaluates the temperature of a given plasma species at the given position.
This is a SIMD function.
- Parameters
-
| temp | array where evaluated temperature [J] is stored |
| rho | normalized poloidal flux coordinate |
| r | R-coordinate [m] |
| phi | phi-coordinate [rad] |
| z | z-coordinate [m] |
| t | time coordinate [s] |
| species | index of plasma species, 1 refers to electrons |
| pls_data | pointer to plasma data struct |
- Returns
- Non-zero a5err value if evaluation failed, zero otherwise
Definition at line 90 of file plasma.c.
◆ plasma_eval_dens()
Evaluate plasma density.
This function evaluates the density of a plasma species at the given radial coordinate.
This is a SIMD function.
- Parameters
-
| dens | array where evaluated density will be stored |
| rho | normalized poloidal flux coordinate |
| r | R-coordinate [m] |
| phi | phi-coordinate [rad] |
| z | z-coordinate [m] |
| t | time coordinate [s] |
| species | index of plasma species, 1 refers to electrons |
| pls_data | pointer to plasma data struct |
- Returns
- Non-zero a5err value if evaluation failed, zero otherwise
Definition at line 138 of file plasma.c.
◆ plasma_eval_densandtemp()
Evaluate plasma density and temperature for all species.
This function evaluates the density and temperature of all plasma species at the given radial coordinate.
This is a SIMD function.
- Parameters
-
| dens | pointer where density [m^-3] will be stored |
| temp | pointer where temperature [J] will be stored |
| rho | normalized poloidal flux coordinate |
| r | R-coordinate [m] |
| phi | phi-coordinate [rad] |
| z | z-coordinate [m] |
| t | time coordinate [s] |
| pls_data | pointer to plasma data struct |
- Returns
- Non-zero a5err value if evaluation failed, zero otherwise
Definition at line 186 of file plasma.c.
◆ plasma_eval_flow()
Evalate plasma flow along the field lines.
- Parameters
-
| vflow | pointer where the flow value is stored [m/s] |
| rho | particle rho coordinate [1] |
| r | particle R coordinate [m] |
| phi | particle toroidal coordinate [rad] |
| z | particle z coordinate [m] |
| t | particle time coordinate [s] |
| pls_data | pointer to plasma data |
Definition at line 236 of file plasma.c.
◆ plasma_get_n_species()
| DECLARE_TARGET_END int plasma_get_n_species |
( |
plasma_data * | pls_data | ) |
|
Get the number of plasma species.
Retrieve the number of how many plasma species the data contains. The number includes electrons.
This is a SIMD function.
- Parameters
-
| pls_data | pointer to plasma data struct |
- Returns
- The number of plasma species
Definition at line 284 of file plasma.c.
◆ plasma_get_species_mass()
| DECLARE_TARGET_END const real * plasma_get_species_mass |
( |
plasma_data * | pls_data | ) |
|
Get mass of all plasma species.
Retrieve species' mass.
This is a SIMD function.
- Parameters
-
| pls_data | pointer to plasma data struct |
- Returns
- Pointer to array containing the requested mass values [kg]
Definition at line 314 of file plasma.c.
◆ plasma_get_species_charge()
| DECLARE_TARGET_END const real * plasma_get_species_charge |
( |
plasma_data * | pls_data | ) |
|
Get charge of all plasma species.
Retrieve species' charge.
This is a SIMD function.
- Parameters
-
| pls_data | pointer to plasma data struct |
- Returns
- Pointer to array containing the requested charge values [C]
Definition at line 344 of file plasma.c.
◆ plasma_get_species_znum()
| DECLARE_TARGET_END const int * plasma_get_species_znum |
( |
plasma_data * | pls_data | ) |
|
Get charge number of ion species.
This is a SIMD function.
- Parameters
-
| pls_data | pointer to plasma data struct |
- Returns
- Pointer to array containing the charge numbers
Definition at line 372 of file plasma.c.
◆ plasma_get_species_anum()
| DECLARE_TARGET_END const int * plasma_get_species_anum |
( |
plasma_data * | pls_data | ) |
|
Get atomic mass number of ion species.
This is a SIMD function.
- Parameters
-
| pls_data | pointer to plasma data struct |
- Returns
- Pointer to array containing the atomic mass numbers
Definition at line 400 of file plasma.c.