#include "t_coeff_mod_macro.h"
Macros | |
#define | OMP_ATOMIC |
Functions/Subroutines | |
subroutine | chargee (grid, psn, sp) |
Driver routine for electron charge deposition on CPU Calls several subroutines (search, weight update, scatter...). More... | |
subroutine | chargee_scatter (grid, psn, sp) |
Electron scatter operation Evaluates raw electron density and paralel flow/current. This routine does not gather the density and flow data from all MPI ranks on a poloidal plane. This is done in chargee_mpi_sum. More... | |
subroutine | update_elec_weight (grid, psn, sp) |
Update electron weight from change of background distribution function along the collisionless particle trajectory. More... | |
subroutine | chargee_search_index (grid, psn, sp) |
Electron particle search routine. Loops over particles to identify in which triangle of the mesh they are. More... | |
subroutine | chargee_mpisum (grid, psn) |
Gathers data from the electron scatter operation to obtain the electron density/flow on a full poloidal plane. More... | |
subroutine | init_ff (grid, psn) |
Initialize the field-aligned mapping between adjacent planes. The routine traces magnetic field lines from each vertex of a plane in both toroidal directions to the adjacent mid-planes and full-step planes, records the triangle in which the field line intersects these planes and the corresponding interpolation weights. More... | |
subroutine | cnvt_grid_ff2real (grid, tr, p, var_ff, var_real) |
Coordinate conversion from field following representation (two points on adjacent planes connected by a magnetic field line have the same radial-poloidal array index) to real space representation (points with the same R-Z coordinates have the same radial poloidal array index). More... | |
subroutine | cnvt_grid_real2ff (grid, tr, p, var_real, var_ff) |
Coordinate conversion from real space representation (points with the same R-Z coordinates have the same radial poloidal array index) to field following representation (two points on adjacent planes connected by a magnetic field line have the same radial-poloidal array index). More... | |
subroutine | bfollow_test (xp, xm, grid) |
Test of the quality of the field-alignment of the mesh (?]. More... | |
subroutine | field_following_pos (x_org, phi, dir, w, delta_phi, x_dest) |
Project the input (R,phi,Z) coordinates along the magnetic field to a different toroidal angle. High-level routine. More... | |
subroutine | field_following_pos2 (x_org, phi_org, phi_dest, x_dest) |
Project the input (R,phi,Z) coordinates along the magnetic field to a different toroidal angle. High-level routine. More... | |
subroutine | derivs (x, phi, dx) |
subroutine | chargei (grid, psn, spall) |
Driver routine for ion charge deposition on CPU Calls several subroutines (search, weight update, scatter...). More... | |
subroutine | update_ion_weight (grid, sp) |
Update ion weight from change of background distribution function along the collisionless particle trajectory. More... | |
subroutine | chargei_scatter (grid, psn, sp) |
Ion scatter operation (gyroaverage-aware) Evaluates raw ion density and paralel flow/current. This routine does not gather the density and flow data from all MPI ranks on a poloidal plane. This is done in chargei_gyroavg. More... | |
subroutine | chargei_search_index (grid, psn, sp) |
Ion particle search routine. Loops over particles to identify in which triangle of the mesh they are. More... | |
subroutine | chargei_gyro_average (grid, psn) |
Gathers data from the ion scatter operation to obtain the electron density/flow on a full poloidal plane. This routine also includes the gyroaverage. More... | |
subroutine | chargei_f0 (grid, psn) |
Calculation of the contribution of the 5D grid distribution function to the ion density. This must be called after calling update_f0_sp. The ion version of this routine is gyroaverage-aware. More... | |
subroutine | chargee_f0 (grid, psn) |
Calculation of the contribution of the 5D grid distribution function to the electron density. This must be called after calling update_f0_sp. More... | |
#define OMP_ATOMIC |
subroutine bfollow_test | ( | real (kind=8), dimension(2,grid%nnode) | xp, |
real (kind=8), dimension(2,grid%nnode) | xm, | ||
type(grid_type) | grid | ||
) |
Test of the quality of the field-alignment of the mesh (?].
[in] | grid | XGC grid data object, type(grid_type) |
[in] | xp | (R,Z) coordinates on right plane (?], real(8) |
[in] | xm | (R,Z) coordinates on left plane (?], real(8) |
subroutine chargee | ( | type(grid_type), intent(in) | grid, |
type(psn_type), intent(inout) | psn, | ||
type(species_type), intent(inout) | sp | ||
) |
Driver routine for electron charge deposition on CPU Calls several subroutines (search, weight update, scatter...).
[in] | grid | XGC grid object, type(grid_type) |
[in,out] | psn | XGC field data object, type(psn_type) |
[in,out] | sp | Species particle data object, type(species_type) |
subroutine chargee_f0 | ( | type(grid_type) | grid, |
type(psn_type) | psn | ||
) |
Calculation of the contribution of the 5D grid distribution function to the electron density. This must be called after calling update_f0_sp.
[in] | grid | XGC grid object, type(grid_type) |
[in,out] | psn | XGC field data object, type(psn_type) |
subroutine chargee_mpisum | ( | type(grid_type) | grid, |
type(psn_type) | psn | ||
) |
Gathers data from the electron scatter operation to obtain the electron density/flow on a full poloidal plane.
[in] | grid | XGC grid object, type(grid_type) |
[in,out] | psn | XGC field data object, type(psn_type) |
subroutine chargee_scatter | ( | type(grid_type), intent(in) | grid, |
type(psn_type), intent(inout) | psn, | ||
type(species_type), intent(inout) | sp | ||
) |
Electron scatter operation Evaluates raw electron density and paralel flow/current. This routine does not gather the density and flow data from all MPI ranks on a poloidal plane. This is done in chargee_mpi_sum.
[in] | grid | XGC grid object, type(grid_type) |
[in,out] | psn | XGC field data object, type(psn_type) |
[in,out] | sp | Species particle data object, type(species_type) |
subroutine chargee_search_index | ( | type(grid_type) | grid, |
type(psn_type), intent(inout) | psn, | ||
type(species_type) | sp | ||
) |
Electron particle search routine. Loops over particles to identify in which triangle of the mesh they are.
[in] | grid | XGC grid object, type(grid_type) |
[in,out] | psn | XGC field data object, type(psn_type) |
[in,out] | sp | Species particle data object, type(species_type) |
subroutine chargei | ( | type(grid_type), intent(in) | grid, |
type(psn_type), intent(inout) | psn, | ||
type(species_type), dimension(0:ptl_nsp_max), intent(inout) | spall | ||
) |
Driver routine for ion charge deposition on CPU Calls several subroutines (search, weight update, scatter...).
[in] | grid | XGC grid object, type(grid_type) |
[in,out] | psn | XGC field data object, type(psn_type) |
[in,out] | sp | Species particle data object, type(species_type) |
subroutine chargei_f0 | ( | type(grid_type), intent(in) | grid, |
type(psn_type), intent(inout) | psn | ||
) |
Calculation of the contribution of the 5D grid distribution function to the ion density. This must be called after calling update_f0_sp. The ion version of this routine is gyroaverage-aware.
[in] | grid | XGC grid object, type(grid_type) |
[in,out] | psn | XGC field data object, type(psn_type) |
subroutine chargei_gyro_average | ( | type(grid_type), intent(in) | grid, |
type(psn_type), intent(inout) | psn | ||
) |
Gathers data from the ion scatter operation to obtain the electron density/flow on a full poloidal plane. This routine also includes the gyroaverage.
[in] | grid | XGC grid object, type(grid_type) |
[in,out] | psn | XGC field data object, type(psn_type) |
subroutine chargei_scatter | ( | type(grid_type), intent(in) | grid, |
type(psn_type), intent(inout) | psn, | ||
type(species_type) | sp | ||
) |
Ion scatter operation (gyroaverage-aware) Evaluates raw ion density and paralel flow/current. This routine does not gather the density and flow data from all MPI ranks on a poloidal plane. This is done in chargei_gyroavg.
[in] | grid | XGC grid object, type(grid_type) |
[in,out] | psn | XGC field data object, type(psn_type) |
[in,out] | sp | Species particle data object, type(species_type) |
subroutine chargei_search_index | ( | type(grid_type), intent(in) | grid, |
type(psn_type), intent(inout) | psn, | ||
type(species_type), intent(inout) | sp | ||
) |
Ion particle search routine. Loops over particles to identify in which triangle of the mesh they are.
[in] | grid | XGC grid object, type(grid_type) |
[in,out] | psn | XGC field data object, type(psn_type) |
[in,out] | sp | Species particle data object, type(species_type) |
subroutine cnvt_grid_ff2real | ( | type(grid_type), intent(in) | grid, |
integer, dimension(grid%nnode,0:1), intent(in) | tr, | ||
real (8), dimension(3,grid%nnode,0:1), intent(in) | p, | ||
real (8), dimension(grid%nnode,0:1), intent(in) | var_ff, | ||
real (8), dimension(grid%nnode,0:1), intent(out) | var_real | ||
) |
Coordinate conversion from field following representation (two points on adjacent planes connected by a magnetic field line have the same radial-poloidal array index) to real space representation (points with the same R-Z coordinates have the same radial poloidal array index).
[in] | grid | XGC grid data object, type(grid_type) |
[in] | tr | Triangle indices for transformation, integer |
[in] | p | Interpolation weights corresponding to the triangle indices, real(8) |
[in] | var_ff | Input data in field-aligned representation, real(8) |
[out] | var_real | Output data in real-space representation |
subroutine cnvt_grid_real2ff | ( | type(grid_type), intent(in) | grid, |
integer, dimension(grid%nnode,0:1), intent(in) | tr, | ||
real (8), dimension(3,grid%nnode,0:1), intent(in) | p, | ||
real (8), dimension(grid%nnode,0:1), intent(in) | var_real, | ||
real (8), dimension(grid%nnode,0:1), intent(out) | var_ff | ||
) |
Coordinate conversion from real space representation (points with the same R-Z coordinates have the same radial poloidal array index) to field following representation (two points on adjacent planes connected by a magnetic field line have the same radial-poloidal array index).
[in] | grid | XGC grid data object, type(grid_type) |
[in] | tr | Triangle indices for transformation, integer |
[in] | p | Interpolation weights corresponding to the triangle indices, real(8) |
[out] | var_ff | Output data in field-aligned representation, real(8) |
[in] | var_real | Input data in real-space representation |
subroutine field_following_pos2::derivs | ( | real (8), dimension(2), intent(in) | x, |
real (8), intent(in) | phi, | ||
real (8), dimension(2), intent(out) | dx | ||
) |
subroutine field_following_pos | ( | real (kind=8), dimension(2), intent(in) | x_org, |
real (kind=8), intent(in) | phi, | ||
integer, intent(in) | dir, | ||
real (kind=8), intent(in) | w, | ||
real (kind=8), intent(in) | delta_phi, | ||
real (kind=8), dimension(2), intent(out) | x_dest | ||
) |
Project the input (R,phi,Z) coordinates along the magnetic field to a different toroidal angle. High-level routine.
[in] | x_org | Input (R,Z) coordinates, real(8) |
[in] | phi | Input toroidal angle phi, real(8) |
[in] | dir | Direction of the projection, (1) clockwise looking from above, (2) counter-clockwise, integer |
[in] | w | ??? |
[in] | delta_phi | Toroidal shift, final angle is phi+dir*delta_phi, real(8) |
[out] | x_dest | Projected (R,Z) coordinates, real(8) |
subroutine field_following_pos2 | ( | real (kind=8), dimension(2), intent(in) | x_org, |
real (kind=8), intent(in) | phi_org, | ||
real (kind=8), intent(in) | phi_dest, | ||
real (kind=8), dimension(2), intent(out) | x_dest | ||
) |
Project the input (R,phi,Z) coordinates along the magnetic field to a different toroidal angle. High-level routine.
[in] | x_org | Input (R,Z) coordinates, real(8) |
[in] | phi_org | Input toroidal angle phi, real(8) |
[in] | phi_dest | Output toroidal angle phi, real(8) |
[out] | x_dest | Projected (R,Z) coordinates, real(8) |
subroutine init_ff | ( | type(grid_type) | grid, |
type(psn_type) | psn | ||
) |
Initialize the field-aligned mapping between adjacent planes. The routine traces magnetic field lines from each vertex of a plane in both toroidal directions to the adjacent mid-planes and full-step planes, records the triangle in which the field line intersects these planes and the corresponding interpolation weights.
[in] | grid | XGC grid object, type(grid_type) |
[out] | psn | XGC field data object, type(psn_type) |
subroutine update_elec_weight | ( | type(grid_type), intent(in) | grid, |
type(psn_type), intent(in) | psn, | ||
type(species_type), intent(inout) | sp | ||
) |
Update electron weight from change of background distribution function along the collisionless particle trajectory.
[in] | grid | XGC grid object, type(grid_type) |
[in] | psn | XGC field data object, type(psn_type) |
[in,out] | sp | Species particle data object, type(species_type) |
subroutine update_ion_weight | ( | type(grid_type) | grid, |
type(species_type) | sp | ||
) |
Update ion weight from change of background distribution function along the collisionless particle trajectory.
[in] | grid | XGC grid object, type(grid_type) |
[in,out] | sp | Species particle data object, type(species_type) |