aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--param.ccl5
-rw-r--r--src/InitialData.c28
2 files changed, 22 insertions, 11 deletions
diff --git a/param.ccl b/param.ccl
index fe6f8e7..3d3c0cb 100644
--- a/param.ccl
+++ b/param.ccl
@@ -12,10 +12,13 @@ KEYWORD initial_data "Type of initial data"
"plane" :: "Plane wave"
"gaussian" :: "Gaussian wave"
"box" :: "Box wave"
+ "none" :: "No initial data, zero phi"
} "gaussian"
private:
+## Parameter for initial wavepulses
+
REAL radius "The radius of the gaussian wave"
{
0:* :: "Positive"
@@ -30,10 +33,12 @@ REAL kx "The wave number in the x-direction"
{
*:* :: "No restriction"
} 4.0
+
REAL ky "The wave number in the y-direction"
{
*:* :: "No restriction"
} 0.0
+
REAL kz "The wave number in the z-direction"
{
*:* :: "No restriction"
diff --git a/src/InitialData.c b/src/InitialData.c
index c7ac1d3..0a1248a 100644
--- a/src/InitialData.c
+++ b/src/InitialData.c
@@ -139,18 +139,24 @@ void IDScalarWaveC_InitialData(CCTK_ARGUMENTS)
}
}
}
+ else if (CCTK_Equals(initial_data, "none"))
+ {
+ for(k=0; k<cctk_lsh[2]; k++)
+ {
+ for(j=0; j<cctk_lsh[1]; j++)
+ {
+ for(i=0; i<cctk_lsh[0]; i++)
+ {
+ index = CCTK_GFINDEX3D(cctkGH,i,j,k);
+
+ phi[index] = 0.0;
+
+ phi_p[index] = 0.0;
+ }
+ }
+ }
+ }
- /* zero out corners of phi next */
- /*
- phi_n[CCTK_GFINDEX3D(cctkGH, 0, 0, 0)] = 0;
- phi_n[CCTK_GFINDEX3D(cctkGH, 0, 0, cctk_lsh[2]-1)] = 0;
- phi_n[CCTK_GFINDEX3D(cctkGH, 0, cctk_lsh[1]-1, 0)] = 0;
- phi_n[CCTK_GFINDEX3D(cctkGH, 0, cctk_lsh[1]-1, cctk_lsh[2]-1)] = 0;
- phi_n[CCTK_GFINDEX3D(cctkGH, cctk_lsh[0]-1, 0, 0)] = 0;
- phi_n[CCTK_GFINDEX3D(cctkGH, cctk_lsh[0]-1, 0, cctk_lsh[2]-1)] = 0;
- phi_n[CCTK_GFINDEX3D(cctkGH, cctk_lsh[0]-1, cctk_lsh[1]-1, 0)] = 0;
- phi_n[CCTK_GFINDEX3D(cctkGH, cctk_lsh[0]-1, cctk_lsh[1]-1, cctk_lsh[2]-1)] = 0;
- */
return;
}