Index: arrangements/CactusNumerical/MoL/schedule.ccl =================================================================== --- arrangements/CactusNumerical/MoL/schedule.ccl (revision 147) +++ arrangements/CactusNumerical/MoL/schedule.ccl (working copy) @@ -657,17 +657,32 @@ { } "Ensure that everything is correct after restriction" -################################################################## +############################################################## ### Schedule the PostStep parts after recovery ### ### so that symmetries are automatically done correctly. ### ### We may want to change this later as it could be ### ### expensive, but it's simplest for the moment. ### -################################################################## +############################################################## schedule GROUP MoL_PostStep AT Post_Recover_Variables { } "Ensure that everything is correct after recovery" +######################################################################### +### Physics thorns can apply enforce constraints in PostStepModify. ### +### The difference between PostStep and PostStepModify is that ### +### PostStep is scheduled at many other occasions, whereas the ### +### PostStepModify is only scheduled during evolution. ### +######################################################################### + +schedule GROUP MoL_PostStepModify IN MoL_Step AFTER MoL_PostStep +{ +} "The group for physics thorns to schedule enforcing constraints" + +schedule GROUP MoL_PostStepModify At PostInitial AFTER MoL_PostStep +{ +} "The group for physics thorns to schedule enforcing constraints" + ########################################################################## ### Schedule a pseudo-evolution group to handle variables which are ### ### not evolved, but which should be calculated at every time step. ### @@ -677,22 +692,26 @@ { } "Calculate pseudo-evolved quantities" -schedule GROUP MoL_PseudoEvolution AT PostRegridInitial AFTER MoL_PostStep +schedule GROUP MoL_PseudoEvolution AT Evol AFTER MoL_Evolution { } "Calculate pseudo-evolved quantities" -schedule GROUP MoL_PseudoEvolution AT Evol AFTER MoL_Evolution +schedule GROUP MoL_PseudoEvolutionBoundaries AT PostRegridInitial AFTER MoL_PostStep { -} "Calculate pseudo-evolved quantities" +} "Apply boundary conditions to pseudo-evolved quantities" -schedule GROUP MoL_PseudoEvolution AT PostRegrid AFTER MoL_PostStep +schedule GROUP MoL_PseudoEvolutionBoundaries AT PostRegrid AFTER MoL_PostStep { -} "Calculate pseudo-evolved quantities" +} "Apply boundary conditions to pseudo-evolved quantities" -schedule GROUP MoL_PseudoEvolution AT Post_Recover_Variables AFTER MoL_PostStep +schedule GROUP MoL_PseudoEvolutionBoundaries AT PostRestrictInitial AFTER MoL_PostStep { -} "Calculate pseudo-evolved quantities" +} "Apply boundary conditions to pseudo-evolved quantities" +schedule GROUP MoL_PseudoEvolutionBoundaries AT PostRestrict AFTER MoL_PostStep +{ +} "Apply boundary conditions to pseudo-evolved quantities" + ############################################################ ### Additional boundary condition bins as requested by ### ### Yosef Zlochower. ### @@ -735,7 +754,7 @@ OPTIONS: LEVEL } "If necessary, change the time" -schedule MoL_ResetDeltaTime IN MoL_Step AFTER MoL_PostStep +schedule MoL_ResetDeltaTime IN MoL_Step AFTER (MoL_PostStep MoL_PostStepModify) { LANG: C OPTIONS: LEVEL Index: arrangements/CactusUtils/NaNChecker/schedule.ccl =================================================================== --- arrangements/CactusUtils/NaNChecker/schedule.ccl (revision 96) +++ arrangements/CactusUtils/NaNChecker/schedule.ccl (working copy) @@ -5,7 +5,7 @@ { STORAGE: NaNmask NaNsFound - schedule NaNChecker_ResetCounter at INITIAL + schedule NaNChecker_ResetCounter at BASEGRID { LANG: C OPTIONS: global @@ -17,15 +17,27 @@ OPTIONS: global } "Reset the NaNChecker::NaNsFound counter" - schedule NaNChecker_NaNCheck at POSTSTEP + schedule NaNChecker_NaNCheck as zzz_NaNChecker_NaNCheck at POSTSTEP { LANG: C OPTIONS: local } "Check for NaNs and count them in NaNChecker::NaNsFound" - schedule NaNChecker_TakeAction at POSTSTEP after NaNChecker_NaNCheck + schedule NaNChecker_TakeAction at POSTSTEP after zzz_NaNChecker_NaNCheck { LANG: C OPTIONS: global loop-level } "Output NaNChecker::NaNmask and take action according to NaNChecker::action_if_found" + + schedule NaNChecker_NaNCheck as zzz_NaNChecker_NaNCheck at POST_RECOVER_VARIABLES + { + LANG: C + OPTIONS: local + } "Check for NaNs and count them in NaNChecker::NaNsFound" + + schedule NaNChecker_TakeAction at POST_RECOVER_VARIABLES after zzz_NaNChecker_NaNCheck + { + LANG: C + OPTIONS: global loop-level + } "Output NaNChecker::NaNmask and take action according to NaNChecker::action_if_found" } Index: arrangements/EinsteinBase/TmunuBase/schedule.ccl =================================================================== --- arrangements/EinsteinBase/TmunuBase/schedule.ccl (revision 9) +++ arrangements/EinsteinBase/TmunuBase/schedule.ccl (working copy) @@ -61,7 +61,7 @@ # if (stress_energy_at_RHS) # { - # SCHEDULE GROUP SetTmunu IN MoL_PostStep AFTER Whisky_PostStep + # SCHEDULE GROUP SetTmunu IN MoL_PostStep AFTER (ADMBase_SetADMVars Whisky_PostStep) # { # } "Calculate the stress-energy tensor" # } else { @@ -71,13 +71,10 @@ # } if (stress_energy_at_RHS) { - SCHEDULE GROUP SetTmunu IN MoL_PostStep + SCHEDULE GROUP SetTmunu IN MoL_PostStep AFTER ADMBase_SetADMVars { } "Group for calculating the stress-energy tensor" } - SCHEDULE GROUP SetTmunu AT evol AFTER MoL_Evolution - { - } "Group for calculating the stress-energy tensor" Index: arrangements/EinsteinEvolve/GRHydro/schedule.ccl =================================================================== --- arrangements/EinsteinEvolve/GRHydro/schedule.ccl (revision 251) +++ arrangements/EinsteinEvolve/GRHydro/schedule.ccl (working copy) @@ -972,21 +972,17 @@ if (CCTK_Equals(Bvec_evolution_method,"GRHydro")) { - schedule GRHydro_AtmosphereResetM IN MoL_Evolution AFTER MoL_Step BEFORE HydroBase_Boundaries AFTER MoL_RestoreSandR + schedule GRHydro_AtmosphereResetM AT EVOL AFTER MoL_Evolution { LANG: Fortran } "Reset the atmosphere - MHD version" } else { - schedule GRHydro_AtmosphereReset IN MoL_Evolution AFTER MoL_Step BEFORE HydroBase_Boundaries AFTER MoL_RestoreSandR + schedule GRHydro_AtmosphereReset AT EVOL AFTER MoL_Evolution { LANG: Fortran } "Reset the atmosphere" } -schedule group HydroBase_Boundaries IN MoL_Evolution AFTER MoL_Step -{ -} "HydroBase Boundary conditions group" - } # end of if (CCTK_EQUALS(hydrobase::evolution_method, "GRHydro")) if (set_trivial_rp_grid_function) @@ -1063,12 +1059,3 @@ schedule GROUP SetTmunu AT POSTPOSTINITIAL AFTER Con2Prim BEFORE ADMConstraintsGroup { } "Calculate the stress-energy tensor" - -schedule GROUP SetTmunu AT POST_RECOVER_VARIABLES -{ -} "Calculate the stress-energy tensor" - -schedule GROUP SetTmunu IN MoL_Evolution AFTER HydroBase_Boundaries -{ -} "Calculate the stress-energy tensor" - diff --git a/Tools/CodeGen/Schedule.m b/Tools/CodeGen/Schedule.m index f2a0e2f..66dec5a 100644 --- a/./repos/Kranc/Tools/CodeGen/Schedule.m +++ b/./repos/Kranc/Tools/CodeGen/Schedule.m @@ -179,8 +179,7 @@ scheduleCalc[calc_, groups_] := Return[{groupSched, fnSched} ~Join~ If[groupsToSync =!= {}, {selbcSched, appbcSched, bcGroupSched["in "<>groupName <> " after " <> lookup[calc, Name]], - bcGroupSched["at CCTK_POSTRESTRICT"], - bcGroupSched["at CCTK_POSTRESTRICTINITIAL"]},{}]]]]; + bcGroupSched["in MoL_PseudoEvolutionBoundaries after MoL_PostStep"]},{}]]]]; CreateKrancScheduleFile[calcs_, groups_, evolvedGroups_, rhsGroups_, nonevolvedGroups_, thornName_, evolutionTimelevels_] := ================================================================ diff --git a/ML_ADMConstraints/schedule.ccl b/ML_ADMConstraints/schedule.ccl index 74b3d66..9840015 100644 --- a/./repos/McLachlan/ML_ADMConstraints/schedule.ccl +++ b/./repos/McLachlan/ML_ADMConstraints/schedule.ccl @@ -23,7 +23,7 @@ schedule ML_ADMConstraints_RegisterSymmetries in SymmetryRegister OPTIONS: meta } "register symmetries" -schedule group ML_ADMConstraints_group in MoL_PseudoEvolution +schedule group ML_ADMConstraints_group in MoL_PseudoEvolution after MoL_PostStep { # no language specified } "ML_ADMConstraints" @@ -51,17 +51,12 @@ schedule group ML_ADMConstraints_bc_group in ML_ADMConstraints_group after ML_AD # no language specified } "ML_ADMConstraints" -schedule group ML_ADMConstraints_bc_group at CCTK_POSTRESTRICT +schedule group ML_ADMConstraints_bc_group in MoL_PseudoEvolutionBoundaries after MoL_PostStep { # no language specified } "ML_ADMConstraints" -schedule group ML_ADMConstraints_bc_group at CCTK_POSTRESTRICTINITIAL -{ - # no language specified -} "ML_ADMConstraints" - -schedule ML_ADMConstraints_SelectBoundConds in MoL_PseudoEvolution +schedule ML_ADMConstraints_SelectBoundConds in MoL_PostStep { LANG: C OPTIONS: level @@ -73,7 +68,7 @@ schedule ML_ADMConstraints_CheckBoundaries at BASEGRID OPTIONS: meta } "check boundaries treatment" -schedule group ApplyBCs as ML_ADMConstraints_ApplyBCs in MoL_PseudoEvolution after ML_ADMConstraints_SelectBoundConds +schedule group ApplyBCs as ML_ADMConstraints_ApplyBCs in MoL_PostStep after ML_ADMConstraints_SelectBoundConds { # no language specified } "Apply boundary conditions controlled by thorn Boundary" diff --git a/ML_ADMConstraints_MP/schedule.ccl b/ML_ADMConstraints_MP/schedule.ccl index 28964ab..08dbab9 100644 --- a/./repos/McLachlan/ML_ADMConstraints_MP/schedule.ccl +++ b/./repos/McLachlan/ML_ADMConstraints_MP/schedule.ccl @@ -23,7 +23,7 @@ schedule ML_ADMConstraints_MP_RegisterSymmetries in SymmetryRegister OPTIONS: meta } "register symmetries" -schedule group ML_ADMConstraints_MP_group in MoL_PseudoEvolution +schedule group ML_ADMConstraints_MP_group in MoL_PseudoEvolution after MoL_PostStep { # no language specified } "ML_ADMConstraints_MP" @@ -51,17 +51,12 @@ schedule group ML_ADMConstraints_MP_bc_group in ML_ADMConstraints_MP_group after # no language specified } "ML_ADMConstraints_MP" -schedule group ML_ADMConstraints_MP_bc_group at CCTK_POSTRESTRICT +schedule group ML_ADMConstraints_MP_bc_group in MoL_PseudoEvolutionBoundaries after MoL_PostStep { # no language specified } "ML_ADMConstraints_MP" -schedule group ML_ADMConstraints_MP_bc_group at CCTK_POSTRESTRICTINITIAL -{ - # no language specified -} "ML_ADMConstraints_MP" - -schedule ML_ADMConstraints_MP_SelectBoundConds in MoL_PseudoEvolution +schedule ML_ADMConstraints_MP_SelectBoundConds in MoL_PostStep { LANG: C OPTIONS: level @@ -73,7 +68,7 @@ schedule ML_ADMConstraints_MP_CheckBoundaries at BASEGRID OPTIONS: meta } "check boundaries treatment" -schedule group ApplyBCs as ML_ADMConstraints_MP_ApplyBCs in MoL_PseudoEvolution after ML_ADMConstraints_MP_SelectBoundConds +schedule group ApplyBCs as ML_ADMConstraints_MP_ApplyBCs in MoL_PostStep after ML_ADMConstraints_MP_SelectBoundConds { # no language specified } "Apply boundary conditions controlled by thorn Boundary" diff --git a/ML_ADMConstraints_O2/schedule.ccl b/ML_ADMConstraints_O2/schedule.ccl index f89b3cd..f7f2fd9 100644 --- a/./repos/McLachlan/ML_ADMConstraints_O2/schedule.ccl +++ b/./repos/McLachlan/ML_ADMConstraints_O2/schedule.ccl @@ -23,7 +23,7 @@ schedule ML_ADMConstraints_O2_RegisterSymmetries in SymmetryRegister OPTIONS: meta } "register symmetries" -schedule group ML_ADMConstraints_O2_group in MoL_PseudoEvolution +schedule group ML_ADMConstraints_O2_group in MoL_PseudoEvolution after MoL_PostStep { # no language specified } "ML_ADMConstraints_O2" @@ -51,17 +51,12 @@ schedule group ML_ADMConstraints_O2_bc_group in ML_ADMConstraints_O2_group after # no language specified } "ML_ADMConstraints_O2" -schedule group ML_ADMConstraints_O2_bc_group at CCTK_POSTRESTRICT +schedule group ML_ADMConstraints_O2_bc_group in MoL_PseudoEvolutionBoundaries after MoL_PostStep { # no language specified } "ML_ADMConstraints_O2" -schedule group ML_ADMConstraints_O2_bc_group at CCTK_POSTRESTRICTINITIAL -{ - # no language specified -} "ML_ADMConstraints_O2" - -schedule ML_ADMConstraints_O2_SelectBoundConds in MoL_PseudoEvolution +schedule ML_ADMConstraints_O2_SelectBoundConds in MoL_PostStep { LANG: C OPTIONS: level @@ -73,7 +68,7 @@ schedule ML_ADMConstraints_O2_CheckBoundaries at BASEGRID OPTIONS: meta } "check boundaries treatment" -schedule group ApplyBCs as ML_ADMConstraints_O2_ApplyBCs in MoL_PseudoEvolution after ML_ADMConstraints_O2_SelectBoundConds +schedule group ApplyBCs as ML_ADMConstraints_O2_ApplyBCs in MoL_PostStep after ML_ADMConstraints_O2_SelectBoundConds { # no language specified } "Apply boundary conditions controlled by thorn Boundary" diff --git a/ML_ADMQuantities/schedule.ccl b/ML_ADMQuantities/schedule.ccl index 76e5a43..273f2d7 100644 --- a/./repos/McLachlan/ML_ADMQuantities/schedule.ccl +++ b/./repos/McLachlan/ML_ADMQuantities/schedule.ccl @@ -23,7 +23,7 @@ schedule ML_ADMQuantities_RegisterSymmetries in SymmetryRegister OPTIONS: meta } "register symmetries" -schedule group ML_ADMQuantities_group in MoL_PseudoEvolution +schedule group ML_ADMQuantities_group in MoL_PseudoEvolution after MoL_PostStep { # no language specified } "ML_ADMQuantities" @@ -51,17 +51,12 @@ schedule group ML_ADMQuantities_bc_group in ML_ADMQuantities_group after ML_ADMQ # no language specified } "ML_ADMQuantities" -schedule group ML_ADMQuantities_bc_group at CCTK_POSTRESTRICT +schedule group ML_ADMQuantities_bc_group in MoL_PseudoEvolutionBoundaries after MoL_PostStep { # no language specified } "ML_ADMQuantities" -schedule group ML_ADMQuantities_bc_group at CCTK_POSTRESTRICTINITIAL -{ - # no language specified -} "ML_ADMQuantities" - -schedule ML_ADMQuantities_SelectBoundConds in MoL_PseudoEvolution +schedule ML_ADMQuantities_SelectBoundConds in MoL_PostStep { LANG: C OPTIONS: level @@ -73,7 +68,7 @@ schedule ML_ADMQuantities_CheckBoundaries at BASEGRID OPTIONS: meta } "check boundaries treatment" -schedule group ApplyBCs as ML_ADMQuantities_ApplyBCs in MoL_PseudoEvolution after ML_ADMQuantities_SelectBoundConds +schedule group ApplyBCs as ML_ADMQuantities_ApplyBCs in MoL_PostStep after ML_ADMQuantities_SelectBoundConds { # no language specified } "Apply boundary conditions controlled by thorn Boundary" diff --git a/ML_ADMQuantities_MP/schedule.ccl b/ML_ADMQuantities_MP/schedule.ccl index 1a66d54..f764cba 100644 --- a/./repos/McLachlan/ML_ADMQuantities_MP/schedule.ccl +++ b/./repos/McLachlan/ML_ADMQuantities_MP/schedule.ccl @@ -23,7 +23,7 @@ schedule ML_ADMQuantities_MP_RegisterSymmetries in SymmetryRegister OPTIONS: meta } "register symmetries" -schedule group ML_ADMQuantities_MP_group in MoL_PseudoEvolution +schedule group ML_ADMQuantities_MP_group in MoL_PseudoEvolution after MoL_PostStep { # no language specified } "ML_ADMQuantities_MP" @@ -51,17 +51,12 @@ schedule group ML_ADMQuantities_MP_bc_group in ML_ADMQuantities_MP_group after M # no language specified } "ML_ADMQuantities_MP" -schedule group ML_ADMQuantities_MP_bc_group at CCTK_POSTRESTRICT +schedule group ML_ADMQuantities_MP_bc_group in MoL_PseudoEvolutionBoundaries after MoL_PostStep { # no language specified } "ML_ADMQuantities_MP" -schedule group ML_ADMQuantities_MP_bc_group at CCTK_POSTRESTRICTINITIAL -{ - # no language specified -} "ML_ADMQuantities_MP" - -schedule ML_ADMQuantities_MP_SelectBoundConds in MoL_PseudoEvolution +schedule ML_ADMQuantities_MP_SelectBoundConds in MoL_PostStep { LANG: C OPTIONS: level @@ -73,7 +68,7 @@ schedule ML_ADMQuantities_MP_CheckBoundaries at BASEGRID OPTIONS: meta } "check boundaries treatment" -schedule group ApplyBCs as ML_ADMQuantities_MP_ApplyBCs in MoL_PseudoEvolution after ML_ADMQuantities_MP_SelectBoundConds +schedule group ApplyBCs as ML_ADMQuantities_MP_ApplyBCs in MoL_PostStep after ML_ADMQuantities_MP_SelectBoundConds { # no language specified } "Apply boundary conditions controlled by thorn Boundary" diff --git a/ML_ADMQuantities_O2/schedule.ccl b/ML_ADMQuantities_O2/schedule.ccl index 449cc06..fe37d31 100644 --- a/./repos/McLachlan/ML_ADMQuantities_O2/schedule.ccl +++ b/./repos/McLachlan/ML_ADMQuantities_O2/schedule.ccl @@ -23,7 +23,7 @@ schedule ML_ADMQuantities_O2_RegisterSymmetries in SymmetryRegister OPTIONS: meta } "register symmetries" -schedule group ML_ADMQuantities_O2_group in MoL_PseudoEvolution +schedule group ML_ADMQuantities_O2_group in MoL_PseudoEvolution after MoL_PostStep { # no language specified } "ML_ADMQuantities_O2" @@ -51,17 +51,12 @@ schedule group ML_ADMQuantities_O2_bc_group in ML_ADMQuantities_O2_group after M # no language specified } "ML_ADMQuantities_O2" -schedule group ML_ADMQuantities_O2_bc_group at CCTK_POSTRESTRICT +schedule group ML_ADMQuantities_O2_bc_group in MoL_PseudoEvolutionBoundaries after MoL_PostStep { # no language specified } "ML_ADMQuantities_O2" -schedule group ML_ADMQuantities_O2_bc_group at CCTK_POSTRESTRICTINITIAL -{ - # no language specified -} "ML_ADMQuantities_O2" - -schedule ML_ADMQuantities_O2_SelectBoundConds in MoL_PseudoEvolution +schedule ML_ADMQuantities_O2_SelectBoundConds in MoL_PostStep { LANG: C OPTIONS: level @@ -73,7 +68,7 @@ schedule ML_ADMQuantities_O2_CheckBoundaries at BASEGRID OPTIONS: meta } "check boundaries treatment" -schedule group ApplyBCs as ML_ADMQuantities_O2_ApplyBCs in MoL_PseudoEvolution after ML_ADMQuantities_O2_SelectBoundConds +schedule group ApplyBCs as ML_ADMQuantities_O2_ApplyBCs in MoL_PostStep after ML_ADMQuantities_O2_SelectBoundConds { # no language specified } "Apply boundary conditions controlled by thorn Boundary" diff --git a/ML_BSSN/schedule.ccl b/ML_BSSN/schedule.ccl index 9477f4a..9c0fddb 100644 --- a/./repos/McLachlan/ML_BSSN/schedule.ccl +++ b/./repos/McLachlan/ML_BSSN/schedule.ccl @@ -340,7 +340,7 @@ if (CCTK_EQUALS(my_rhs_boundary_condition, "static")) } "ML_BSSN_RHSStaticBoundary" } -schedule ML_BSSN_enforce IN MoL_PostStep BEFORE ML_BSSN_SelectBoundConds +schedule ML_BSSN_enforce IN MoL_PostStepModify { LANG: C } "ML_BSSN_enforce" @@ -388,7 +388,7 @@ if (CCTK_EQUALS(dt_lapse_shift_method, "noLapseShiftAdvection")) } "ML_BSSN_convertToADMBaseFakeDtLapseShift" } -schedule group ML_BSSN_constraints1_group in MoL_PseudoEvolution +schedule group ML_BSSN_constraints1_group in MoL_PseudoEvolution after MoL_PostStep { # no language specified } "ML_BSSN_constraints1" @@ -415,17 +415,12 @@ schedule group ML_BSSN_constraints1_bc_group in ML_BSSN_constraints1_group after # no language specified } "ML_BSSN_constraints1" -schedule group ML_BSSN_constraints1_bc_group at CCTK_POSTRESTRICT +schedule group ML_BSSN_constraints1_bc_group in MoL_PseudoEvolutionBoundaries after MoL_PostStep { # no language specified } "ML_BSSN_constraints1" -schedule group ML_BSSN_constraints1_bc_group at CCTK_POSTRESTRICTINITIAL -{ - # no language specified -} "ML_BSSN_constraints1" - -schedule group ML_BSSN_constraints2_group in MoL_PseudoEvolution +schedule group ML_BSSN_constraints2_group in MoL_PseudoEvolution after MoL_PostStep { # no language specified } "ML_BSSN_constraints2" @@ -455,12 +450,7 @@ schedule group ML_BSSN_constraints2_bc_group in ML_BSSN_constraints2_group after # no language specified } "ML_BSSN_constraints2" -schedule group ML_BSSN_constraints2_bc_group at CCTK_POSTRESTRICT -{ - # no language specified -} "ML_BSSN_constraints2" - -schedule group ML_BSSN_constraints2_bc_group at CCTK_POSTRESTRICTINITIAL +schedule group ML_BSSN_constraints2_bc_group in MoL_PseudoEvolutionBoundaries after MoL_PostStep { # no language specified } "ML_BSSN_constraints2" diff --git a/ML_BSSN_Helper/src/SetGroupTags.c b/ML_BSSN_Helper/src/SetGroupTags.c index 4b24e56..7ae24bb 100644 --- a/./repos/McLachlan/ML_BSSN_Helper/src/SetGroupTags.c +++ b/./repos/McLachlan/ML_BSSN_Helper/src/SetGroupTags.c @@ -15,29 +15,30 @@ ML_BSSN_SetGroupTags (void) { DECLARE_CCTK_PARAMETERS; - set_group_tags (0, 0, 1, "ADMBase::metric"); - set_group_tags (0, 0, 1, "ADMBase::curv"); - set_group_tags (0, 0, 1, "ADMBase::lapse"); - set_group_tags (0, 0, 1, "ADMBase::shift"); - set_group_tags (0, 0, 1, "ADMBase::dtlapse"); - set_group_tags (0, 0, 1, "ADMBase::dtshift"); + int const checkpoint = timelevels > 1; + set_group_tags (checkpoint, checkpoint, 1, "ADMBase::metric"); + set_group_tags (checkpoint, checkpoint, 1, "ADMBase::curv"); + set_group_tags (checkpoint, checkpoint, 1, "ADMBase::lapse"); + set_group_tags (checkpoint, checkpoint, 1, "ADMBase::shift"); + set_group_tags (checkpoint, checkpoint, 1, "ADMBase::dtlapse"); + set_group_tags (checkpoint, checkpoint, 1, "ADMBase::dtshift"); - set_group_tags (0, 0, 0, "ML_BSSN::ML_cons_detg"); - set_group_tags (0, 0, 0, "ML_BSSN::ML_cons_Gamma"); - set_group_tags (0, 0, 0, "ML_BSSN::ML_cons_traceA"); - set_group_tags (0, 0, 0, "ML_BSSN::ML_Ham"); - set_group_tags (0, 0, 0, "ML_BSSN::ML_mom"); + set_group_tags (checkpoint, checkpoint, 0, "ML_BSSN::ML_cons_detg"); + set_group_tags (checkpoint, checkpoint, 0, "ML_BSSN::ML_cons_Gamma"); + set_group_tags (checkpoint, checkpoint, 0, "ML_BSSN::ML_cons_traceA"); + set_group_tags (checkpoint, checkpoint, 0, "ML_BSSN::ML_Ham"); + set_group_tags (checkpoint, checkpoint, 0, "ML_BSSN::ML_mom"); - int const checkpoint = rhs_timelevels > 1; - set_group_tags (checkpoint, checkpoint, 0, "ML_BSSN::ML_log_confacrhs"); - set_group_tags (checkpoint, checkpoint, 0, "ML_BSSN::ML_metricrhs"); - set_group_tags (checkpoint, checkpoint, 0, "ML_BSSN::ML_Gammarhs"); - set_group_tags (checkpoint, checkpoint, 0, "ML_BSSN::ML_trace_curvrhs"); - set_group_tags (checkpoint, checkpoint, 0, "ML_BSSN::ML_curvrhs"); - set_group_tags (checkpoint, checkpoint, 0, "ML_BSSN::ML_lapserhs"); - set_group_tags (checkpoint, checkpoint, 0, "ML_BSSN::ML_dtlapserhs"); - set_group_tags (checkpoint, checkpoint, 0, "ML_BSSN::ML_shiftrhs"); - set_group_tags (checkpoint, checkpoint, 0, "ML_BSSN::ML_dtshiftrhs"); + int const rhs_checkpoint = rhs_timelevels > 1; + set_group_tags (rhs_checkpoint, rhs_checkpoint, 0, "ML_BSSN::ML_log_confacrhs"); + set_group_tags (rhs_checkpoint, rhs_checkpoint, 0, "ML_BSSN::ML_metricrhs"); + set_group_tags (rhs_checkpoint, rhs_checkpoint, 0, "ML_BSSN::ML_Gammarhs"); + set_group_tags (rhs_checkpoint, rhs_checkpoint, 0, "ML_BSSN::ML_trace_curvrhs"); + set_group_tags (rhs_checkpoint, rhs_checkpoint, 0, "ML_BSSN::ML_curvrhs"); + set_group_tags (rhs_checkpoint, rhs_checkpoint, 0, "ML_BSSN::ML_lapserhs"); + set_group_tags (rhs_checkpoint, rhs_checkpoint, 0, "ML_BSSN::ML_dtlapserhs"); + set_group_tags (rhs_checkpoint, rhs_checkpoint, 0, "ML_BSSN::ML_shiftrhs"); + set_group_tags (rhs_checkpoint, rhs_checkpoint, 0, "ML_BSSN::ML_dtshiftrhs"); return 0; } diff --git a/m/Makefile b/m/Makefile index 48c7197..6c6bde5 100644 --- a/./repos/McLachlan/m/Makefile +++ b/./repos/McLachlan/m/Makefile @@ -8,54 +8,52 @@ all: McLachlan_ADM.out McLachlan_BSSN.out McLachlan_ADMConstraints.out McLachlan McLachlan_ADM.out: McLachlan_ADM.m rm -rf ML_ADM* ./runmath.sh $^ - for thorn in ML_ADM*; do \ - ./copy-if-changed.sh $$thorn ../$$thorn; \ + for thorn in ML_ADM*; do \ + ./copy-if-changed.sh $$thorn ../$$thorn; \ done McLachlan_BSSN.out: McLachlan_BSSN.m rm -rf ML_BSSN* ./runmath.sh $^ - for thorn in ML_BSSN*; do \ - ./copy-if-changed.sh $$thorn ../$$thorn; \ - ./create-helper-thorn.sh $$thorn; \ + for thorn in ML_BSSN*; do \ + ./copy-if-changed.sh $$thorn ../$$thorn && \ + ./create-helper-thorn.sh $$thorn && \ ./copy-if-changed.sh $${thorn}_Helper ../$${thorn}_Helper; \ done McLachlan_ADMConstraints.out: McLachlan_ADMConstraints.m rm -rf ML_ADMConstraints* ./runmath.sh $^ - perl -pi -e 's/MoL_PostStep/MoL_PseudoEvolution/g' ML_ADMConstraints*/schedule.ccl - for thorn in ML_ADMConstraints*; do \ - ./copy-if-changed.sh $$thorn ../$$thorn; \ + for thorn in ML_ADMConstraints*; do \ + ./copy-if-changed.sh $$thorn ../$$thorn; \ done McLachlan_ADMQuantities.out: McLachlan_ADMQuantities.m rm -rf ML_ADMQuantities* ./runmath.sh $^ - perl -pi -e 's/MoL_PostStep/MoL_PseudoEvolution/g' ML_ADMQuantities*/schedule.ccl - for thorn in ML_ADMQuantities*; do \ - ./copy-if-changed.sh $$thorn ../$$thorn; \ + for thorn in ML_ADMQuantities*; do \ + ./copy-if-changed.sh $$thorn ../$$thorn; \ done WaveToy.out: WaveToy.m rm -rf ML_WaveToy ./runmath.sh $^ - for thorn in ML_WaveToy; do \ - ./copy-if-changed.sh $$thorn ../$$thorn; \ + for thorn in ML_WaveToy; do \ + ./copy-if-changed.sh $$thorn ../$$thorn; \ done WaveToyFO.out: WaveToyFO.m rm -rf ML_WaveToyFO ./runmath.sh $^ - for thorn in ML_WaveToyFO; do \ - ./copy-if-changed.sh $$thorn ../$$thorn; \ + for thorn in ML_WaveToyFO; do \ + ./copy-if-changed.sh $$thorn ../$$thorn; \ done hydro.out: hydro.m rm -rf ML_hydro ./runmath.sh $^ - for thorn in ML_hydro; do \ - ./copy-if-changed.sh $$thorn ../$$thorn; \ + for thorn in ML_hydro; do \ + ./copy-if-changed.sh $$thorn ../$$thorn; \ done clean: diff --git a/m/McLachlan_ADMConstraints.m b/m/McLachlan_ADMConstraints.m index 1abb5ae..bb9447b 100644 --- a/./repos/McLachlan/m/McLachlan_ADMConstraints.m +++ b/./repos/McLachlan/m/McLachlan_ADMConstraints.m @@ -138,6 +138,7 @@ ADMConstraintsCalc = Name -> ADMConstraints, Schedule -> Automatic, Where -> Interior, + After -> "MoL_PostStep", Shorthands -> {detg, gu[ua,ub], G[ua,lb,lc], R[la,lb], trR, Km[la,lb], trK, rho, S[la]}, diff --git a/m/McLachlan_ADMQuantities.m b/m/McLachlan_ADMQuantities.m index dfa5d22..14131f8 100644 --- a/./repos/McLachlan/m/McLachlan_ADMQuantities.m +++ b/./repos/McLachlan/m/McLachlan_ADMQuantities.m @@ -212,6 +212,7 @@ ADMQuantitiesCalc = Name -> ADMQuantities, Schedule -> Automatic, Where -> Interior, + After -> "MoL_PostStep", Shorthands -> {detgt, gtu[ua,ub], dgtu[ua,ub,lc], Gtl[la,lb,lc], Gtlu[la,lb,uc], Gt[ua,lb,lc], Xtn[ua], Rt[la,lb], trRt, diff --git a/m/McLachlan_BSSN.m b/m/McLachlan_BSSN.m index b05c8aa..927b894 100644 --- a/./repos/McLachlan/m/McLachlan_BSSN.m +++ b/./repos/McLachlan/m/McLachlan_BSSN.m @@ -910,11 +927,14 @@ RHSRadiativeBoundaryCalc = enforceCalc = { Name -> BSSN <> "_enforce", - Schedule -> {"IN MoL_PostStep BEFORE " <> BSSN <> "_SelectBoundConds"}, + Schedule -> {"IN MoL_PostStepModify"}, Shorthands -> {detgt, gtu[ua,ub], trAt}, Equations -> { - (* Enforcing the constraints needs to be a projection, because it + (* The following comment is still interesting, but is not correct + any more since it is now scheduled in MoL_PostStepModify instead: + + Enforcing the constraints needs to be a projection, because it is applied in MoL_PostStep and may thus be applied multiple times, not only during time evolution. Therefore detgt has to be calculated correctly, without assuming that det gt_ij = 1, @@ -963,6 +983,7 @@ constraintsCalc = { Name -> BSSN <> "_constraints", Schedule -> Automatic, + After -> "MoL_PostStep", Where -> Interior, Shorthands -> {detgt, ddetgt[la], gtu[ua,ub], Gt[ua,lb,lc], Gtl[la,lb,lc], Gtlu[la,lb,uc], Xtn[ua], diff --git a/m/prototype/ML_BSSN_Helper/src/SetGroupTags.c b/m/prototype/ML_BSSN_Helper/src/SetGroupTags.c index 4b24e56..7ae24bb 100644 --- a/./repos/McLachlan/m/prototype/ML_BSSN_Helper/src/SetGroupTags.c +++ b/./repos/McLachlan/m/prototype/ML_BSSN_Helper/src/SetGroupTags.c @@ -15,29 +15,30 @@ ML_BSSN_SetGroupTags (void) { DECLARE_CCTK_PARAMETERS; - set_group_tags (0, 0, 1, "ADMBase::metric"); - set_group_tags (0, 0, 1, "ADMBase::curv"); - set_group_tags (0, 0, 1, "ADMBase::lapse"); - set_group_tags (0, 0, 1, "ADMBase::shift"); - set_group_tags (0, 0, 1, "ADMBase::dtlapse"); - set_group_tags (0, 0, 1, "ADMBase::dtshift"); + int const checkpoint = timelevels > 1; + set_group_tags (checkpoint, checkpoint, 1, "ADMBase::metric"); + set_group_tags (checkpoint, checkpoint, 1, "ADMBase::curv"); + set_group_tags (checkpoint, checkpoint, 1, "ADMBase::lapse"); + set_group_tags (checkpoint, checkpoint, 1, "ADMBase::shift"); + set_group_tags (checkpoint, checkpoint, 1, "ADMBase::dtlapse"); + set_group_tags (checkpoint, checkpoint, 1, "ADMBase::dtshift"); - set_group_tags (0, 0, 0, "ML_BSSN::ML_cons_detg"); - set_group_tags (0, 0, 0, "ML_BSSN::ML_cons_Gamma"); - set_group_tags (0, 0, 0, "ML_BSSN::ML_cons_traceA"); - set_group_tags (0, 0, 0, "ML_BSSN::ML_Ham"); - set_group_tags (0, 0, 0, "ML_BSSN::ML_mom"); + set_group_tags (checkpoint, checkpoint, 0, "ML_BSSN::ML_cons_detg"); + set_group_tags (checkpoint, checkpoint, 0, "ML_BSSN::ML_cons_Gamma"); + set_group_tags (checkpoint, checkpoint, 0, "ML_BSSN::ML_cons_traceA"); + set_group_tags (checkpoint, checkpoint, 0, "ML_BSSN::ML_Ham"); + set_group_tags (checkpoint, checkpoint, 0, "ML_BSSN::ML_mom"); - int const checkpoint = rhs_timelevels > 1; - set_group_tags (checkpoint, checkpoint, 0, "ML_BSSN::ML_log_confacrhs"); - set_group_tags (checkpoint, checkpoint, 0, "ML_BSSN::ML_metricrhs"); - set_group_tags (checkpoint, checkpoint, 0, "ML_BSSN::ML_Gammarhs"); - set_group_tags (checkpoint, checkpoint, 0, "ML_BSSN::ML_trace_curvrhs"); - set_group_tags (checkpoint, checkpoint, 0, "ML_BSSN::ML_curvrhs"); - set_group_tags (checkpoint, checkpoint, 0, "ML_BSSN::ML_lapserhs"); - set_group_tags (checkpoint, checkpoint, 0, "ML_BSSN::ML_dtlapserhs"); - set_group_tags (checkpoint, checkpoint, 0, "ML_BSSN::ML_shiftrhs"); - set_group_tags (checkpoint, checkpoint, 0, "ML_BSSN::ML_dtshiftrhs"); + int const rhs_checkpoint = rhs_timelevels > 1; + set_group_tags (rhs_checkpoint, rhs_checkpoint, 0, "ML_BSSN::ML_log_confacrhs"); + set_group_tags (rhs_checkpoint, rhs_checkpoint, 0, "ML_BSSN::ML_metricrhs"); + set_group_tags (rhs_checkpoint, rhs_checkpoint, 0, "ML_BSSN::ML_Gammarhs"); + set_group_tags (rhs_checkpoint, rhs_checkpoint, 0, "ML_BSSN::ML_trace_curvrhs"); + set_group_tags (rhs_checkpoint, rhs_checkpoint, 0, "ML_BSSN::ML_curvrhs"); + set_group_tags (rhs_checkpoint, rhs_checkpoint, 0, "ML_BSSN::ML_lapserhs"); + set_group_tags (rhs_checkpoint, rhs_checkpoint, 0, "ML_BSSN::ML_dtlapserhs"); + set_group_tags (rhs_checkpoint, rhs_checkpoint, 0, "ML_BSSN::ML_shiftrhs"); + set_group_tags (rhs_checkpoint, rhs_checkpoint, 0, "ML_BSSN::ML_dtshiftrhs"); return 0; } ================================================================ diff -r 3e72bcdb58d3 Carpet/Carpet/src/Evolve.cc --- a/./repos/carpet/Carpet/Carpet/src/Evolve.cc Sun Jul 10 12:19:01 2011 -0400 +++ b/./repos/carpet/Carpet/Carpet/src/Evolve.cc Sat Jul 30 20:49:25 2011 -0400 @@ -449,41 +449,22 @@ for (int ml=mglevels-1; ml>=0; --ml) { - bool have_done_global_mode = false; - bool have_done_early_global_mode = false; - bool have_done_late_global_mode = false; - bool have_done_anything = false; + bool did_restrict = false; for (int rl=reflevels-2; rl>=0; --rl) { - int const do_every - = ipow(mgfact, ml) * (maxtimereflevelfact / timereffacts.AT(rl)); + int const do_every = + ipow(mgfact, ml) * (maxtimereflevelfact / timereffacts.AT(rl)); if (cctkGH->cctk_iteration % do_every == 0) { ENTER_GLOBAL_MODE (cctkGH, ml) { ENTER_LEVEL_MODE (cctkGH, rl) { BeginTimingLevel (cctkGH); - do_early_global_mode = reflevel==reflevels-2; - do_late_global_mode = not have_done_late_global_mode; - do_early_meta_mode = do_early_global_mode and mglevel==mglevels-1; - do_late_meta_mode = do_late_global_mode and mglevel==0; - do_global_mode = do_late_global_mode; - do_meta_mode = do_global_mode and do_late_meta_mode; - assert (not (have_done_global_mode and do_global_mode)); - assert (not (have_done_early_global_mode and - do_early_global_mode)); - assert (not (have_done_late_global_mode and - do_late_global_mode)); - have_done_global_mode |= do_global_mode; - have_done_early_global_mode |= do_early_global_mode; - have_done_late_global_mode |= do_late_global_mode; - have_done_anything = true; - Waypoint ("Evolution/Restrict at iteration %d time %g", cctkGH->cctk_iteration, (double)cctkGH->cctk_time); Restrict (cctkGH); - ScheduleTraverse (where, "CCTK_POSTRESTRICT", cctkGH); + did_restrict = true; EndTimingLevel (cctkGH); } LEAVE_LEVEL_MODE; @@ -491,9 +472,56 @@ } // if do_every } // for rl - if (have_done_anything) assert (have_done_global_mode); - if (have_done_anything) assert (have_done_early_global_mode); - if (have_done_anything) assert (have_done_late_global_mode); + if (did_restrict) { + + bool have_done_global_mode = false; + bool have_done_early_global_mode = false; + bool have_done_late_global_mode = false; + bool have_done_anything = false; + + for (int rl=0; rlcctk_iteration % do_every == 0) { + ENTER_GLOBAL_MODE (cctkGH, ml) { + ENTER_LEVEL_MODE (cctkGH, rl) { + BeginTimingLevel (cctkGH); + + // do_early_global_mode = reflevel==reflevels-2; + // do_late_global_mode = not have_done_late_global_mode; + do_early_global_mode = not have_done_early_global_mode; + do_late_global_mode = reflevel==reflevels-1; + do_early_meta_mode = + do_early_global_mode and mglevel==mglevels-1; + do_late_meta_mode = do_late_global_mode and mglevel==0; + do_global_mode = do_late_global_mode; + do_meta_mode = do_global_mode and do_late_meta_mode; + assert (not (have_done_global_mode and do_global_mode)); + assert (not (have_done_early_global_mode and + do_early_global_mode)); + assert (not (have_done_late_global_mode and + do_late_global_mode)); + have_done_global_mode |= do_global_mode; + have_done_early_global_mode |= do_early_global_mode; + have_done_late_global_mode |= do_late_global_mode; + have_done_anything = true; + + Waypoint ("Evolution/PostRestrict at iteration %d time %g", + cctkGH->cctk_iteration, (double)cctkGH->cctk_time); + + ScheduleTraverse (where, "CCTK_POSTRESTRICT", cctkGH); + + EndTimingLevel (cctkGH); + } LEAVE_LEVEL_MODE; + } LEAVE_GLOBAL_MODE; + } // if do_every + } // for rl + + if (have_done_anything) assert (have_done_global_mode); + if (have_done_anything) assert (have_done_early_global_mode); + if (have_done_anything) assert (have_done_late_global_mode); + + } // if did_restrict } // for ml diff -r 3e72bcdb58d3 Carpet/Carpet/src/Initialise.cc --- a/./repos/carpet/Carpet/Carpet/src/Initialise.cc Sun Jul 10 12:19:01 2011 -0400 +++ b/./repos/carpet/Carpet/Carpet/src/Initialise.cc Sat Jul 30 20:49:25 2011 -0400 @@ -282,6 +282,7 @@ do_global_mode = do_early_global_mode; // on first iteration, coarsest grid do_meta_mode = do_early_meta_mode; // on first iteration, coarsest grid +#if 0 BEGIN_TIMELEVEL_LOOP(cctkGH) { Waypoint ("Recovering II at iteration %d time %g timelevel %d%s%s", @@ -295,6 +296,16 @@ ScheduleTraverse (where, "CCTK_POST_RECOVER_VARIABLES", cctkGH); } END_TIMELEVEL_LOOP; +#else + Waypoint ("Recovering II at iteration %d time %g%s%s", + cctkGH->cctk_iteration, + (double)cctkGH->cctk_time, + (do_global_mode ? " (global)" : ""), + (do_meta_mode ? " (meta)" : "")); + + // Post recover variables + ScheduleTraverse (where, "CCTK_POST_RECOVER_VARIABLES", cctkGH); +#endif // Checking PoisonCheck (cctkGH, currenttime); ================================================================