ASCOT5
Loading...
Searching...
No Matches
plasma_1DS.h File Reference

Header file for plasma_1DS.c. More...

#include "../ascot5.h"
#include "../offload.h"
#include "../error.h"
#include "../spline/interp.h"

Go to the source code of this file.

Data Structures

struct  plasma_1DS_data
 1D spline plasma parameters on the target More...
 

Functions

int plasma_1DS_init (plasma_1DS_data *data, int nrho, real rhomin, real rhomax, int nion, int *anum, int *znum, real *mass, real *charge, real *Te, real *Ti, real *ne, real *ni)
 Initialize 1DS plasma data and check inputs.
 
void plasma_1DS_free (plasma_1DS_data *data)
 Free allocated resources.
 
void plasma_1DS_offload (plasma_1DS_data *data)
 Offload data to the accelerator.
 
a5err plasma_1DS_eval_temp (real *temp, real rho, int species, plasma_1DS_data *pls_data)
 Evaluate plasma temperature.
 
DECLARE_TARGET_END a5err plasma_1DS_eval_dens (real *dens, real rho, int species, plasma_1DS_data *pls_data)
 Evaluate plasma density.
 
DECLARE_TARGET_END a5err plasma_1DS_eval_densandtemp (real *dens, real *temp, real rho, plasma_1DS_data *pls_data)
 Evaluate plasma density and temperature for all species.
 

Detailed Description

Header file for plasma_1DS.c.

Definition in file plasma_1DS.h.

Function Documentation

◆ plasma_1DS_init()

int plasma_1DS_init ( plasma_1DS_data * data,
int nrho,
real rhomin,
real rhomax,
int nion,
int * anum,
int * znum,
real * mass,
real * charge,
real * Te,
real * Ti,
real * ne,
real * ni )

Initialize 1DS plasma data and check inputs.

Parameters
datapointer to the data struct
Returns
zero if initialization succeeded

Definition at line 43 of file plasma_1DS.c.

◆ plasma_1DS_free()

void plasma_1DS_free ( plasma_1DS_data * data)

Free allocated resources.

Parameters
datapointer to the data struct

Definition at line 189 of file plasma_1DS.c.

◆ plasma_1DS_offload()

void plasma_1DS_offload ( plasma_1DS_data * data)

Offload data to the accelerator.

Parameters
datapointer to the data struct

Definition at line 205 of file plasma_1DS.c.

◆ plasma_1DS_eval_temp()

a5err plasma_1DS_eval_temp ( real * temp,
real rho,
int species,
plasma_1DS_data * plasma_data )

Evaluate plasma temperature.

Parameters
temptemperature value will be stored in temp[0]
rhoradial coordinate
speciesindex of plasma species
plasma_datapointer to plasma data struct
Returns
zero if evaluation succeeded

Definition at line 228 of file plasma_1DS.c.

◆ plasma_1DS_eval_dens()

DECLARE_TARGET_END a5err plasma_1DS_eval_dens ( real * dens,
real rho,
int species,
plasma_1DS_data * plasma_data )

Evaluate plasma density.

Parameters
densdensity value will be stored in dens[0]
rhoradial coordinate
speciesindex of plasma species
plasma_datapointer to plasma data struct
Returns
zero if evaluation succeeded

Definition at line 259 of file plasma_1DS.c.

◆ plasma_1DS_eval_densandtemp()

DECLARE_TARGET_END a5err plasma_1DS_eval_densandtemp ( real * dens,
real * temp,
real rho,
plasma_1DS_data * plasma_data )

Evaluate plasma density and temperature for all species.

This function evaluates the density and temperature of all plasma species at the given radial coordinate using spline interpolation.

Parameters
denspointer to where interpolated densities [m^-3] are stored
temppointer to where interpolated temperatures [J] are stored
rhoradial coordinate
plasma_datapointer to plasma data struct
Returns
zero if evaluation succeeded

Definition at line 294 of file plasma_1DS.c.