Go to the source code of this file.
|
subroutine | drivesort (npts, badpts, level, index, mbuff) |
| Sort 2D points (stored in badpts) based on their equivalent integer value (based on their x,y coordinates). More...
|
|
◆ drivesort()
subroutine drivesort |
( |
|
npts, |
|
|
dimension(2,npts) |
badpts, |
|
|
|
level, |
|
|
|
index, |
|
|
|
mbuff |
|
) |
| |
Sort 2D points (stored in badpts) based on their equivalent integer value (based on their x,y coordinates).
Also remove duplicate points in badpts.
Definition at line 8 of file drivesort.f.
References domain(), amr_module::gprint, iadd(), amr_module::iregsz, amr_module::jregsz, amr_module::outunit, and qsorti().
Referenced by colate2().
10 implicit double precision (a-h,o-z)
11 dimension badpts(2,npts)
12 dimension iflags(npts), ixarray(npts)
15 iadd(i,j) = (i+mbuff) + (isize+2*mbuff)*(j+mbuff)
31 call qsorti(ixarray, npts, iflags)
36 do while (k .le. npts)
37 intequiv = iflags(ixarray(k))
39 badpts(2,index) = intequiv/(isize+2*mbuff) + .5 -mbuff
40 badpts(1,index) = mod(intequiv,(isize+2*mbuff)) + .5 -mbuff
41 if (db)
write(
outunit,101) badpts(1,index),badpts(2,index)
44 do while ( k.le. npts)
45 if (iflags(ixarray(k)) .eq. iflags(ixarray(k-1)))
then 57 929
format(i5,
" flagged pts after removing duplicates and ",
58 &
" non-nested flags")
subroutine qsorti(ORD, N, A)
integer, dimension(maxlv) iregsz
integer, dimension(maxlv) jregsz
integer pure function iadd(ivar, i, j)
integer, parameter outunit
The module contains the definition of a "node descriptor" as well as other global variables used duri...