c Mahc_Init_Data: Various Initial Data Routines for Mahc_Evolve c Copyright (C) 2001 Mark Miller /*@@ @file shocktube.F @date December 1999 @author Mark Miller @desc Various shocktube configurations for MAHC. @enddesc @@*/ #include "cctk.h" #include "cctk_Parameters.h" #include "cctk_Arguments.h" /*@@ @routine shocktube @date December 1999 @author Mark Miller @desc Various shocktube configurations for MAHC. @enddesc @calls @calledby @history @endhistory @@*/ subroutine shocktube(CCTK_FARGUMENTS) implicit none DECLARE_CCTK_FARGUMENTS DECLARE_CCTK_PARAMETERS INTEGER CCTK_Equals c Local Vars integer didit,i,j,k,nx,ny,nz nx = cctk_lsh(1) ny = cctk_lsh(2) nz = cctk_lsh(3) didit = 0 if (CCTK_Equals(shocktube_type,'diagshock') == 1) then didit = 1 do i=1,nx do j=1,ny do k=1,nz if(x(i,j,k)+y(i,j,k)+z(i,j,k) .lt. 0.0d0) then dens(i,j,k) = 10.0 tau(i,j,k) = 20.0 sx(i,j,k) = 0.0 sy(i,j,k) = 0.0 sz(i,j,k) = 0.0 else dens(i,j,k) = 1.0 tau(i,j,k) = 1.0d-6 sx(i,j,k) = 0.0 sy(i,j,k) = 0.0 sz(i,j,k) = 0.0 endif enddo enddo enddo endif if (didit .eq. 0) then call CCTK_WARN(1,"Warning: shocktube did not set initial data") endif c initial guess for primative vars rho = dens press = (mahc_eos_gamma - 1.0d0)*tau eps = tau/rho gxx = 1.0d0 gyy = 1.0d0 gzz = 1.0d0 gxy = 0.0d0 gxz = 0.0d0 gyz = 0.0d0 return end