4 subroutine conck(level, nvar, naux, time, rest)
7 implicit double precision (a-h,o-z)
16 iadd(ivar,i,j) = loc + ivar - 1 + nvar*((j-1)*mitot+i-1)
17 iaddaux(i,j) = locaux + mcapa - 1 + naux*(i-1) +
37 20
if (mptr .eq. 0) go to 85
38 loc = node(store1,mptr)
39 locaux = node(storeaux,mptr)
40 nx = node(ndihi,mptr) - node(ndilo,mptr) + 1
41 ny = node(ndjhi,mptr) - node(ndjlo,mptr) + 1
45 if (mcapa .eq. 0)
then
46 do 50 j = nghost+1, mjtot-nghost
47 do 50 i = nghost+1, mitot-nghost
48 totmass = totmass + alloc(
iadd(1,i,j))
52 do 60 j = nghost+1, mjtot-nghost
53 do 60 i = nghost+1, mitot-nghost
54 totmass = totmass + alloc(
iadd(1,i,j))*alloc(iaddaux(i,j))
58 mptr = node(levelptr,mptr)
61 85 totmass = totmass * hx * hy
62 if (time.eq. t0 .and. (level.eq.1) .and. .not. rest)
then
64 write(6,*)
'Total mass at initial time: ',tmass0
66 write(outunit,777) time, totmass, totmass-tmass0
67 777
format(
'time t = ',e12.5,
', total mass = ',e22.15,
' diff = ',
subroutine conck(level, nvar, naux, time, rest)
integer pure function iadd(ivar, i, j)