2D AMRCLAW
outmsh.f
Go to the documentation of this file.
1 c
10 c
11  subroutine outmsh(mptr,outgrd,nvar,naux)
13  implicit double precision (a-h,o-z)
14  logical outgrd
15 
16 
17 c
18 c ::::::::::::::::::::: OUTMSH :::::::::::::::::::::::::::::::::::::
19 c
20 c outmsh - output the grid descriptor and optionally the values on
21 c the grid (for a single grid - see "outtre" for outputing
22 c a subtree)
23 c input parameters:
24 c mptr - ptr to grid descriptor
25 c outgrd - if true, output value on grid
26 c special case
27 c if grid has level < 1, nothing is printed. (forest pointer
28 c has level = 0). this simplifies logic of outtre; also, any grid
29 c with level <= 0 is not properly set (the forest pointer
30 c is used only to provide pointers into the tree of coarsest grids)
31 c
32 c :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
33 
34 100 format(1x,47h+----------------------------------------------,
35  *30h-----------------------------+)
36 c
37  lev = node(nestlevel,mptr)
38 c
39  write(outunit,100)
40  write(outunit,101) mptr
41 101 format(1x,10h! grid no:,i6,60x,1h!)
42  write(outunit,102) node(nestlevel,mptr),rnode(timemult,mptr),
43  . node(levelptr,mptr)
44 102 format(1x,1h!,11h nestlevel=,i3,12h, time mult=,e25.15,
45  1 13h, level ptr =,i6,5x,1h!)
46  write(outunit,103) node(store1,mptr),node(store2,mptr),
47  1 node(cfluxptr,mptr),node(ffluxptr,mptr)
48  103 format(1x,'! storage locs =',2i11,' bndry locs =',2i11,2x,1h!)
49  write(outunit,104)
50  write(outunit,111) rnode(cornxlo,mptr),rnode(cornyhi,mptr),
51  1 rnode(cornxhi,mptr),rnode(cornyhi,mptr)
52  write(outunit,111) rnode(cornxlo,mptr),rnode(cornylo,mptr),
53  1 rnode(cornxhi,mptr),rnode(cornylo,mptr)
54  write(outunit,112)
55  write(outunit,113) node(ndilo,mptr),node(ndjhi,mptr),
56  1 node(ndihi,mptr),node(ndjhi,mptr)
57  write(outunit,113) node(ndilo,mptr),node(ndjlo,mptr),
58  1 node(ndihi,mptr),node(ndjlo,mptr)
59 112 format(1x,23h! integer index space :,53x,1h!)
60 113 format(1x,2h! ,18x,2(1h(,i8,2h, ,i8,1h)),16x,1h!)
61 104 format(1x,23h! corners of rectangle:,53x,1h!)
62 111 format(1x,2h! ,10x,2(1h(,f12.7,2h, ,f12.7,1h)),8x,1h!)
63 
64 c This is a replacement for line 45-46 format that used to be format 111
65 c111 format(1x,2h! ,18x,2(1h(,d10.3,2h, ,d10.3,1h)),8x,1h!)
66 
67  write(outunit,105) hxposs(lev),hyposs(lev),possk(lev)
68  105 format(1x,7h! hrow=,f19.11,7h, hcol=,f19.11,8h, ktime=,f16.9,1h!)
69 c105 format(1x,7h! hrow=,D16.8,7h, hcol=,D16.8,30x,1h!)
70 c114 format(1x,8h! ktime=,D16.8,52x,1h!)
71 
72  write(outunit,100)
73 c
74  if (.not. outgrd) go to 99
75 c output the grid
76  mitot = node(ndihi,mptr) - node(ndilo,mptr) + 1 + 2*nghost
77  mjtot = node(ndjhi,mptr) - node(ndjlo,mptr) + 1 + 2*nghost
78  loc = node(store1,mptr)
79  locaux = node(storeaux,mptr)
80  call outval(alloc(loc),nvar,mitot,mjtot,mptr,outgrd,
81  1 naux,alloc(locaux))
82  99 return
83  end
integer, parameter timemult
current simulation time on this grid
Definition: amr_module.f90:151
integer, parameter cornxlo
x-coordinate of the left border of this grid
Definition: amr_module.f90:143
real(kind=8), dimension(maxlv) hyposs
Definition: amr_module.f90:193
real(kind=8), dimension(maxlv) hxposs
Definition: amr_module.f90:193
integer, parameter ndihi
global i index of right border of this grid
Definition: amr_module.f90:111
integer, dimension(nsize, maxgr) node
Definition: amr_module.f90:198
integer, parameter nestlevel
AMR level of the grid.
Definition: amr_module.f90:44
real(kind=8), dimension(rsize, maxgr) rnode
Definition: amr_module.f90:193
integer, parameter ndilo
global i index of left border of this grid
Definition: amr_module.f90:108
integer, parameter ndjlo
global j index of lower border of this grid
Definition: amr_module.f90:114
integer, parameter store1
pointer to the address of memory storing the first copy of solution data on this grid, usually for storing new solution
Definition: amr_module.f90:101
integer, parameter store2
pointer to the address of memory storing the second copy of solution data on this grid...
Definition: amr_module.f90:105
integer, parameter outunit
Definition: amr_module.f90:290
real(kind=8), dimension(maxlv) possk
Definition: amr_module.f90:193
integer, parameter ndjhi
global j index of upper border of this grid
Definition: amr_module.f90:117
subroutine outval(val, nvar, mitot, mjtot, mptr, outgrd, naux, aux)
print solution and aux.
Definition: outval.f:5
integer, parameter cornylo
y-coordinate of the lower border of this grid
Definition: amr_module.f90:145
integer, parameter levelptr
node number (index) of next grid on the same level
Definition: amr_module.f90:35
integer, parameter cornxhi
x-coordinate of the right border of this grid
Definition: amr_module.f90:147
integer nghost
Definition: amr_module.f90:232
The module contains the definition of a "node descriptor" as well as other global variables used duri...
Definition: amr_module.f90:21
subroutine outmsh(mptr, outgrd, nvar, naux)
Output the grid descriptor of grid mptr and optionally the values on the grid (for a single grid - se...
Definition: outmsh.f:12
integer, parameter cfluxptr
Pointer to an 5 by maxsp array, which has boundary information for this grid.
Definition: amr_module.f90:80
integer, parameter cornyhi
y-coordinate of the upper border of this grid
Definition: amr_module.f90:149
integer, parameter storeaux
pointer to the address of memory storing auxiliary data on this grid
Definition: amr_module.f90:120
real(kind=8), dimension(:), allocatable alloc
Definition: amr_module.f90:218
integer, parameter ffluxptr
pointer to the address of memory storing fluxes in a layer around the grid, to be used in conservatio...
Definition: amr_module.f90:97