aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorallen <allen@f5a6acaf-da7d-456b-b0a8-35edbc60b392>2001-12-19 13:11:07 +0000
committerallen <allen@f5a6acaf-da7d-456b-b0a8-35edbc60b392>2001-12-19 13:11:07 +0000
commita116af30186ae20295586359e60f73499514ed45 (patch)
tree3a03db459d1432b9c335591964b6d313050eeb2e
parent2f1d18ab9d75324b8084541941c699f5eafbae6f (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
-rw-r--r--doc/documentation.tex7
-rw-r--r--src/InitialData.F7718
2 files changed, 14 insertions, 11 deletions
diff --git a/doc/documentation.tex b/doc/documentation.tex
index 3a63740..5cf9d16 100644
--- a/doc/documentation.tex
+++ b/doc/documentation.tex
@@ -77,7 +77,12 @@ The initial profile is
\begin{equation}
\phi(r) = A \exp (- r^2/\sigma)
\end{equation}
-and is set with the parameters
+with the solution at the origin being
+\begin{equation}
+\Psi(r=0,t) = \left(1-2\frac{t^2}{\sigma}\right)\exp(-t^2/\sigma)
+\end{equation}
+
+The Gaussian solution is set with the parameters
\begin{itemize}
\item {\tt amplitude} = $A$
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