1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196
|
!------------------------------------------------------------------------------
! physicaldata.fh
!------------------------------------------------------------------------------
!Pre-Processor Control
integer k1d
parameter(k1d=1)
!-----------------------------------------------------------------
! physicaldata.fh
! set physical dimension of model and number of edges on each grid block
integer ndim,nbedges
#if N_DIM == 3
parameter(ndim=3)
#endif
#if N_DIM == 2
parameter(ndim=2)
#endif
#if N_DIM == 1
parameter(ndim=1)
#endif
! l2p5d needs to be declared not matter what the dimension of the
! problem is set to !
integer l2p5d
parameter(l2p5d=0) !<<< USER EDIT
! 1 if 2.5D
! 0 if 2 or 3D
parameter(nbedges=ndim*2**(ndim-1))
! an increment variable for the z dimension to enable the same code to
! work for 2D or 3D models.
integer k3d
parameter(k3d=(ndim-1)/2)
integer k2d
parameter(k2d=ndim/2)
! set size of grid blocks
! The spatial relationship between grid points in parents
! and their children is subtly different depending on whether
! the block dimensions (ie nxb,nyb,nzb) are even or odd. This has
! significant consequences when defining interpolation within
! restriction or prolongation operations.
integer nxb,nyb,nzb,maxdim
parameter(nxb=8) !<<< USER EDIT
#if N_DIM >= 2
parameter(nyb=8) !<<< USER EDIT
#else
parameter(nyb=1)
#endif
#if N_DIM == 3
parameter(nzb=8) !<<< USER EDIT
#else
parameter(nzb=1)
#endif
parameter(maxdim=max(nxb,nyb,nzb))
! these guard cell offsets are required to accomodate differences
! in cases when block dimensions are odd or even
integer gc_off_x,gc_off_y,gc_off_z
parameter(gc_off_x=mod(nxb,2))
parameter(gc_off_y=mod(nyb,2))
parameter(gc_off_z=mod(nzb,2))
! set the maximum number of blocks per processor
integer maxblocks
#ifdef MAXBLOCKS
parameter (maxblocks = MAXBLOCKS)
#else
#if N_DIM == 3
parameter (maxblocks = 200) !<<< USER EDIT
#else /* N_DIM < 3 */
parameter (maxblocks = 500) !<<< USER EDIT
#endif /*N_DIM*/
#endif /*MAXBLOCKS*/
!..this include file is very important at this location, as it sets a
!..parameter (ionmax) that determines the array sizes and do-loop limits
!..of the mesh, hydro, eos and burn modules. it touches just about everything.
#include "numfluids.fh"
integer nuc2
parameter (nuc2 = ionmax)
! set number of unknowns associated with each grid cell
integer nvar
parameter(nvar=nuc2+11) !<<< USER EDIT
integer nvar2
parameter(nvar2=6)
integer nvarsm
parameter (nvarsm=2)
! set the number of guard cell layers at each boundary
integer nguard
parameter(nguard=4) !<<< USER EDIT
! common block storing the solution for cell-centered quantities.
! unksm stores copies of global variables which DO NOT need guard cells
! AND do not need to be saved from one timestep to the next !!!
integer il_bnd,iu_bnd
integer jl_bnd,ju_bnd
integer kl_bnd,ku_bnd
parameter(il_bnd=1, iu_bnd=nxb+2*nguard)
parameter(jl_bnd=1, ju_bnd=nyb+2*nguard*k2d)
parameter(kl_bnd=1, ku_bnd=nzb+2*nguard*k3d)
integer nxlo,nylo,nzlo,nxhi,nyhi,nzhi
parameter (nxlo=nguard+1,nylo=nguard*k2d+1,nzlo=nguard*k3d+1)
parameter (nxhi=nguard+nxb)
parameter (nyhi=nguard*k2d+nyb)
parameter (nzhi=nguard*k3d+nzb)
common/solution_cc/ &
unk(nvar,il_bnd:iu_bnd,jl_bnd:ju_bnd,kl_bnd:ku_bnd,maxblocks), &
unk2(nvar2,il_bnd:iu_bnd,maxblocks), &
unk3(nvar2,jl_bnd:ju_bnd,maxblocks), &
unk4(nvar2,kl_bnd:ku_bnd,maxblocks), &
unksm(nvarsm,nxlo:nxhi,nylo:nyhi,nzlo:nzhi,maxblocks)
double precision unk,unk2,unk3,unk4,unksm
! The number of data words needed on a cell face is set by nfacevar.
!
integer nfacevar
! 2 added to store strong fields at faces for all components of B
parameter(nfacevar=0) !<<< USER EDIT
integer nbndvar
parameter(nbndvar=max(1,nfacevar))
integer maxblocksf
parameter(maxblocksf= 1+(maxblocks-1)*min(1,nfacevar) )
! set data length of grid blocks
integer len_block
parameter(len_block=iu_bnd*ju_bnd*ku_bnd*nvar)
! common block for timestep control
integer maxlevels
parameter(maxlevels=20)
common/timecntl/ time_loc(maxblocks),dtlevel(maxlevels),ldtcomplete(maxblocks)
double precision time_loc,dtlevel
logical ldtcomplete
! To average fluxes set red_f = .25.
! To sum fluxes set red_f = 1.0.
! changed -- 2-24-00
! we are now converting the flux densities to fluxes before the call to
! amr_flux_conserve. This is to get the proper geometry factors included
! in non-cartesian cases. The fluxes are converted back after the call.
!
! red_f is set according to dimension, to sum instead of average
double precision red_f
! parameter(red_f = 0.25)
#if N_DIM == 1
parameter (red_f = 0.25)
#elif N_DIM == 2
parameter (red_f = 0.5)
#elif N_DIM == 3
parameter (red_f = 1.0)
#endif
!-----------------------------------------------------------------
! include header file defining data structure on cell faces
#include "block_boundary_data.fh"
!-----------------------------------------------------------------
|