diff options
-rw-r--r-- | interface.ccl | 18 | ||||
-rw-r--r-- | param.ccl | 42 | ||||
-rw-r--r-- | schedule.ccl | 180 |
3 files changed, 231 insertions, 9 deletions
diff --git a/interface.ccl b/interface.ccl index ece47c1..aec067b 100644 --- a/interface.ccl +++ b/interface.ccl @@ -2,9 +2,10 @@ # $Header$ implements: ehfinder -inherits: grid einstein +inherits: grid einstein boundary USES INCLUDE: Einstein.h +USES INCLUDE: Boundary.h USES INCLUDE: MoL.h public: @@ -21,5 +22,16 @@ CCTK_REAL slevel_set type=GF TimeLevels=1 CCTK_REAL dlevel_set type=GF TimeLevels=1 { - dfx, dfy, dfz -} + dfx, dfy, dfz, dfsq +} "Derivatives of the level set function" + +CCTK_REAL ftmp type=GF TimeLevels=1 + +CCTK_INT eh_mask_all type=GF TimeLevels=1 +{ + eh_mask, tm_mask +} "Masks to define active cells" + +CCTK_REAL rep_mask type=GF TimeLevels=1 + +CCTK_INT re_param_control type=SCALAR @@ -30,16 +30,20 @@ REAL initial_c "Initial c coefficient of ellipsoid" (0.0: :: "Positive please" } 1.0 -real cas_a "Initial a coefficient of ovaloid of cassini" +REAL cas_a "Initial a coefficient of ovaloid of cassini" { : :: "Any number (negative and positive are equivalent)" } 2.0 -real cas_b "Initial b coefficient of ovaloid of cassini" +REAL cas_b "Initial b coefficient of ovaloid of cassini" { : :: "Any number (negative and positive are equivalent)" } 2.05 +REAL shell_width "Width of the evolution region in units of the grid spacing" +{ +(0.0: :: "Positive please" +} 7.0 BOOLEAN normalize "normalize the derivatives of the level set function" { @@ -48,3 +52,37 @@ BOOLEAN normalize "normalize the derivatives of the level set function" BOOLEAN one_sided "Use one sided differences everywhere" { } "no" + +KEYWORD mode "Mode of operation" +{ + "normal" :: "Find event horizons" + "test_reparam" :: "Test reparametrization routines with MoL" +} "normal" + +KEYWORD re_param_method "Integration method in re-parametrization" +{ + "approx" :: "Approximate re-parametrization scheme" + "pde" :: "Re-parametrize by solving an pde" +} "approx" + +KEYWORD re_param_int_method "Integration method in pde re-parametrization" +{ + "euler" :: "Standard euler scheme" + "rk2" :: "Second order Runge-Kutta scheme" +} "rk2" + +KEYWORD pde_differences "Type of finite diffencing used in pde re-parametrization" +{ + "centered" :: "Use 2nd order centered differences except at the boundaries" + "upwind" :: "Use 1st order upwinded differences everywhere" + "upwind2" :: "Use 2nd order upwinded differences everywhere" +} "upwind" + +INT reparametrize_every "Re-parametrize every" +{ +0: :: "If 0 don't re-parametrize" +} 40 + +shares: grid + +USES KEYWORD domain diff --git a/schedule.ccl b/schedule.ccl index 64378c9..e19e0cc 100644 --- a/schedule.ccl +++ b/schedule.ccl @@ -4,6 +4,9 @@ STORAGE: level_set[2] STORAGE: slevel_set STORAGE: dlevel_set +STORAGE: eh_mask_all +STORAGE: rep_mask +STORAGE: ftmp schedule EHFinder_Init at CCTK_POSTINITIAL { @@ -11,18 +14,187 @@ schedule EHFinder_Init at CCTK_POSTINITIAL SYNC: level_set } "Setup the initial surface" +schedule EHFinder_SetSym at CCTK_BASEGRID +{ + LANG: Fortran +} "Register the symmetries for the level set function" + +schedule EHFinder_MaskInit at CCTK_POSTINITIAL after EHFinder_Init +{ + LANG: Fortran +} "Setup the initial mask" + +schedule EHFinder_SetMask at CCTK_POSTINITIAL after EHFinder_MaskInit +{ + LANG: Fortran +} "Set the mask" + +#schedule GROUP EHFinder_ReParamInit at CCTK_POSTINITIAL after EHFinder_MaskInit +#{ +# LANG: Fortran +#} "Initial re-parametrization and setting of the mask" +# +#if (CCTK_Equals(re_param_method,"approx")) +#{ +# schedule GROUP Init_ReParametrize in EHFinder_ReParamInit +# { +# LANG: Fortran +# STORAGE: rep_mask +# } "Approximation re-parametrization" +# +# schedule EHFinder_ReParametrize5 in Init_ReParametrize +# { +# LANG: Fortran +# SYNC: level_set +# SYNC: rep_mask +# } "First step in approximation re-parametrization" +# +# schedule EHFinder_ReParametrize6 in Init_ReParametrize AFTER EHFinder_ReParametrize5 WHILE ehfinder::re_param_control +# { +# LANG: Fortran +# SYNC: level_set +# SYNC: rep_mask +# } "Second step in approximation re-parametrization" +#} + +#schedule EHFinder_SetMask in EHFinder_ReParamInit after EHFinder_ReParametrize6 +#{ +# LANG: Fortran +#} "Set the mask" + schedule EHFinder_MoLRegister in MoL_Register { LANG: Fortran } "Register evolution variables" -schedule EHFinder_Sources in MoL_CalcRHS +if (CCTK_Equals(mode,"normal")) { - LANG: Fortran -} "Calculate the source terms" + schedule EHFinder_Sources in MoL_CalcRHS + { + LANG: Fortran + } "Calculate the source terms" +} + +if (CCTK_Equals(mode,"test_reparam")) +{ + schedule EHFinder_Sources3 in MoL_CalcRHS + { + LANG: Fortran + } "Calculate the source terms for reparam test" +} schedule GROUP EHFinder_PostStep in MoL_PostStep { LANG: Fortran - SYNC: level_set +# SYNC: level_set } "Schedule syncing of level set" + +schedule EHFinder_ApplySym in EHFinder_PostStep +{ + LANG: Fortran + SYNC: level_set +} "Apply symmetry boundaries" + +if (!CCTK_Equals(mode,"test_reparam")) +{ + schedule GROUP EHFinder_ReParametrize at CCTK_POSTSTEP + { + LANG: Fortran + } "Re-parametrize the level set function" + + if (CCTK_Equals(re_param_method,"pde")) + { + schedule EHFinder_ReParametrize1 in EHFinder_ReParametrize + { + LANG: Fortran + } "Initializes the re-parametrization control" + + if (CCTK_Equals(re_param_int_method,"euler")) + { + schedule EHFinder_ReParametrize4 in EHFinder_ReParametrize AFTER EHFinder_ReParametrize1 WHILE ehfinder::re_param_control + { + LANG: Fortran + SYNC: level_set + } "Euler scheme" + } + + if (CCTK_Equals(re_param_int_method,"rk2")) + { + schedule GROUP RK2_ReParametrize in EHFinder_ReParametrize AFTER EHFinder_ReParametrize1 WHILE ehfinder::re_param_control + { + LANG: Fortran + } "rk2 evolution for re-parametrization" + + schedule EHFinder_ReParametrize2 in RK2_ReParametrize + { + LANG: Fortran + SYNC: ftmp + } "First step of the RK2 scheme" + + schedule EHFinder_ReParametrize3 in RK2_ReParametrize + { + LANG: Fortran + SYNC: level_set + } "Second step of the RK2 scheme" + } + } + + if (CCTK_Equals(re_param_method,"approx")) + { + schedule GROUP Approx_ReParametrize in EHFinder_ReParametrize + { + LANG: Fortran + } "Approximation re-parametrization" + + schedule EHFinder_ReParametrize5 in Approx_ReParametrize + { + LANG: Fortran + SYNC: level_set + SYNC: dlevel_set + SYNC: rep_mask + } "First step in approximation re-parametrization" + + schedule EHFinder_ApplySym in Approx_ReParametrize AFTER EHFinder_ReParametrize5 + { + LANG: Fortran + SYNC: level_set + SYNC: rep_mask + } "Apply symmetry boundaries" + + schedule GROUP EHFinder_Loop in Approx_ReParametrize AFTER EHFinder_ApplySym WHILE ehfinder::re_param_control + { + LANG: Fortran + SYNC: eh_mask_all + } "Loop for second step in approximation re-parametrization" + + schedule EHFinder_ReParametrize6 in EHFinder_Loop + { + LANG: Fortran + } "Second step in approximation re-parametrization" + + schedule EHFinder_ReParametrize7 in EHFinder_Loop AFTER EHFinder_ReParametrize6 + { + LANG: Fortran + } "Update the re-parametrization mask" + + schedule EHFinder_ApplySym in EHFinder_Loop AFTER EHFinder_ReParametrize7 + { + LANG: Fortran + SYNC: level_set + SYNC: rep_mask + } "Apply symmetry boundaries" + + schedule EHFinder_SetMask in EHFinder_ReParametrize after Approx_ReParametrize + { + LANG: Fortran + SYNC: level_set + } "Set the mask" + + schedule EHFinder_ApplySym in EHFinder_ReParametrize after EHFinder_SetMask + { + LANG: Fortran + SYNC: level_set + } "apply symmetry boundaries" + + } +} |