Blockstructured Adaptive Mesh Refinement in object-oriented C++
c c c ===================================================== subroutine ic(maxmx,maxmy,maxmz,meqn,mbc,mx,my,mz, & x,y,z,dx,dy,dz,q) c ===================================================== c implicit double precision (a-h,o-z) c include "cuser.i" c dimension q(meqn, 1-mbc:maxmx+mbc, 1-mbc:maxmy+mbc, & 1-mbc:maxmz+mbc) dimension x(1-mbc:maxmx+mbc),y(1-mbc:maxmy+mbc), & z(1-mbc:maxmz+mbc) c c # circle of high-density gas c idisc = 2 rc0 = .3d0 x0 = .4d0 y0 = .4d0 z0 = .4d0 rhol = 5.d0 rhor = 1.d0 pl = 5.d0 pr = 1.d0 do 60 k = 1, mz do 60 j = 1, my do 60 i = 1, mx if (dabs(x(i)-x0).lt.rc0) then r0 = sqrt(rc0**2-(x(i)-x0)**2) call cellave(y(j)-dy/2.d0,z(k)-dz/2.d0,dy,dz,wlx) else wlx = 0.d0 endif if (dabs(y(j)-y0).lt.rc0) then r0 = sqrt(rc0**2-(y(j)-y0)**2) call cellave(z(k)-dz/2.d0,x(i)-dx/2.d0,dz,dx,wly) else wly = 0.d0 endif if (dabs(z(k)-z0).lt.rc0) then r0 = sqrt(rc0**2-(z(k)-z0)**2) call cellave(x(i)-dx/2.d0,y(j)-dy/2.d0,dx,dy,wlz) else wlz = 0.d0 endif wl = (wlx+wly+wlz)/3.d0 q(1,i,j,k) = wl*rhol + (1.d0-wl)*rhor q(2,i,j,k) = 0.d0 q(3,i,j,k) = 0.d0 q(4,i,j,k) = 0.d0 q(5,i,j,k) = wl*(pl/gamma1) + (1.d0-wl)*(pr/gamma1) 60 continue return end
Quickstart Users Guide Programmers Reference Installation Examples Download
AMROC Main Home Contactlast update: 06/01/04