ASCOT5
Loading...
Searching...
No Matches
Functions
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, diag_transcoef_offload_data *offload_data, real *offload_array)
 Initializes orbit diagnostics offload data.
 
void diag_transcoef_free (diag_transcoef_data *data)
 Free transport coefficient data on target.
 
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 348 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 172 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 231 of file diag_transcoef.c.

◆ diag_transcoef_init()

void diag_transcoef_init ( diag_transcoef_data * data,
diag_transcoef_offload_data * offload_data,
real * offload_array )

Initializes orbit diagnostics offload data.

Parameters
datatransport coefficient diagnostics data struct
offload_datatransport coefficient diagnostics offload data struct
offload_arrayoffload data array

Definition at line 32 of file diag_transcoef.c.

◆ diag_transcoef_free()

void diag_transcoef_free ( diag_transcoef_data * data)

Free transport coefficient data on target.

Parameters
datatransport coefficient diagnostics data struct

Definition at line 56 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 69 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 102 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 134 of file diag_transcoef.c.