2D AMRCLAW
outmsh.f
Go to the documentation of this file.
1 c
2 c ---------------------------------------------------------
3 c
4  subroutine outmsh(mptr,outgrd,nvar,naux)
5  use amr_module
6  implicit double precision (a-h,o-z)
7  logical outgrd
8 
9 
10 c
11 c ::::::::::::::::::::: OUTMSH :::::::::::::::::::::::::::::::::::::
12 c
13 c outmsh - output the grid descriptor and optionally the values on
14 c the grid (for a single grid - see "outtre" for outputing
15 c a subtree)
16 c input parameters:
17 c mptr - ptr to grid descriptor
18 c outgrd - if true, output value on grid
19 c special case
20 c if grid has level < 1, nothing is printed. (forest pointer
21 c has level = 0). this simplifies logic of outtre; also, any grid
22 c with level <= 0 is not properly set (the forest pointer
23 c is used only to provide pointers into the tree of coarsest grids)
24 c
25 c :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
26 
27 100 format(1x,47h+----------------------------------------------,
28  *30h-----------------------------+)
29 c
30  lev = node(nestlevel,mptr)
31 c
32  write(outunit,100)
33  write(outunit,101) mptr
34 101 format(1x,10h! grid no:,i6,60x,1h!)
35  write(outunit,102) node(nestlevel,mptr),rnode(timemult,mptr),
36  . node(levelptr,mptr)
37 102 format(1x,1h!,11h nestlevel=,i3,12h, time mult=,e25.15,
38  1 13h, level ptr =,i6,5x,1h!)
39  write(outunit,103) node(store1,mptr),node(store2,mptr),
40  1 node(cfluxptr,mptr),node(ffluxptr,mptr)
41  103 format(1x,'! storage locs =',2i11,' bndry locs =',2i11,2x,1h!)
42  write(outunit,104)
43  write(outunit,111) rnode(cornxlo,mptr),rnode(cornyhi,mptr),
44  1 rnode(cornxhi,mptr),rnode(cornyhi,mptr)
45  write(outunit,111) rnode(cornxlo,mptr),rnode(cornylo,mptr),
46  1 rnode(cornxhi,mptr),rnode(cornylo,mptr)
47  write(outunit,112)
48  write(outunit,113) node(ndilo,mptr),node(ndjhi,mptr),
49  1 node(ndihi,mptr),node(ndjhi,mptr)
50  write(outunit,113) node(ndilo,mptr),node(ndjlo,mptr),
51  1 node(ndihi,mptr),node(ndjlo,mptr)
52 112 format(1x,23h! integer index space :,53x,1h!)
53 113 format(1x,2h! ,18x,2(1h(,i8,2h, ,i8,1h)),16x,1h!)
54 104 format(1x,23h! corners of rectangle:,53x,1h!)
55 111 format(1x,2h! ,10x,2(1h(,f12.7,2h, ,f12.7,1h)),8x,1h!)
56 
57 c This is a replacement for line 45-46 format that used to be format 111
58 c111 format(1x,2h! ,18x,2(1h(,d10.3,2h, ,d10.3,1h)),8x,1h!)
59 
60  write(outunit,105) hxposs(lev),hyposs(lev),possk(lev)
61  105 format(1x,7h! hrow=,f19.11,7h, hcol=,f19.11,8h, ktime=,f16.9,1h!)
62 c105 format(1x,7h! hrow=,D16.8,7h, hcol=,D16.8,30x,1h!)
63 c114 format(1x,8h! ktime=,D16.8,52x,1h!)
64 
65  write(outunit,100)
66 c
67  if (.not. outgrd) go to 99
68 c output the grid
69  mitot = node(ndihi,mptr) - node(ndilo,mptr) + 1 + 2*nghost
70  mjtot = node(ndjhi,mptr) - node(ndjlo,mptr) + 1 + 2*nghost
71  loc = node(store1,mptr)
72  locaux = node(storeaux,mptr)
73  call outval(alloc(loc),nvar,mitot,mjtot,mptr,outgrd,
74  1 naux,alloc(locaux))
75  99 return
76  end
subroutine outval(val, nvar, mitot, mjtot, mptr, outgrd, naux, aux)
Definition: outval.f:3
subroutine outmsh(mptr, outgrd, nvar, naux)
Definition: outmsh.f:4