
!---------------------------------------------------------------------------
! data_1blk.fh
!---------------------------------------------------------------------------
!
! This file declares the storage space used to handle the `current
! working block' when the user decides not to reserve permanent
! storage space for guardcells for all blocks, but instead to
! fill guardcells as needed. This strategy requires 2 working blocks,
! one for the leaf node and one for its parent.
! $RCSfile: data_1blk.html,v $
! $Revision: 1.1.1.1 $
! $Date: 2001/11/20 22:20:29 $
!
! Set index bounds with guardcells included.
integer il_bnd1,iu_bnd1
integer jl_bnd1,ju_bnd1
integer kl_bnd1,ku_bnd1
parameter(il_bnd1=1,iu_bnd1=nxb+2*nguard)
parameter(jl_bnd1=1,ju_bnd1=nyb+2*nguard*k2d)
parameter(kl_bnd1=1,ku_bnd1=nzb+2*nguard*k3d)
!
! Set length of messages required when working blocks are to be passed.
integer len_block1
integer len_blockfx1,len_blockfy1,len_blockfz1
parameter(len_block1 = iu_bnd1*ju_bnd1*ku_bnd1*nvar)
parameter(len_blockfx1 = (iu_bnd1+1)*ju_bnd1*ku_bnd1)
parameter(len_blockfy1 = iu_bnd1*(ju_bnd1+k2d)*ku_bnd1)
parameter(len_blockfz1 = iu_bnd1*ju_bnd1*(ku_bnd1+k3d))
!
! Set the number of padded blocks required for the 1blk guardcell routines.
! This should be 2 in almost all circumstances, one block for the current
! working leaf node, and one for it's parent.
integer npblks
parameter(npblks=2)
! common block storing the solution for cell-centered quantities.
common/solution_cc_1blk/
. unk1(nvar,il_bnd1:iu_bnd1,jl_bnd1:ju_bnd1,kl_bnd1:ku_bnd1,
. npblks)
real unk1
! common block storing the solution for cell-face-centered quantities.
common/solution_fc_1blk/
. facevarx1(nbndvar,il_bnd1:iu_bnd1+1,jl_bnd1:ju_bnd1,
. kl_bnd1:ku_bnd1,npblks)
. ,facevary1(nbndvar,il_bnd1:iu_bnd1,jl_bnd1:ju_bnd1+k2d,
. kl_bnd1:ku_bnd1,npblks)
. ,facevarz1(nbndvar,il_bnd1:iu_bnd1,jl_bnd1:ju_bnd1,
. kl_bnd1:ku_bnd1+k3d,npblks)
real facevarx1,facevary1,facevarz1
! temporary copy of solution to be used when storing solution prior
! to use of amr_1blk_guardcell
integer maxblocks_gt,maxblocksf_gt
parameter(maxblocks_gt=(maxblocks-1)*(1-npgs)+1)
parameter(maxblocksf_gt=(maxblocksf-1)*(1-npgs)+1)
common/gtsolution/
. gt_unk(nvar,il_bnd:iu_bnd,jl_bnd:ju_bnd,kl_bnd:ku_bnd,
. maxblocks_gt)
real gt_unk
common/gtblockface/
. gt_facevarx(nbndvar,il_bnd:iu_bnd+1,jl_bnd:ju_bnd,
. kl_bnd:ku_bnd,maxblocksf_gt)
. ,gt_facevary(nbndvar,il_bnd:iu_bnd,jl_bnd:ju_bnd+k2d,
. kl_bnd:ku_bnd,maxblocksf_gt)
. ,gt_facevarz(nbndvar,il_bnd:iu_bnd,jl_bnd:ju_bnd,
. kl_bnd:ku_bnd+k3d,maxblocksf_gt)
real gt_facevarx,gt_facevary,gt_facevarz
!
! Common block used to control data caching. This helps to avoid unnecessary
! repetition of some guardcell and surrounding-block mapping operations
common/cache_p1/pcache_blk_u,pcache_pe_u,
. pcache_blk_w,pcache_pe_w,lnew_parent
integer pcache_blk_u,pcache_pe_u
integer pcache_blk_w,pcache_pe_w
logical lnew_parent