XGCa
Data Types | Functions/Subroutines | Variables
grid_class Module Reference

Data Types

type  decomp_type
 
type  grid_type
 

Functions/Subroutines

subroutine init_grid (grid, filename1, filename2, filename3)
 Initializes the grid data structure from input files containing i) The (R,Z) coordinates of all vertices including whether they are wall vertices (.node file), ii) the connectivity of the vertices defining the triangles of the unstructured mesh (.ele file), iii) the flux-surface connectivity, i.e. which vertices are on the same flux-surface, and for vertices not aligned on flux-surfaces between which flux-surfaces those vertices lie. More...
 
subroutine init_triangle (grid)
 
subroutine t_coeff (grid, itr, x, p)
 
subroutine t_coeff_mod (grid, xy, psiin, itr, p)
 
subroutine search_tr (grid, x, itr, p)
 
subroutine guess (grid, x, init)
 
subroutine init_guess_table (grid)
 
subroutine search_tr_with_guess (grid, x, init, itr, p, count)
 
subroutine calc_gen_theta_psi (grid)
 Calculates the average psi on the complete flux-surfaces and the generalized poloidal angle (=normalized poloidal arc length) More...
 
subroutine search_ptl_1d_init (grid)
 Initializes a guess list for the 1D search on a non-uniform psi-grid. Uses psi00 grid. (Assumes that flux-surfaces on the non-uniform grid are in ascending order) More...
 
subroutine search_ptl_1d (grid, psi, wp, ip)
 1D binary search on a non-uniform psi grid with initial guess based on uniform psi-grid (Assumes that flux-surfaces on the non-uniform grid are in ascending order) More...
 
subroutine calc_mag_drift_flux_avg (grid)
 Computes the flux-surface average of 1/B^3 Bxgrad(B) and 1/B^2 curl(B). Those are zero analytically, but not numerically. This numerical cancellation error affects the calculation of radial fluxes a lot –> can be removed from the calculation. More...
 
subroutine init_wall (grid)
 

Variables

integer, parameter grid_rgn_wall = 100
 
real(8), parameter grid_search_tr2_psi_null = -1D10
 

Function/Subroutine Documentation

◆ calc_gen_theta_psi()

subroutine grid_class::calc_gen_theta_psi ( type(grid_type), intent(inout)  grid)

Calculates the average psi on the complete flux-surfaces and the generalized poloidal angle (=normalized poloidal arc length)

Parameters
grid(inout) type(grid_type), grid information
Here is the call graph for this function:
Here is the caller graph for this function:

◆ calc_mag_drift_flux_avg()

subroutine grid_class::calc_mag_drift_flux_avg ( type(grid_type), intent(inout)  grid)

Computes the flux-surface average of 1/B^3 Bxgrad(B) and 1/B^2 curl(B). Those are zero analytically, but not numerically. This numerical cancellation error affects the calculation of radial fluxes a lot –> can be removed from the calculation.

Parameters
[in,out]gridgrid data, type(grid_type)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ guess()

subroutine grid_class::guess ( type(grid_type), intent(in)  grid,
real (kind=8), dimension(2), intent(in)  x,
integer, intent(out)  init 
)
Here is the caller graph for this function:

◆ init_grid()

subroutine grid_class::init_grid ( type(grid_type), intent(inout)  grid,
character (len=65), intent(in)  filename1,
character (len=65), intent(in)  filename2,
character (len=65), intent(in)  filename3 
)

Initializes the grid data structure from input files containing i) The (R,Z) coordinates of all vertices including whether they are wall vertices (.node file), ii) the connectivity of the vertices defining the triangles of the unstructured mesh (.ele file), iii) the flux-surface connectivity, i.e. which vertices are on the same flux-surface, and for vertices not aligned on flux-surfaces between which flux-surfaces those vertices lie.

Parameters
[in,out]gridmemory for grid data, type(grid_type)
[in]filename1File containing the vertex positions (.node file)
[in]filename2File containing the triangle connectivity (.ele file)
[in]filename3File containing the flux-surface connectivity
Here is the call graph for this function:
Here is the caller graph for this function:

◆ init_guess_table()

subroutine grid_class::init_guess_table ( type(grid_type grid)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ init_triangle()

subroutine grid_class::init_triangle ( type(grid_type grid)
Here is the caller graph for this function:

◆ init_wall()

subroutine grid_class::init_wall ( type(grid_type grid)
Here is the caller graph for this function:

◆ search_ptl_1d()

subroutine grid_class::search_ptl_1d ( type(grid_type), intent(in)  grid,
real (kind=8), intent(in)  psi,
real (kind=8), intent(out)  wp,
integer, intent(out)  ip 
)

1D binary search on a non-uniform psi grid with initial guess based on uniform psi-grid (Assumes that flux-surfaces on the non-uniform grid are in ascending order)

Parameters
[in]grid(grid_type), grid-data
[in]psi(real (8)), psi-value to be located
[out]wp(real (8)), linear interpolation weight for the lower bound
[out]ip(integer), index of the lower boundary surface
Here is the caller graph for this function:

◆ search_ptl_1d_init()

subroutine grid_class::search_ptl_1d_init ( type(grid_type), intent(inout)  grid)

Initializes a guess list for the 1D search on a non-uniform psi-grid. Uses psi00 grid. (Assumes that flux-surfaces on the non-uniform grid are in ascending order)

Parameters
[in,out]grid(grid_type), grid data
Here is the caller graph for this function:

◆ search_tr()

subroutine grid_class::search_tr ( type (grid_type), intent(in)  grid,
real (kind=8), dimension(2), intent(in)  x,
integer, intent(out)  itr,
real (kind=8), dimension(3), intent(out)  p 
)
Here is the call graph for this function:

◆ search_tr_with_guess()

subroutine grid_class::search_tr_with_guess ( type(grid_type), target  grid,
real (kind=8), dimension(2), intent(in)  x,
integer, intent(in)  init,
integer, intent(out)  itr,
real (kind=8), dimension(3), intent(out)  p,
integer  count 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ t_coeff()

subroutine grid_class::t_coeff ( type(grid_type), intent(in)  grid,
integer, intent(in)  itr,
real (kind=8), dimension(2), intent(in)  x,
real (kind=8), dimension(3), intent(out)  p 
)
Here is the caller graph for this function:

◆ t_coeff_mod()

subroutine grid_class::t_coeff_mod ( type (grid_type), intent(in)  grid,
real (kind=8), dimension(2), intent(in)  xy,
real (kind=8), intent(in)  psiin,
integer, intent(in)  itr,
real (kind=8), dimension(3), intent(out)  p 
)
Here is the caller graph for this function:

Variable Documentation

◆ grid_rgn_wall

integer, parameter grid_class::grid_rgn_wall = 100

◆ grid_search_tr2_psi_null

real (8), parameter grid_class::grid_search_tr2_psi_null = -1D10