c $Header: /home/proj/vtfng/vtf/amroc/rim/src/mkprimitives.f,v 1.2 2004/12/01 20:51:35 ralf Exp $ subroutine mkprimitives(q,nx,ny,nbc,neqn) implicit double precision (a-h,o-z) c include 'rim2d.i' c dimension q(neqn,1-nbc:nx+nbc,1-nbc:ny+nbc) c if(neqn.ne.6) write(0,*) & 'mkprimitives: Number of equations is not the one expected' c do j=1-nbc,ny+nbc do i=1-nbc,nx+nbc den(i,j)=q(1,i,j) u(i,j)=q(2,i,j)/den(i,j) v(i,j)=q(3,i,j)/den(i,j) z(i,j)=q(5,i,j)/den(i,j) gamma(i,j)=q(6,i,j) p(i,j)=(q(4,i,j)/den(i,j)-q0*z(i,j) & -0.5*(u(i,j)*u(i,j)+v(i,j)*v(i,j))) & *den(i,j)*(gamma(i,j)-1.d0) enddo enddo c return end c c subroutine mkconserved(q,nx,ny,nbc,neqn) implicit double precision (a-h,o-z) c include 'rim2d.i' c dimension q(neqn,1-nbc:nx+nbc,1-nbc:ny+nbc) c if(neqn.ne.6) write(0,*) & 'mkconserved: Number of equations is not the one expected' c do j=1,ny do i=1,nx q(1,i,j)=den(i,j) q(2,i,j)=den(i,j)*u(i,j) q(3,i,j)=den(i,j)*v(i,j) q(4,i,j)=den(i,j)*(p(i,j)/den(i,j)/(gamma(i,j)-1.d0) & +z(i,j)*q0 & +0.5*(u(i,j)*u(i,j)+v(i,j)*v(i,j))) q(5,i,j)=den(i,j)*z(i,j) q(6,i,j)=gamma(i,j) enddo enddo c return end