This module provides the capability to search where a trajectory (straight line between 2 points) crosses a polygon (i.e. the wall curve of the solver mesh). The data structure wall_cross_check_type provides an object that contains all information needed for the search beyond the test trajectory: Coordinates of the wall vertices, and a guess table to accelerate the search based on a 2D uniform, rectangular guess grid. The routine wall_cross2 finds the segment of the polygon that intersects with the input trajectory.
More...

subroutine  init_wall_cross_check (wall_r, wall_z, nseg, min_r, max_r, min_z, max_z, gsize, wcross_dat) 

subroutine  finalize_wall_cross_check (wcross_dat) 

integer function  wall_cross2 (r1, z1, r2, z2, wcross_dat) 
 This is a general routine for identifying the segment of a closed polygon intersected by the input segment. If no intersection is found, the routine returns 0. More...


This module provides the capability to search where a trajectory (straight line between 2 points) crosses a polygon (i.e. the wall curve of the solver mesh). The data structure wall_cross_check_type provides an object that contains all information needed for the search beyond the test trajectory: Coordinates of the wall vertices, and a guess table to accelerate the search based on a 2D uniform, rectangular guess grid. The routine wall_cross2 finds the segment of the polygon that intersects with the input trajectory.
subroutine wall_cross::init_wall_cross_check 
( 
real (kind=8), dimension(nseg+1), intent(in) 
wall_r, 


real (kind=8), dimension(nseg+1), intent(in) 
wall_z, 


integer, intent(in) 
nseg, 


real (kind=8), intent(in) 
min_r, 


real (kind=8), intent(in) 
max_r, 


real (kind=8), intent(in) 
min_z, 


real (kind=8), intent(in) 
max_z, 


integer, intent(in) 
gsize, 


type(wall_cross_check_type), intent(out) 
wcross_dat 

) 
 
integer function wall_cross::wall_cross2 
( 
real (kind=8), intent(in) 
r1, 


real (kind=8), intent(in) 
z1, 


real (kind=8), intent(in) 
r2, 


real (kind=8), intent(in) 
z2, 


type(wall_cross_check_type) 
wcross_dat 

) 
 
This is a general routine for identifying the segment of a closed polygon intersected by the input segment. If no intersection is found, the routine returns 0.
The particular application in this code is to determine which segment of the boundary was crossed by a particle, with the crossing have been previously flagged by subroutine wall_check. The first point of the segment is the previous location of the particle. The second is its current location, which should be outside the boundary. Should this segment not intersect the boundary for some reason, the routine will return 0.
 Parameters

[in]  r1  Previous position Rcoordinate 
[in]  z1  Previous position Zcoordinate 
[in]  r2  Current position Rcoordinate 
[in]  z2  Current position Zcoordinate 
[in]  wcross_dat  Wall polygon including guess grid, type(wall_cross_check_type) 
The documentation for this module was generated from the following file:
 /u/gitlabxgc/builds/YGMz2TJ8/0/xgc/XGCDevel/XGC_core/module.F90