6 subroutine gfixup(lbase, lfnew, nvar, naux, newnumgrids,
10 implicit double precision (a-h,o-z)
12 integer omp_get_thread_num, omp_get_max_threads
13 integer mythread/0/, maxthreads/1/
14 integer newnumgrids(
maxlv), listnewgrids(maxnumnewgrids)
30 call putsp(lbase,lbase,nvar,naux)
32 1
if (level .gt.
lfine)
go to 4
33 call putsp(lbase,level,nvar,naux)
35 2
if (mptr .eq. 0)
go to 3
40 nwords = mitot*mjtot*nvar
52 5
if (lcheck .gt.
mxnest)
go to 99
61 call prepnewgrids(listnewgrids,newnumgrids(lcheck),lcheck)
65 do j = 1, newnumgrids(lcheck)
66 mptr = listnewgrids(j)
71 loc =
igetsp(mitot * mjtot * nvar)
74 locaux =
igetsp(mitot * mjtot * naux)
91 do j = 1, newnumgrids(lcheck)
92 mptr = listnewgrids(j)
104 if (naux .gt. 0)
then 135 call filval(
alloc(loc),mitot,mjtot,hx,hy,lcheck,time,
138 3 mptr,ilo,ihi,jlo,jhi,
139 4
alloc(locaux),naux)
148 85
if (mptr .eq. 0)
go to 90
154 if (naux .gt. 0)
then 171 do 110 level = lbase+1, levend
173 105
if (mptr .eq. 0)
go to 110
178 nwords = mitot*mjtot*nvar
203 implicit double precision (a-h,o-z)
204 integer listnewgrids(num)
208 listnewgrids(j) = mptr
212 if (mptr .ne. 0)
then 213 write(*,*)
" Error in routine setting up grid array " integer, parameter timemult
current simulation time on this grid
integer, parameter cornxlo
x-coordinate of the left border of this grid
function igetsp(nwords)
Allocate contiguous space of length nword in main storage array alloc.
subroutine filval(val, mitot, mjtot, dx, dy, level, time, mic, mjc, xleft, xright, ybot, ytop, nvar, mptr, ilo, ihi, jlo, jhi, aux, naux)
Fill grid mptr on level level by copying values from OLD level level grids if available, otherwise by interpolating values from coarser grids.
subroutine reclam(index, nwords)
real(kind=8), dimension(maxlv) hyposs
real(kind=8), dimension(maxlv) hxposs
integer, dimension(maxlv) newstl
integer, parameter ndihi
global i index of right border of this grid
subroutine freebndrylist(mold)
Free the linked list of intersecting "boundary" grids for grid 'mold' that is no longer active...
integer, dimension(nsize, maxgr) node
real(kind=8), dimension(rsize, maxgr) rnode
subroutine putnod(mptr)
Return mptr node to the linked list kept in node array.
integer, parameter ndilo
global i index of left border of this grid
integer, parameter ndjlo
global j index of lower border of this grid
integer, parameter store1
pointer to the address of memory storing the first copy of solution data on this grid, usually for storing new solution
integer, dimension(maxlv) lstart
integer, parameter store2
pointer to the address of memory storing the second copy of solution data on this grid...
subroutine gfixup(lbase, lfnew, nvar, naux, newnumgrids, maxnumnewgrids)
Interpolate initial values for the newly created grids, whose levels start from level lbase+1...
integer, dimension(maxlv) intraty
subroutine prepnewgrids(listnewgrids, num, level)
integer, parameter ndjhi
global j index of upper border of this grid
integer, parameter cornylo
y-coordinate of the lower border of this grid
integer, dimension(maxlv) intratx
integer, parameter levelptr
node number (index) of next grid on the same level
integer, parameter cornxhi
x-coordinate of the right border of this grid
The module contains the definition of a "node descriptor" as well as other global variables used duri...
integer, parameter cornyhi
y-coordinate of the upper border of this grid
subroutine putsp(lbase, level, nvar, naux)
Reclaim list space in nodes cfluxptr and ffluxptr for all grids at level level
integer, parameter storeaux
pointer to the address of memory storing auxiliary data on this grid
real(kind=8), dimension(:), allocatable alloc