AMROC Main     Blockstructured Adaptive Mesh Refinement in object-oriented C++


Main Page   Class Hierarchy   Compound List   File List  

Makefile  combl.f  cuser.i  init3.f  physbd3.f  rpn3eug.f  flx3eu.f  rec3eu.f  chk3eu.f  flg3eu.f  Problem.h  amr_main.C 

applications/euler/3d/BackwardFacingStep/src/init3.f

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
       do 60 k = 1, mz
          do 60 i = 1-mbc, mx+mbc
             do 60 j = 1-mbc, my+mbc
                call cellave(x(i)-dx/2.d0,y(j)-dy/2.d0,dx,dy,wl)
                do 60 m = 1,meqn
                   rho = (1.d0-wl)*rhoamb  + wl*rhoshk
                   u =   (1.d0-wl)*uamb + wl*ushk
                   v =   (1.d0-wl)*vamb	+ wl*vshk
                   w =   (1.d0-wl)*wamb	+ wl*wshk
                   p =   (1.d0-wl)*pamb	+ wl*pshk
                   q(1,i,j,k) = rho
                   q(2,i,j,k) = rho * u
                   q(3,i,j,k) = rho * v
                   q(4,i,j,k) = rho * w
                   q(5,i,j,k) = p/gamma1 + .5d0*rho*(u**2+v**2+w**2)
 60    continue         
c
       return
       end


Quickstart     Users Guide     Programmers Reference     Installation      Examples     Download



AMROC Main      Home      Contact
last update: 06/01/04