aboutsummaryrefslogtreecommitdiff
path: root/schedule.ccl
diff options
context:
space:
mode:
authorrhaas <rhaas@c83d129a-5a75-4d5a-9c4d-ed3a5855bf45>2012-07-05 05:36:34 +0000
committerrhaas <rhaas@c83d129a-5a75-4d5a-9c4d-ed3a5855bf45>2012-07-05 05:36:34 +0000
commit29cf2193962132b07d38f135f4a0a9d633ef506d (patch)
tree2a7aba0e9dc10f9e1efaa955880f12b129a731d0 /schedule.ccl
parent03389d62d0ddb2c3e35d2e197d92990b105c60b1 (diff)
GRHydro: Fixes to atmosphere mask and the way we sync.
These are the changes as discussed with Roland. In particular, we sync the atmo mask in an extra call before all other syncs and then do atmo reset. Furthermore, primitives must always be synced in last post step in order to get initial guesses in the buffer zones via prolongation. Atmo reset must be done before prolongation to ensure we don't overwrite "good" data from the coarse grid! git-svn-id: http://svn.einsteintoolkit.org/cactus/EinsteinEvolve/GRHydro/trunk@377 c83d129a-5a75-4d5a-9c4d-ed3a5855bf45
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"