ASCOT5
Loading...
Searching...
No Matches
diag_transcoef.c File Reference

Transport coefficient diagnostics. More...

#include <math.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include "../ascot5.h"
#include "../consts.h"
#include "../simulate.h"
#include "../particle.h"
#include "diag_transcoef.h"

Go to the source code of this file.

Functions

DECLARE_TARGET_SIMD real diag_transcoef_check_omp_crossing (real fang, real iang)
 Check if marker has crossed omp.
 
void diag_transcoef_record (diag_transcoef_data *data, integer index, integer id, real rho, real r, real pitchsign, real t_f, real t_i, real theta_f, real theta_i)
 Check if criteria for recording is met for a single marker and make the record.
 
void diag_transcoef_process_and_clean (diag_transcoef_data *data, integer index, integer id)
 Process recorded data to transport coefficients and clean.
 
void diag_transcoef_init (diag_transcoef_data *data)
 Initializes transport coefficient diagnostics data.
 
void diag_transcoef_free (diag_transcoef_data *data)
 Free allocated resources.
 
void diag_transcoef_update_fo (diag_transcoef_data *data, particle_simd_fo *p_f, particle_simd_fo *p_i)
 Collect transport diagnostics for fo simulation.
 
void diag_transcoef_update_gc (diag_transcoef_data *data, particle_simd_gc *p_f, particle_simd_gc *p_i)
 Collect transport diagnostics for gc simulation.
 
void diag_transcoef_update_ml (diag_transcoef_data *data, particle_simd_ml *p_f, particle_simd_ml *p_i)
 Collect transport diagnostics for ml simulation.
 

Detailed Description

Transport coefficient diagnostics.

Definition in file diag_transcoef.c.

Function Documentation

◆ diag_transcoef_check_omp_crossing()

real diag_transcoef_check_omp_crossing ( real fang,
real iang )

Check if marker has crossed omp.

Parameters
fangmarker final poloidal angle in radians.
iangmarker initial poloidal angle in radians.
Returns
zero if no-crossing, number k, k = (iang - fang), otherwise.

Definition at line 342 of file diag_transcoef.c.

◆ diag_transcoef_record()

void diag_transcoef_record ( diag_transcoef_data * data,
integer index,
integer id,
real rho,
real r,
real pitchsign,
real t_f,
real t_i,
real theta_f,
real theta_i )

Check if criteria for recording is met for a single marker and make the record.

Parameters
datapointer to transport coefficient data
indexmarker index in the marker queue
idmarker id
rhomarker rho coordinate to be recorded
rmarker R coordinate to be recorded
pitchsignsign of the marker's pitch
t_ftime (mileage) at the end of the time step
t_itime (mileage) at the beginning of the time step
theta_fpoloidal angle at the end of the time step
theta_ipoloidal angle at the beginning of the time step

Definition at line 166 of file diag_transcoef.c.

◆ diag_transcoef_process_and_clean()

void diag_transcoef_process_and_clean ( diag_transcoef_data * data,
integer index,
integer id )

Process recorded data to transport coefficients and clean.

This function is called when marker simulation has ended

Parameters
datapointer to transport coefficient data
indexmarker index in the marker queue
idmarker id

Definition at line 225 of file diag_transcoef.c.

◆ diag_transcoef_init()

void diag_transcoef_init ( diag_transcoef_data * data)

Initializes transport coefficient diagnostics data.

Parameters
datatransport coefficient diagnostics data struct

Definition at line 30 of file diag_transcoef.c.

◆ diag_transcoef_free()

void diag_transcoef_free ( diag_transcoef_data * data)

Free allocated resources.

Parameters
datatransport coefficient diagnostics data struct

Definition at line 47 of file diag_transcoef.c.

◆ diag_transcoef_update_fo()

void diag_transcoef_update_fo ( diag_transcoef_data * data,
particle_simd_fo * p_f,
particle_simd_fo * p_i )

Collect transport diagnostics for fo simulation.

Parameters
datatransport diagnostics data struct
p_fpointer to SIMD struct storing marker states at the end of current time-step
p_ipointer to SIMD struct storing marker states at the beginning of current time-step

Definition at line 63 of file diag_transcoef.c.

◆ diag_transcoef_update_gc()

void diag_transcoef_update_gc ( diag_transcoef_data * data,
particle_simd_gc * p_f,
particle_simd_gc * p_i )

Collect transport diagnostics for gc simulation.

Parameters
datatransport diagnostics data struct
p_fpointer to SIMD struct storing marker states at the end of current time-step
p_ipointer to SIMD struct storing marker states at the beginning of current time-step

Definition at line 96 of file diag_transcoef.c.

◆ diag_transcoef_update_ml()

void diag_transcoef_update_ml ( diag_transcoef_data * data,
particle_simd_ml * p_f,
particle_simd_ml * p_i )

Collect transport diagnostics for ml simulation.

Parameters
datatransport diagnostics data struct
p_fpointer to SIMD struct storing marker states at the end of current time-step
p_ipointer to SIMD struct storing marker states at the beginning of current time-step

Definition at line 128 of file diag_transcoef.c.