diff options
-rw-r--r-- | param.ccl | 10 | ||||
-rw-r--r-- | schedule.ccl | 22 | ||||
-rw-r--r-- | src/TwoPunctures.c | 23 |
3 files changed, 38 insertions, 17 deletions
@@ -14,7 +14,7 @@ EXTENDS KEYWORD initial_lapse { "twopunctures-antisymmetric" :: "antisymmetric lapse for two puncture black holes, -1 <= alpha <= +1" "twopunctures-averaged" :: "averaged lapse for two puncture black holes, 0 <= alpha <= +1" - "psi^n" :: "Based on the initial conformal factor" + "psi^n" :: "Based on the initial conformal factor" } @@ -147,3 +147,11 @@ BOOLEAN do_initial_debug_output "Output debug information about initial guess" { } "no" +BOOLEAN multiply_old_lapse "Multiply the old lapse to the new one" +{ +} "no" + +BOOLEAN schedule_in_ADMBase_InitialData "Schedule in or after ADMBase_InitialData" +{ +} "yes" + diff --git a/schedule.ccl b/schedule.ccl index bc410ca..4d6e4ee 100644 --- a/schedule.ccl +++ b/schedule.ccl @@ -12,10 +12,22 @@ if (CCTK_Equals(initial_data, "twopunctures")) LANG: C } "Check parameters and thorn needs" - SCHEDULE TwoPunctures IN ADMBase_InitialData + if (schedule_in_ADMBase_InitialData) { - LANG: C - STORAGE: puncture_u - SYNC: ADMBase::metric ADMBase::curv ADMBase::lapse - } "Create puncture black hole initial data" + SCHEDULE TwoPunctures IN ADMBase_InitialData + { + LANG: C + STORAGE: puncture_u + SYNC: ADMBase::metric ADMBase::curv ADMBase::lapse + } "Create puncture black hole initial data" + } + else + { + SCHEDULE TwoPunctures AT Initial AFTER ADMBase_InitialData BEFORE ADMBase_PostInitial AFTER TOV_Initial_Data + { + LANG: C + STORAGE: puncture_u + SYNC: ADMBase::metric ADMBase::curv ADMBase::lapse + } "Create puncture black hole initial data" + } } diff --git a/src/TwoPunctures.c b/src/TwoPunctures.c index cfde44d..0700ca3 100644 --- a/src/TwoPunctures.c +++ b/src/TwoPunctures.c @@ -190,22 +190,23 @@ TwoPunctures (CCTK_ARGUMENTS) static CCTK_REAL *F = NULL; static derivs u, v; CCTK_REAL admMass; + CCTK_REAL old_alp; if (! F) { /* Solve only when called for the first time */ F = dvector (0, ntotal - 1); allocate_derivs (&u, ntotal); allocate_derivs (&v, ntotal); - + if (use_sources) { - CCTK_INFO ("Solving puncture equation for BH-NS system"); + CCTK_INFO ("Solving puncture equation for BH-NS/NS-NS system"); } else { CCTK_INFO ("Solving puncture equation for BH-BH system"); } CCTK_VInfo (CCTK_THORNSTRING, "The two puncture masses are %g and %g", (double) par_m_minus, (double) par_m_plus); - + /* initialise to 0 */ for (j = 0; j < ntotal; j++) { @@ -289,13 +290,13 @@ TwoPunctures (CCTK_ARGUMENTS) CCTK_VInfo(CCTK_THORNSTRING, "%3d%% done", percent10*10); } - const int ind = CCTK_GFINDEX3D (cctkGH, i, j, k); - + const int ind = CCTK_GFINDEX3D (cctkGH, i, j, k); + CCTK_REAL r_plus = sqrt(pow(x[ind] - par_b, 2) + pow(y[ind], 2) + pow(z[ind], 2)); CCTK_REAL r_minus = sqrt(pow(x[ind] + par_b, 2) + pow(y[ind], 2) + pow(z[ind], 2)); - + CCTK_REAL U; switch (gsm) { @@ -338,6 +339,9 @@ TwoPunctures (CCTK_ARGUMENTS) CCTK_REAL Aij[3][3]; BY_Aijofxyz (x[ind], y[ind], z[ind], Aij); + if (multiply_old_lapse) + old_alp = alp[ind]; + if ((*conformal_state > 0) || (pmn_lapse)) { CCTK_REAL xp, yp, zp, rp, ir; @@ -450,11 +454,6 @@ TwoPunctures (CCTK_ARGUMENTS) kzz[ind] = Aij[2][2] / pow(psi1, 2); if (antisymmetric_lapse || averaged_lapse) { -/* const CCTK_REAL alp1 = ((1.0 - 0.5 * par_m_plus / r_plus) */ -/* / (1.0 + 0.5 * par_m_plus / r_plus)); */ -/* const CCTK_REAL alp2 = ((1.0 - 0.5 * par_m_minus / r_minus) */ -/* / (1.0 + 0.5 * par_m_minus / r_minus)); */ -/* alp[ind] = alp1 * alp2; */ alp[ind] = ((1.0 -0.5*par_m_plus/r_plus -0.5*par_m_minus/r_minus) /(1.0 +0.5*par_m_plus/r_plus +0.5*par_m_minus/r_minus)); @@ -474,6 +473,8 @@ TwoPunctures (CCTK_ARGUMENTS) alp[ind] = 0.5 * (1.0 + alp[ind]); } } + if (multiply_old_lapse) + alp[ind] *= old_alp; } } } |