14 c ----------------------------------------------------------
16 subroutine moment (intrect,badpts,npt,usage)
19 implicit double precision (a-h,o-z)
22 dimension intrect(
nsize),badpts(2,npt)
24 c ::::::::::::::::::::::::
moment ::::::::::::::::::::::::::::::::::
25 c
moment = compute enclosing rectangle around flagged points.
26 c
save some info., even tho. usage might be low and rect. scrapped.
29 c badpts = x,y coords of flagged badpts grouped into clusters
30 c are in the first two rows
31 c npt = num. of badpts. in the cluster.
34 c usage = ratio of flagged to unflagged badpts. in new grid
35 c measures goodness of fit and clustering
36 c intrect( ) = stores some info. for grid created herein.
37 c sometimes rect =
rnode, sometimes = temp. array.
38 c sometimes intrect =
node.
39 c depending on calling prog. (
grdfit or expand)
42 c ::::::::::::::::::::::::
moment ::::::::::::::::::::::::::::::::::
46 c compute length of enclosing rectangles to include all flagged badpts.
53 if (badpts(1,ipt) .gt. emx1) emx1 = badpts(1,ipt)
54 if (badpts(1,ipt) .lt. emn1) emn1 = badpts(1,ipt)
55 if (badpts(2,ipt) .gt. emx2) emx2 = badpts(2,ipt)
56 if (badpts(2,ipt) .lt. emn2) emn2 = badpts(2,ipt)
59 c from length of the sides determine rect. corners.
60 c transform to cell numbers(subtract .5)
62 intrect(
ndilo) = nint(emn1 - .5)
63 intrect(
ndjlo) = nint(emn2 - .5)
64 intrect(
ndihi) = nint(emx1 - .5)
65 intrect(
ndjhi) = nint(emx2 - .5)
71 gpall = iside1 * iside2
integer, parameter ndihi
global i index of right border of this grid
integer, dimension(nsize, maxgr) node
real(kind=8), dimension(rsize, maxgr) rnode
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
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, parameter ndjhi
global j index of upper border of this grid
The module contains the definition of a "node descriptor" as well as other global variables used duri...