XGC1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Functions/Subroutines
field_following.F90 File Reference
#include "adios_macro.h"
Include dependency graph for field_following.F90:

Functions/Subroutines

subroutine write_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 check_ff_property (grid, psn)
 check field-following property using psnff_hdp_p and psnff_1dp_p print out statistical information from p distribution 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)
 

Function/Subroutine Documentation

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 (?].

Parameters
[in]gridXGC 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)

Here is the call graph for this function:

subroutine check_ff_property ( type(grid_type)  grid,
type(psn_type)  psn 
)

check field-following property using psnff_hdp_p and psnff_1dp_p print out statistical information from p distribution

Parameters
[in]gridXGC grid object, type(grid_type)
[out]psnXGC field data object, type(psn_type)

Here is the call graph for this function:

Here is the caller graph for this function:

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).

Parameters
[in]gridXGC grid data object, type(grid_type)
[in]trTriangle indices for transformation, integer
[in]pInterpolation weights corresponding to the triangle indices, real(8)
[in]var_ffInput data in field-aligned representation, real(8)
[out]var_realOutput data in real-space representation

Here is the caller graph for this function:

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).

Parameters
[in]gridXGC grid data object, type(grid_type)
[in]trTriangle indices for transformation, integer
[in]pInterpolation weights corresponding to the triangle indices, real(8)
[out]var_ffOutput data in field-aligned representation, real(8)
[in]var_realInput data in real-space representation

Here is the caller graph for this function:

subroutine field_following_pos2::derivs ( real (8), dimension(2), intent(in)  x,
real (8), intent(in)  phi,
real (8), dimension(2), intent(out)  dx 
)

Here is the call graph for this function:

Here is the caller graph for this function:

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.

Parameters
[in]x_orgInput (R,Z) coordinates, real(8)
[in]phiInput toroidal angle phi, real(8)
[in]dirDirection of the projection, (1) clockwise looking from above, (2) counter-clockwise, integer
[in]w???
[in]delta_phiToroidal shift, final angle is phi+dir*delta_phi, real(8)
[out]x_destProjected (R,Z) coordinates, real(8)

Here is the call graph for this function:

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.

Parameters
[in]x_orgInput (R,Z) coordinates, real(8)
[in]phi_orgInput toroidal angle phi, real(8)
[in]phi_destOutput toroidal angle phi, real(8)
[out]x_destProjected (R,Z) coordinates, real(8)

Here is the call graph for this function:

Here is the caller graph for this function:

subroutine write_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.

Parameters
[in]gridXGC grid object, type(grid_type)
[out]psnXGC field data object, type(psn_type)

Here is the call graph for this function:

Here is the caller graph for this function: