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

Data Types

type  grid_type
 

Functions/Subroutines

subroutine set_fortran_flx_aif_format (old_flx_aif_format_int)
 
subroutine init_fortran_grid (grid_nnode_in, grid_ntriangle_in, grid_nwall_in, grid_x_in, grid_rgn_in, grid_nd_in, grid_mapping_in, grid_wall_nodes_in, grid_node_to_wall_in, basis_in)
 
subroutine init_fortran_grid_surf (n_xpt, i_x1, i_x2, nsurf1, nsurf2, nsurf3a, nsurf3b, isurf_sep1, isurf_sep2, npsi_surf, surf_maxlen, num_non_aligned, surf_len, surf_idx, non_aligned_vert, non_aligned_nsurf, non_aligned_surf_idx)
 
subroutine init_secondary_grid_arrays (grid_psi_in, grid_grad_psi_in, grid_bfield_in)
 
subroutine init_guess_table_from_cpp (guess_n1, guess_list_len, guess_n_in, guess_min_in, guess_max_in, inv_guess_d_in, guess_list_in, guess_xtable_in, guess_count_in)
 
subroutine init_fortran_vols_and_areas (tr_area_h, tr_vol_h, node_vol_ff_h, node_vol_nearest_h, node_vol_h, node_area_h)
 
subroutine init_fortran_psi_grid_props (npsi_surf, psi_surf, npsi_surf2, psi_surf2, psi_surf_map)
 
subroutine alloc_fortran_gradient_mat_unit_vec (m, n, width)
 
subroutine set_fort_fsamat_ptr (m, n, width, value, eindex, nelement, m2, n2, width2, value2, eindex2, nelement2)
 
subroutine init_grid (grid)
 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 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 init_wall (grid)
 
integer function get_nsurfs_for_avg ()
 

Variables

integer, parameter grid_rgn_wall = 100
 
real(8), parameter grid_search_tr2_psi_null = -1D10
 
integer, parameter grid_min_surf_size = 5
 
type(grid_type), target grid_global
 

Function/Subroutine Documentation

◆ alloc_fortran_gradient_mat_unit_vec()

subroutine grid_class::alloc_fortran_gradient_mat_unit_vec ( integer(c_int), intent(in), value  m,
integer(c_int), intent(in), value  n,
integer(c_int), intent(in), value  width 
)
Here is the call graph for this function:

◆ 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:

◆ get_nsurfs_for_avg()

integer function grid_class::get_nsurfs_for_avg

◆ init_fortran_grid()

subroutine grid_class::init_fortran_grid ( integer(c_int), intent(in), value  grid_nnode_in,
integer(c_int), intent(in), value  grid_ntriangle_in,
integer(c_int), intent(in), value  grid_nwall_in,
real (kind=8), dimension(2,grid_nnode_in), target  grid_x_in,
integer(c_int), dimension(grid_nnode_in), target  grid_rgn_in,
integer(c_int), dimension(3,grid_ntriangle_in), target  grid_nd_in,
real (kind=8), dimension(2,3,grid_ntriangle_in), target  grid_mapping_in,
integer(c_int), dimension(grid_nwall_in), target  grid_wall_nodes_in,
integer(c_int), dimension(grid_nnode_in), target  grid_node_to_wall_in,
integer(c_int), dimension(grid_nnode_in), target  basis_in 
)

◆ init_fortran_grid_surf()

subroutine grid_class::init_fortran_grid_surf ( integer(c_int), intent(in), value  n_xpt,
integer(c_int), intent(in), value  i_x1,
integer(c_int), intent(in), value  i_x2,
integer(c_int), intent(in), value  nsurf1,
integer(c_int), intent(in), value  nsurf2,
integer(c_int), intent(in), value  nsurf3a,
integer(c_int), intent(in), value  nsurf3b,
integer(c_int), intent(in), value  isurf_sep1,
integer(c_int), intent(in), value  isurf_sep2,
integer(c_int), intent(in), value  npsi_surf,
integer(c_int), intent(in), value  surf_maxlen,
integer(c_int), intent(in), value  num_non_aligned,
integer(c_int), dimension(npsi_surf), target  surf_len,
integer(c_int), dimension(surf_maxlen, npsi_surf), target  surf_idx,
integer(c_int), dimension(num_non_aligned), target  non_aligned_vert,
integer(c_int), dimension(num_non_aligned), target  non_aligned_nsurf,
integer(c_int), dimension(4,num_non_aligned), target  non_aligned_surf_idx 
)

◆ init_fortran_psi_grid_props()

subroutine grid_class::init_fortran_psi_grid_props ( integer(c_int), intent(in), value  npsi_surf,
real(c_double), dimension(npsi_surf), target  psi_surf,
integer(c_int), intent(in), value  npsi_surf2,
real(c_double), dimension(npsi_surf2), target  psi_surf2,
integer(c_int), dimension(npsi_surf2), target  psi_surf_map 
)

◆ init_fortran_vols_and_areas()

subroutine grid_class::init_fortran_vols_and_areas ( real(c_double), dimension(grid_global%ntriangle), target  tr_area_h,
real(c_double), dimension(grid_global%ntriangle), target  tr_vol_h,
real(c_double), dimension(grid_global%nnode, 0:1), target  node_vol_ff_h,
real(c_double), dimension(grid_global%nnode), target  node_vol_nearest_h,
real(c_double), dimension(grid_global%nnode), target  node_vol_h,
real(c_double), dimension(grid_global%nnode), target  node_area_h 
)

◆ init_grid()

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

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]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_from_cpp()

subroutine grid_class::init_guess_table_from_cpp ( integer(c_int), intent(in), value  guess_n1,
integer(c_int), intent(in), value  guess_list_len,
integer(c_int), dimension(2)  guess_n_in,
real (kind=8), dimension(2)  guess_min_in,
real (kind=8), dimension(2)  guess_max_in,
real (kind=8), dimension(2)  inv_guess_d_in,
integer(c_int), dimension(guess_list_len), target  guess_list_in,
integer(c_int), dimension(guess_n1,guess_n1), target  guess_xtable_in,
integer(c_int), dimension(guess_n1,guess_n1), target  guess_count_in 
)

◆ init_secondary_grid_arrays()

subroutine grid_class::init_secondary_grid_arrays ( real (kind=8), dimension(grid_global%nnode), target  grid_psi_in,
real (kind=8), dimension(grid_global%nnode, 2)  grid_grad_psi_in,
real (kind=8), dimension(grid_global%nnode, 4)  grid_bfield_in 
)

◆ 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:

◆ set_fort_fsamat_ptr()

subroutine grid_class::set_fort_fsamat_ptr ( integer(c_int), intent(in), value  m,
integer(c_int), intent(in), value  n,
integer(c_int), intent(in), value  width,
real(8), dimension(width,m), intent(in), target  value,
integer(c_int), dimension(width,m), intent(in), target  eindex,
integer(c_int), dimension(m), intent(in), target  nelement,
integer(c_int), intent(in), value  m2,
integer(c_int), intent(in), value  n2,
integer(c_int), intent(in), value  width2,
real(8), dimension(width2,m2), intent(in), target  value2,
integer(c_int), dimension(width2,m2), intent(in), target  eindex2,
integer(c_int), dimension(m2), intent(in), target  nelement2 
)

◆ set_fortran_flx_aif_format()

subroutine grid_class::set_fortran_flx_aif_format ( integer(c_int), intent(in), value  old_flx_aif_format_int)

◆ 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_global

type(grid_type), target grid_class::grid_global

◆ grid_min_surf_size

integer, parameter grid_class::grid_min_surf_size = 5

◆ 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