15 integer,
intent(inout),
dimension(:) :: array
16 integer,
intent(in) :: arraysize
18 logical(LGP) :: z_only
20 integer :: qsort_threshold = 8
21 include
"qsort_inline.inc"
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)
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()
77 global_xyz = [x, y, z]
83 integer,
intent(in) :: a, b
94 integer,
intent(in) :: left, right
98 array(left + 1:right) = array(left:right - 1)
real(dp) function, dimension(3) get_global_xyz(gc, use_only_z)
Utility function to convert global cell.
logical(lgp) function lessthan(n, m)
subroutine rshift(left, right)
subroutine, public dis_transform_xy(x, y, xorigin, yorigin, angrot, xglo, yglo)
Get global (x, y) coordinates from cell-local coordinates.
This module contains simulation constants.
real(dp), parameter dhalf
real constant 1/2
real(dp), parameter dzero
real constant zero
subroutine, public quicksortgrid(array, arraySize, idxToGlobal, z_only)
This module defines variable data types.
pure logical function, public is_close(a, b, rtol, atol, symmetric)
Check if a real value is approximately equal to another.
Data structure to hold a global cell identifier, using a pointer to the model and its local cell.