diff options
Diffstat (limited to 'schedule.ccl')
-rw-r--r-- | schedule.ccl | 115 |
1 files changed, 103 insertions, 12 deletions
diff --git a/schedule.ccl b/schedule.ccl index fa555bd..d2fffb9 100644 --- a/schedule.ccl +++ b/schedule.ccl @@ -6,7 +6,7 @@ STORAGE: slevel_set STORAGE: dlevel_set STORAGE: eh_mask_all STORAGE: rep_mask -STORAGE: ftmp +STORAGE: ftmp_set # Check for metric_state @@ -68,24 +68,26 @@ if (CCTK_Equals(mode,"normal")) { } "Re-parametrize the level set function" - if (CCTK_Equals(re_param_method,"pde")) + if (CCTK_Equals(re_param_method,"pde") || CCTK_Equals(re_param_method,"approx") || CCTK_Equals(re_param_method,"mixed")) { - - # Schedule the control routine, that initialises re_param_control if - # it is time for re-parametrization + # Schedule the control routine, that initialises re_param_control_approx + # and re_param_control_pde if it is time for re-parametrization schedule EHFinder_ReParametrizeControl in EHFinder_ReParametrize { LANG: Fortran } "Initializes the re-parametrization control" + } + if (CCTK_Equals(re_param_method,"pde") || CCTK_Equals(re_param_method,"mixed")) + { if (CCTK_Equals(re_param_int_method,"euler")) { # Set up the schedule group for euler re-parametrization using - # re_param_control to control the exit from the while loop. + # re_param_control_pde to control the exit from the while loop. - schedule GROUP Euler_ReParametrize in EHFinder_ReParametrize AFTER EHFinder_ReParametrize1 WHILE ehfinder::re_param_control + schedule GROUP Euler_ReParametrize in EHFinder_ReParametrize AFTER EHFinder_ReParametrizeControl WHILE ehfinder::re_param_control_pde { } "Schedule group for Euler re-parametrization" @@ -99,12 +101,95 @@ if (CCTK_Equals(mode,"normal")) # Then synchronize the level set and apply symmetry boundary conditions. - schedule EHFinder_ApplySym in Euler_ReParametrize after EHFinder_ReParametrizeEuler + schedule EHFinder_ApplySymF in Euler_ReParametrize after EHFinder_ReParametrizeEuler { LANG: Fortran SYNC: level_set - } "apply symmetry boundaries" + } "Apply symmetry boundaries and sync" } + + if (CCTK_Equals(re_param_int_method,"rk2")) + { + + # Set up the schedule group for rk2 re-parametrization using + # re_param_control_pde to control the exit from the while loop. + + schedule GROUP RK2_ReParametrize in EHFinder_ReParametrize AFTER EHFinder_ReParametrize1 WHILE ehfinder::re_param_control_pde + { + } "Schedule group for RK2 re-parametrization" + + # Schedule the routine that does the first RK2 step + + schedule EHFinder_ReParametrizeRK2_1 in RK2_ReParametrize + { + LANG: Fortran + } "Euler scheme" + + # Then synchronize the level set and apply symmetry boundary conditions. + + schedule EHFinder_ApplySymF in RK2_ReParametrize after EHFinder_ReParametrizeRK2_1 + { + LANG: Fortran + SYNC: level_set + } "Apply symmetry boundaries and sync" + + # Schedule the routine that does the second RK2 step + + schedule EHFinder_ReParametrizeRK2_2 in RK2_ReParametrize after EHFinder_ApplySymF + { + LANG: Fortran + } "Euler scheme" + + # Then synchronize the level set and apply symmetry boundary conditions. + + schedule EHFinder_ApplySymF in RK2_ReParametrize after EHFinder_ReParametrizeRK2_2 + { + LANG: Fortran + SYNC: level_set + } "Apply symmetry boundaries and sync" + } + } + + if (CCTK_Equals(re_param_method,"approx") || CCTK_Equals(re_param_method,"mixed")) + { + + # Schedule a routine to update the points closest to the zero-level surface. + + schedule EHFinder_ReParametrize5 in EHFinder_ReParametrize after EHFinder_ReParametrizeControl + { + LANG: Fortran + } "Update the points closest to the surface" + + schedule EHFinder_ApplySymFRep in EHFinder_ReParametrize after EHFinder_ReParametrize5 + { + LANG: Fortran + SYNC: level_set + SYNC: rep_mask + } "Apply symmetry boundaries and sync" + + # Set up the schedule group for approx re-parametrization using + # re_param_control_approx to control the exit from the while loop. + + schedule GROUP Approx_ReParametrize in EHFinder_ReParametrize AFTER EHFinder_ReParametrizeControl WHILE ehfinder::re_param_control_approx + { + } "Schedule group for Approximate re-parametrization" + + schedule EHFinder_ReParametrize6 in Approx_ReParametrize + { + LANG: Fortran + } "Update cells with neighbours that have already been updated" + + schedule EHFinder_ReParametrize7 in Approx_ReParametrize after ReParametrize6 + { + LANG: Fortran + } "Update rep_mask" + + schedule EHFinder_ApplySymFRep in Approx_ReParametrize after EHFinder_ReParametrize7 + { + LANG: Fortran + SYNC: level_set + SYNC: rep_mask + } "Apply symmetry boundaries and sync" } @@ -125,20 +210,26 @@ if (CCTK_Equals(mode,"normal")) # Then apply the symmetry boundary conditions. - schedule EHFinder_ApplySym in EHFinder_SetMask after EHFinder_SetMask1 + schedule EHFinder_ApplySymAll in EHFinder_SetMask after EHFinder_SetMask1 { LANG: Fortran - } "apply symmetry boundaries" + } "Apply symmetry boundaries" # Finally locate the mask boundary and add values to distinguish different # directions. - schedule EHFinder_SetMask2 in EHFinder_SetMask after EHFinder_ApplySym + schedule EHFinder_SetMask2 in EHFinder_SetMask after EHFinder_ApplySymAll { LANG: Fortran SYNC: eh_mask_all } "Finish modifying the mask" + schedule EHFinder_ApplySymMask in EHFinder_SetMask after EHFinder_SetMask2 + { + LANG: Fortran + } "Apply symmetry boundaries" + + } |