2D AMRCLAW
Functions/Subroutines
prepbigstep.f File Reference

Go to the source code of this file.

Functions/Subroutines

subroutine prepbigstep (nvar, naux, lcheck, mptr, nx, ny, midub, mjdub, valbgc, auxbgc, mi2tot, mj2tot)
 

Function/Subroutine Documentation

◆ prepbigstep()

subroutine prepbigstep (   nvar,
  naux,
  lcheck,
  mptr,
  nx,
  ny,
  midub,
  mjdub,
double precision, dimension(nvar,mi2tot,mj2tot)  valbgc,
double precision, dimension(naux,mi2tot,mj2tot)  auxbgc,
  mi2tot,
  mj2tot 
)

Definition at line 6 of file prepbigstep.f.

References amr_module::alloc, auxcoarsen(), amr_module::auxtype, bound(), coarsen(), copysol(), amr_module::cornxlo, amr_module::cornylo, amr_module::evol, amr_module::hxposs, amr_module::hyposs, amr_module::needs_to_be_set, amr_module::nghost, amr_module::node, amr_module::possk, amr_module::rnode, setaux(), stepgrid(), amr_module::store2, and amr_module::timemult.

Referenced by errest().

6 
7  use amr_module
8  implicit double precision (a-h,o-z)
9 
10  double precision valdub(nvar,midub,mjdub)
11  double precision auxdub(naux,midub,mjdub)
12  double precision valbgc(nvar,mi2tot,mj2tot)
13  double precision auxbgc(naux,mi2tot,mj2tot)
14  dimension fp(nvar,mi2tot,mj2tot),gp(nvar,mi2tot,mj2tot)
15  dimension fm(nvar,mi2tot,mj2tot),gm(nvar,mi2tot,mj2tot)
16 
17  hx = hxposs(lcheck)
18  hy = hyposs(lcheck)
19  hx2 = 2.d0*hx
20  hy2 = 2.d0*hy
21  dt = possk(lcheck)
22  dt2 = 2. * dt
23  time = rnode(timemult,mptr)
24  tpre = time - dt
25 
26  mitot = nx + 2*nghost
27  mjtot = ny + 2*nghost
28  ng2 = 2*nghost
29  locold = node(store2,mptr)
30  xlow = rnode(cornxlo,mptr) - nghost*hx2
31  ylow = rnode(cornylo,mptr) - nghost*hy2
32 c
33 
34 c # transfer soln. into grid with twice the ghost cells
35  call copysol(valdub,alloc(locold),nvar,mitot,mjtot,
36  1 nghost,midub,mjdub,ng2)
37 
38 c
39  if (naux .gt. 0) then
40  xl = rnode(cornxlo, mptr)
41  yb = rnode(cornylo, mptr)
42  mx = midub - 4*nghost
43  my = mjdub - 4*nghost
44  auxdub = needs_to_be_set ! signal that needs a val
45 
46  call setaux(2*nghost,mx,my,xl,yb,hx,hy,
47  & naux,auxdub)
48  call auxcoarsen(auxdub,midub,mjdub,
49  1 auxbgc,mi2tot,mj2tot,naux,auxtype)
50  endif
51 
52 c # fill it - use enlarged (before coarsening) aux arrays
53  call bound(tpre,nvar,ng2,valdub,midub,mjdub,mptr,
54  1 auxdub,naux)
55 
56 c coarsen by 2 in every direction
57  call coarsen(valdub,midub,mjdub,
58  1 valbgc,mi2tot,mj2tot,nvar)
59 
60  call stepgrid(valbgc,fm,fp,gm,gp,
61  1 mi2tot,mj2tot,nghost,
62  2 dt2,dtnew2,hx2,hy2,nvar,
63  3 xlow,ylow,tpre,mptr,naux,auxbgc)
64 
65 c update counts for error estimation work
66  evol = evol + (nx/2)*(ny/2)
67 
68  return
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) evol
Definition: amr_module.f90:237
subroutine coarsen(valdub, midub, mjdub, valbgc, mi2tot, mj2tot, nvar)
Definition: coarsen.f:5
real(kind=8), dimension(maxlv) hyposs
Definition: amr_module.f90:193
real(kind=8), dimension(maxlv) hxposs
Definition: amr_module.f90:193
subroutine copysol(valbig, val, nvar, mitot, mjtot, nghost, midub, mjdub, ngbig)
Definition: copysol.f:6
integer, dimension(nsize, maxgr) node
Definition: amr_module.f90:198
real(kind=8), dimension(rsize, maxgr) rnode
Definition: amr_module.f90:193
subroutine update(level, nvar, naux)
Synchronize between all grids on level level and grids on level level+1.
Definition: update.f:17
real(kind=8), parameter needs_to_be_set
Definition: amr_module.f90:168
integer, parameter store2
pointer to the address of memory storing the second copy of solution data on this grid...
Definition: amr_module.f90:105
subroutine stepgrid(q, fm, fp, gm, gp, mitot, mjtot, mbc, dt, dtnew, dx, dy, nvar, xlow, ylow, time, mptr, maux, aux)
Take a time step on a single grid mptr and overwrite solution array q.
Definition: stepgrid.f:26
real(kind=8), dimension(maxlv) possk
Definition: amr_module.f90:193
subroutine bound(time, nvar, ng, valbig, mitot, mjtot, mptr, aux, naux)
This routine sets the boundary values for a given grid at level level.
Definition: bound.f90:52
integer, parameter cornylo
y-coordinate of the lower border of this grid
Definition: amr_module.f90:145
subroutine auxcoarsen(auxdub, midub, mjdub, auxbgc, mi2tot, mj2tot, naux, auxtype)
Definition: auxcoarsen.f:6
character(len=10), dimension(:), allocatable auxtype
Definition: amr_module.f90:252
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 setaux(mbc, mx, my, xlower, ylower, dx, dy, maux, aux)
Definition: setaux.f90:2
real(kind=8), dimension(:), allocatable alloc
Definition: amr_module.f90:218
Here is the call graph for this function:
Here is the caller graph for this function: