aboutsummaryrefslogtreecommitdiff
path: root/schedule.ccl
diff options
context:
space:
mode:
Diffstat (limited to 'schedule.ccl')
-rw-r--r--schedule.ccl35
1 files changed, 32 insertions, 3 deletions
diff --git a/schedule.ccl b/schedule.ccl
index 1bd3721..713a094 100644
--- a/schedule.ccl
+++ b/schedule.ccl
@@ -477,6 +477,7 @@ schedule GRHydro_Scalar_Setup IN CCTK_POSTINITIAL BEFORE HydroBase_RHS
if (CCTK_EQUALS(evolution_method, "GRHydro")) {
STORAGE:GRHydro_atmosphere_mask
+STORAGE:GRHydro_atmosphere_mask_real
STORAGE:GRHydro_atmosphere_descriptors
schedule GRHydro_SetupMask AT CCTK_Initial BEFORE HydroBase_Initial
@@ -999,6 +1000,25 @@ schedule group Do_GRHydro_Boundaries IN HydroBase_Boundaries
{
} "GRHydro Boundary conditions group"
+
+# Synchronize the atmosphere mask before doing other boundaries!
+schedule group GRHydro_AtmosphereMaskBoundaries IN HydroBase_PostStep BEFORE (HydroBase_Boundaries,GRHydro_PrimitiveBoundaries)
+{
+} "Apply boundary conditions to primitives"
+
+schedule GRHydro_SelectAtmosphereMaskBoundaries IN GRHydro_AtmosphereMaskBoundaries
+{
+ LANG: Fortran
+ OPTIONS: LEVEL
+ SYNC: GRHydro_atmosphere_mask_real
+} "Select primitive variables for boudary conditions"
+
+schedule group ApplyBCs AS GRHydro_ApplyAtmosphereMaskBCs in GRHydro_AtmosphereMaskBoundaries AFTER GRHydro_SelectAtmosphereMaskBoundaries
+{
+} "Apply boundary conditions to real-valued atmosphere mask"
+
+
+# Now synchronize other evolution variables
if (!sync_conserved_only)
{
schedule GRHydro_Boundaries IN HydroBase_Select_Boundaries AS GRHydro_Bound
@@ -1050,7 +1070,9 @@ else
{
} "Apply boundary conditions to primitives"
- # This is necessary to provide initial guesses for Con2Prim after atmo reset (which happens only at last MoL post-step)!
+ # Primitive sync is always necessary to provide initial guesses for Con2Prim in the buffer zones via prolongation.
+ # Buffer zones are not guaranteed to have the correct values! Prolongation happens only in the last MoL poststep
+ # so we only need to sync in the last MoL post step.
schedule group GRHydro_PrimitiveBoundaries IN HydroBase_PostStep BEFORE HydroBase_Boundaries IF GRHydro::InLastMoLPostStep
{
} "Apply boundary conditions to primitives"
@@ -1160,14 +1182,21 @@ schedule GRHydro_ClearLastMoLPostStep IN CCTK_WRAGH
### This is executed in the last MoL_PosStep ###
################################################################
+# First (right after sync) we need to convert real (and synchronized mask) to an integer mask!
+schedule GRHydroPostSyncAtmosphereMask IN HydroBase_PostStep AFTER GRHydro_AtmosphereMaskBoundaries
+{
+ LANG: Fortran
+} "Set integer atmosphere mask from synchronized real atmosphere mask"
+
+# Afterwards, reset mask!
if (CCTK_Equals(Bvec_evolution_method,"GRHydro"))
{
- schedule GRHydro_AtmosphereResetM IN MoL_PostStep AFTER ADMBase_SetADMVars AFTER GRHydro_SetLastMoLPostStep BEFORE HydroBase_PostStep IF GRHydro::InLastMoLPostStep
+ schedule GRHydro_AtmosphereResetM IN HydroBase_PostStep AFTER GRHydroPostSyncAtmosphereMask BEFORE (HydroBase_Boundaries,GRHydro_PrimitiveBoundaries) IF GRHydro::InLastMoLPostStep
{
LANG: Fortran
} "Reset the atmosphere - MHD version"
} else {
- schedule GRHydro_AtmosphereReset IN MoL_PostStep AFTER ADMBase_SetADMVars BEFORE HydroBase_PostStep IF GRHydro::InLastMoLPostStep
+ schedule GRHydro_AtmosphereReset IN HydroBase_PostStep AFTER GRHydroPostSyncAtmosphereMask BEFORE (HydroBase_Boundaries,GRHydro_PrimitiveBoundaries) IF GRHydro::InLastMoLPostStep
{
LANG: Fortran
} "Reset the atmosphere"