2D AMRCLAW
signs.f
Go to the documentation of this file.
1 
13 c
14 c --------------------------------------------------------------------
15 c
16  subroutine signs(badpts,npts,iscr,jscr,idim,jdim,ist,iend,
17  & ilo,ihi,jlo,jhi)
18 c
19  implicit double precision (a-h,o-z)
20  dimension badpts(2,npts)
21  ! TODO: can iscr use an array, say ihi-ilo?
22  dimension iscr(idim), jscr(jdim)
23 c
24 c
25  ilo= 1
26  ihi= idim
27  jlo= 1
28  jhi= jdim
29  do 10 i = 1, idim
30  10 iscr(i) = 0
31  do 15 j = 1, jdim
32  15 jscr(j) = 0
33 c
34 c count all flagged points in a given row/column in one pass through
35 c the points, i.e. a bin count
36 c
37  do 20 ipt = ist, iend
38  iloc = badpts(1,ipt)+1.1
39  jloc = badpts(2,ipt)+1.1
40  iscr(iloc) = iscr(iloc)+1
41  jscr(jloc) = jscr(jloc)+1
42  20 continue
43 c
44  do 30 ipt = 1, idim
45  if (iscr(ipt) .ne. 0) then
46  ilo = ipt
47  go to 40
48  endif
49  30 continue
50  40 do 50 ipt = 1, idim
51  if (iscr(idim+1-ipt) .ne. 0) then
52  ihi = idim+1-ipt
53  go to 60
54  endif
55  50 continue
56 
57  60 do 70 ipt = 1, jdim
58  if (jscr(ipt) .ne. 0) then
59  jlo = ipt
60  go to 80
61  endif
62  70 continue
63  80 do 90 ipt = 1, jdim
64  if (jscr(jdim+1-ipt) .ne. 0) then
65  jhi = jdim+1-ipt
66  go to 99
67  endif
68  90 continue
69 
70  99 return
71  end
subroutine signs(badpts, npts, iscr, jscr, idim, jdim, ist, iend,
Compute signatures of a rectangle Signature is defined as number of flagged cells in each row/column...
Definition: signs.f:17