diff options
author | allen <allen@f5a6acaf-da7d-456b-b0a8-35edbc60b392> | 2001-12-19 13:11:07 +0000 |
---|---|---|
committer | allen <allen@f5a6acaf-da7d-456b-b0a8-35edbc60b392> | 2001-12-19 13:11:07 +0000 |
commit | a116af30186ae20295586359e60f73499514ed45 (patch) | |
tree | 3a03db459d1432b9c335591964b6d313050eeb2e /src | |
parent | 2f1d18ab9d75324b8084541941c699f5eafbae6f (diff) |
Adding Gaussian solution for the point r=0 (thanks to Horst Beyer for this)
git-svn-id: http://svn.cactuscode.org/arrangements/CactusWave/IDScalarWave/trunk@51 f5a6acaf-da7d-456b-b0a8-35edbc60b392
Diffstat (limited to 'src')
-rw-r--r-- | src/InitialData.F77 | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/src/InitialData.F77 b/src/InitialData.F77 index d3af842..9b56815 100644 --- a/src/InitialData.F77 +++ b/src/InitialData.F77 @@ -73,17 +73,15 @@ 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 ; + if (rp .eq. 0.0) then + phi_p(i,j,k) = (1.0 - 2.0*dt**2/sigma)*exp(-dt**2/sigma) + else + 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 ) + endif end do end do |