aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpollney <pollney@b2a53a04-0f4f-0410-87ed-f9f25ced00cf>2006-10-18 12:04:19 +0000
committerpollney <pollney@b2a53a04-0f4f-0410-87ed-f9f25ced00cf>2006-10-18 12:04:19 +0000
commit2d323c5f7b3725edd86bb0e4bb8c0ab01878a249 (patch)
tree5cf97b8883ff3a4ca9263414afc195b71ab5b8b9
parentb089fd63efcd85694eef04f769e6562e86ba1ec3 (diff)
Added center_offset parameter to allow the initial data BHs to be
shifted around the grid. git-svn-id: http://svn.einsteintoolkit.org/cactus/EinsteinInitialData/TwoPunctures/trunk@70 b2a53a04-0f4f-0410-87ed-f9f25ced00cf
-rw-r--r--param.ccl5
-rw-r--r--src/TwoPunctures.c20
2 files changed, 25 insertions, 0 deletions
diff --git a/param.ccl b/param.ccl
index 840a657..8d650a4 100644
--- a/param.ccl
+++ b/param.ccl
@@ -122,6 +122,11 @@ REAL par_S_minus[3] "spin of the m- puncture"
(*:*) :: ""
} 0.0
+REAL center_offset[3] "offset b=0 to position (x,y,z)"
+{
+ (*:*) :: ""
+} 0.0
+
REAL initial_lapse_psi_exponent "Exponent n for psi^-n initial lapse profile"
{
(*:*) :: "Should be negative"
diff --git a/src/TwoPunctures.c b/src/TwoPunctures.c
index cc48a82..a5164f6 100644
--- a/src/TwoPunctures.c
+++ b/src/TwoPunctures.c
@@ -307,6 +307,16 @@ TwoPunctures (CCTK_ARGUMENTS)
}
for (k = imin[2]; k < imax[2]; ++k)
+ for (j = imin[1]; j < imax[1]; ++j)
+ for (i = imin[0]; i < imax[0]; ++i)
+ {
+ int ijk = CCTK_GFINDEX3D(cctkGH, i, j, k);
+ x[ijk] -= center_offset[0];
+ y[ijk] -= center_offset[1];
+ z[ijk] -= center_offset[2];
+ }
+
+ for (k = imin[2]; k < imax[2]; ++k)
{
for (j = imin[1]; j < imax[1]; ++j)
{
@@ -543,6 +553,16 @@ TwoPunctures (CCTK_ARGUMENTS)
} /* for j */
} /* for k */
+ for (k = imin[2]; k < imax[2]; ++k)
+ for (j = imin[1]; j < imax[1]; ++j)
+ for (i = imin[0]; i < imax[0]; ++i)
+ {
+ int ijk = CCTK_GFINDEX3D(cctkGH, i, j, k);
+ x[ijk] += center_offset[0];
+ y[ijk] += center_offset[1];
+ z[ijk] += center_offset[2];
+ }
+
if (use_sources && rescale_sources)
{
Rescale_Sources(cctkGH,