20 subroutine grdfit (lbase,lcheck,nvar,naux,cut,time,
24 implicit double precision (a-h,o-z)
25 integer clock_start, clock_finish, clock_rate
29 integer numptc(
maxcl), prvptr
35 call system_clock(clock_start,clock_rate)
49 call system_clock(clock_start1,clock_rate)
50 call flglvl2(nvar,naux,lcheck,nptmax,index,lbase,npts,start_time)
51 call system_clock(clock_finish,clock_rate)
54 if (npts .eq. 0)
go to 99
74 write(
outunit,104) (icl, numptc(icl),icl=1,nclust)
75 103
format(
' ',i4,
' clusters after bisect')
76 104
format(
' cluster ',i5,
' has points: ',i8)
91 100
format(
' cluster ',i5,
' new rect.',i5,
92 1
' usage ',e12.5,
' with ',i5,
' pts.')
107 101
format(4i5,4i15,/,4i15,5i15,/,2i15,/,5e15.7)
114 fit2 = nestck2(mnew,lbase,
alloc(index+2*ibase),numptc(icl),numptc,
115 1 icl,nclust,nvar, naux)
116 if (.not. fit2)
go to 75
132 69 ibase = ibase + numptc(icl)
134 if (icl .le. nclust)
go to 70
144 if (nptmax .gt. 0)
call reclam(index, 2*nptmax)
146 call system_clock(clock_finish,clock_rate)
integer, parameter timemult
current simulation time on this grid
integer, parameter cornxlo
x-coordinate of the left border of this grid
subroutine flglvl2(nvar, naux, lcheck, nxypts, index, lbase, npts, start_time)
Controls the error estimation/flagging bad pts.
subroutine reclam(index, nwords)
integer, dimension(maxlv) iregsz
real(kind=8), dimension(maxlv) hyposs
real(kind=8), dimension(maxlv) hxposs
integer, dimension(maxlv) newstl
integer, parameter ndihi
global i index of right border of this grid
integer, dimension(maxlv) jregsz
integer, dimension(nsize, maxgr) node
integer, dimension(maxlv) iregst
integer, parameter nestlevel
AMR level of the grid.
real(kind=8), dimension(rsize, maxgr) rnode
integer, parameter maxcl
maximum number of clusters (grids) on each grid level
integer, dimension(maxlv) jregst
subroutine moment(intrect, badpts, npt, usage)
Compute enclosing rectangle around flagged points.
integer, parameter ndilo
global i index of left border of this grid
integer, parameter ndjlo
global j index of lower border of this grid
integer, parameter iinfinity
subroutine grdfit(lbase, lcheck, nvar, naux, cut, time, start_time)
This subroutine is called by setgrd and regrid to actually fit the new grids on each level...
integer, dimension(maxlv) intraty
integer function nodget()
Get first free node of the linked list kept in node array.
integer, parameter outunit
subroutine smartbis(badpts, npts, cutoff, numptc, nclust, lbase, intcorn, idim, jdim)
Smart bisect rectangles until cutoff reached for each.
integer, dimension(maxlv) jregend
integer, parameter ndjhi
global j index of upper border of this grid
subroutine birect(mptr1)
Check each grid, starting with mptr1 (either newstl or lstart) to see that it has no more than max1d ...
integer, parameter cornylo
y-coordinate of the lower border of this grid
integer, dimension(maxlv) intratx
integer, parameter levelptr
node number (index) of next grid on the same level
integer, parameter cornxhi
x-coordinate of the right border of this grid
The module contains the definition of a "node descriptor" as well as other global variables used duri...
integer, dimension(maxlv) iregend
integer, parameter cornyhi
y-coordinate of the upper border of this grid
real(kind=8), dimension(:), allocatable alloc