aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorallen <allen@071ba4cb-2270-47cd-a45a-3e542e115664>2001-12-04 20:50:46 +0000
committerallen <allen@071ba4cb-2270-47cd-a45a-3e542e115664>2001-12-04 20:50:46 +0000
commit639739da00acf482a26019d5c3cc5e7a6727b337 (patch)
treeccf6c1b76c20dccfbf792174a56920cf1b460fe7
parent00598562e1179209cfcb57acce85897303494535 (diff)
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/IDScalarWaveC/trunk@19 071ba4cb-2270-47cd-a45a-3e542e115664
-rw-r--r--src/InitialData.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/InitialData.c b/src/InitialData.c
index 196b567..1ecc970 100644
--- a/src/InitialData.c
+++ b/src/InitialData.c
@@ -97,8 +97,12 @@ void IDScalarWaveC_InitialData(CCTK_ARGUMENTS)
R = sqrt(X*X + Y*Y + Z*Z);
phi[index] = amplitude*exp( - sqr( (R - radius) / sigma ) );
- phi_p[index] = amplitude*exp( - sqr( (R - radius - dt) / sigma ) );
+ phi_p[index] = amplitude/2.0*(R-dt)/R*
+ exp( - sqr( (R - radius - dt)/ sigma ) )
+ + amplitude/2.0*(R+dt)/R*
+ exp( - sqr( (R - radius + dt)/ sigma ) )
+ ;
}
}
}