From ef3600aa5b1480f5cdde8b1eabd32adf130bf79d Mon Sep 17 00:00:00 2001 From: allen Date: Tue, 4 Dec 2001 20:50:45 +0000 Subject: Changing Gaussian initial data for the scalar wave equation to be time symmetric Unfortunately changes all testsuites. git-svn-id: http://svn.cactuscode.org/arrangements/CactusWave/IDScalarWave/trunk@49 f5a6acaf-da7d-456b-b0a8-35edbc60b392 --- src/InitialData.F77 | 35 +++++++++++++++++++---------------- 1 file changed, 19 insertions(+), 16 deletions(-) diff --git a/src/InitialData.F77 b/src/InitialData.F77 index fc90ac3..d3af842 100644 --- a/src/InitialData.F77 +++ b/src/InitialData.F77 @@ -37,6 +37,7 @@ INTEGER i,j,k CCTK_REAL dt,omega, pi + CCTK_REAL xp,yp,zp,rp pi = 4.0*atan(1.0) @@ -65,12 +66,24 @@ do j=1, cctk_lsh(2) do i=1, cctk_lsh(1) - phi(i,j,k) = amplitude*exp( - & -(sqrt(x(i,j,k)**2 - & +y(i,j,k)**2+z(i,j,k)**2)-radius)**2/sigma**2) - phi_p(i,j,k) = amplitude*exp( - & -(sqrt(x(i,j,k)**2 - & +y(i,j,k)**2+z(i,j,k)**2)-radius-dt)**2/sigma**2) + xp=x(i,j,k) + yp=y(i,j,k) + zp=z(i,j,k) + + rp = sqrt(xp*xp+yp*yp+zp*zp) + + phi(i,j,k) = amplitude*exp(-(rp-radius)**2/sigma**2) + phi_p(i,j,k) = amplitude/2.0*(rp-dt)/rp* + & exp( - ( (rp-radius-dt)/sigma)**2 ) + & + amplitude/2.0*(rp+dt)/rp* + & exp( - ( (rp-radius+dt)/sigma)**2 ) + + +c phi_p[index] = amplitude/2.0*(R-dt)/R* +c exp( - sqr( (R - radius - dt)/ sigma ) ) +c + amplitude/2.0*(R+dt)/R* +c exp( - sqr( (R - radius + dt)/ sigma ) ) +c ; end do end do @@ -112,16 +125,6 @@ c Use kx,ky,kz as number of modes in each direction. end if -c zero out corners of phi next */ -c phi_n(1, 1, 1) = 0.0 -c phi_n(1, 1, cctk_lsh(3)) = 0.0 -c phi_n(1, cctk_lsh(2), 1) = 0.0 -c phi_n(1, cctk_lsh(2), cctk_lsh(3)) = 0.0 -c phi_n(cctk_lsh(1), 1, 1) = 0.0 -c phi_n(cctk_lsh(1), 1, cctk_lsh(3)) = 0.0 -c phi_n(cctk_lsh(1), cctk_lsh(2), 1) = 0.0 -c phi_n(cctk_lsh(1), cctk_lsh(2), cctk_lsh(3)) = 0.0 - return end -- cgit v1.2.3