Go to the source code of this file.
◆ get_global_xyz()
| real(dp) function, dimension(3) quicksortgrid::get_global_xyz |
( |
type(globalcelltype) |
gc, |
|
|
logical(lgp) |
use_only_z |
|
) |
| |
|
private |
- Parameters
-
| gc | the global cell id |
| use_only_z | only z coordinate is needed or available, skip transform |
- Returns
- return xyz
Definition at line 55 of file GridSorting.f90.
56 type(GlobalCellType) :: gc
57 logical(LGP) :: use_only_z
58 real(DP),
dimension(3) :: global_xyz
61 real(DP) :: xc, yc, xo, yo, angrot
63 z = dhalf * (gc%v_model%dis_top%get(gc%index) + &
64 gc%v_model%dis_bot%get(gc%index))
68 if (.not. use_only_z)
then
69 xc = gc%v_model%dis_xc%get(gc%index)
70 yc = gc%v_model%dis_yc%get(gc%index)
71 xo = gc%v_model%dis_xorigin%get()
72 yo = gc%v_model%dis_yorigin%get()
73 angrot = gc%v_model%dis_angrot%get()
74 call dis_transform_xy(xc, yc, xo, yo, angrot, x, y)
77 global_xyz = [x, y, z]
◆ init()
| subroutine quicksortgrid::init |
|
private |
◆ lessthan()
| logical(lgp) function quicksortgrid::lessthan |
( |
integer(i4b), intent(in) |
n, |
|
|
integer(i4b), intent(in) |
m |
|
) |
| |
|
private |
Definition at line 29 of file GridSorting.f90.
30 integer(I4B),
intent(in) :: n
31 integer(I4B),
intent(in) :: m
32 logical(LGP) :: isLess
34 real(DP),
dimension(3) :: xyz_n, xyz_m
41 if (.not. is_close(xyz_n(3), xyz_m(3), 10 * epsilon(xyz_n(3))))
then
42 isless = xyz_n(3) > xyz_m(3)
43 else if (.not. is_close(xyz_n(2), xyz_m(2), 10 * epsilon(xyz_n(2))
then
44 isless = xyz_n(2) > xyz_m(2)
45 else if (.not. is_close(xyz_n(1), xyz_m(1), 10 * epsilon(xyz_n(1))
then
46 isless = xyz_n(1) < xyz_m(1)
real(dp) function, dimension(3) get_global_xyz(gc, use_only_z)
Utility function to convert global cell.
◆ rshift()
| subroutine quicksortgrid::rshift |
( |
integer, intent(in) |
left, |
|
|
integer, intent(in) |
right |
|
) |
| |
|
private |
Definition at line 93 of file GridSorting.f90.
94 integer,
intent(in) :: left, right
98 array(left + 1:right) = array(left:right - 1)
◆ swap()
| subroutine quicksortgrid::swap |
( |
integer, intent(in) |
a, |
|
|
integer, intent(in) |
b |
|
) |
| |
|
private |