From 593947fcf1e292af6d126c7db3cae89b278388b7 Mon Sep 17 00:00:00 2001 From: rhaas Date: Tue, 5 Jun 2012 20:25:44 +0000 Subject: GRHydro: Added parameter to perform sync on conserved quantities only. Primitives are only sync'ed after regridding to get initial guesses. Schedule Primitive boundary call in PostRegridInitial if sync_only_coserved == yes. Fixed issue with the sync call in CCTK_EVOL after MoL_Evolution when sync_conserved_only==yes: Conserved vars must be synced here as well, otherwise conserved vars are reset to atmospshere whereas primitives are not! This is wrong. Patches by Christian Reisswig. git-svn-id: http://svn.einsteintoolkit.org/cactus/EinsteinEvolve/GRHydro/trunk@340 c83d129a-5a75-4d5a-9c4d-ed3a5855bf45 --- schedule.ccl | 59 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 58 insertions(+), 1 deletion(-) (limited to 'schedule.ccl') diff --git a/schedule.ccl b/schedule.ccl index 7e9b765..180b441 100644 --- a/schedule.ccl +++ b/schedule.ccl @@ -998,6 +998,8 @@ schedule group Do_GRHydro_Boundaries IN HydroBase_Boundaries { } "GRHydro Boundary conditions group" +if (!sync_conserved_only) +{ schedule GRHydro_Boundaries IN HydroBase_Select_Boundaries AS GRHydro_Bound { LANG: Fortran @@ -1022,7 +1024,62 @@ schedule GRHydro_Boundaries IN HydroBase_Select_Boundaries AS GRHydro_Bound SYNC: lvel SYNC: lBvec } "Select GRHydro boundary conditions" - +} +else +{ +schedule GRHydro_Boundaries IN HydroBase_Select_Boundaries AS GRHydro_Bound +{ + LANG: Fortran + OPTIONS: LEVEL + SYNC: dens + SYNC: tau + SYNC: scon + SYNC: Bcons + SYNC: psidc + SYNC: GRHydro_cons_tracers + SYNC: Y_e_con +} "Select GRHydro boundary conditions" + + # after a regrid Cactus relies on the boundary thorns to fill in the outer + # and symmetry boundaries (we need valid data for the initial guess in Con2Prim) + schedule group GRHydro_PrimitiveBoundaries IN CCTK_POSTREGRID BEFORE MoL_PostStep + { + } "Apply boundary conditions to primitives" + schedule group GRHydro_PrimitiveBoundaries IN CCTK_POSTREGRIDINITIAL BEFORE MoL_PostStep + { + } "Apply boundary conditions to primitives" + + # This is necessary, otherwise we are inconsistent in atmosphere treatment of conserved and primitive variables + if(!disable_sync_and_tmunu_after_MoL) { + schedule group GRHydro_PrimitiveBoundaries IN CCTK_EVOL AFTER (MoL_Evolution,GRHydro_AtmosphereReset,sync_GRHydro_C2P_failed) BEFORE HydroBase_Boundaries + { + } "Apply boundary conditions to primitives" + } + + schedule GRHydro_SelectPrimitiveBoundaries IN GRHydro_PrimitiveBoundaries + { + LANG: Fortran + OPTIONS: LEVEL + # do a sync to be very sure we have proper initial guesses everywhere + SYNC: HydroBase::w_lorentz + SYNC: HydroBase::rho + SYNC: HydroBase::press + SYNC: HydroBase::eps + SYNC: HydroBase::vel + SYNC: HydroBase::Bvec + SYNC: hydrobase::temperature + SYNC: hydrobase::entropy + SYNC: hydrobase::Y_e + SYNC: lvel + SYNC: lBvec + SYNC: GRHydro_tracers + } "Select primitive variables for boudary conditions" + schedule group ApplyBCs AS GRHydro_ApplyPrimitiveBCs in GRHydro_PrimitiveBoundaries AFTER GRHydro_SelectPrimitiveBoundaries + { + } "Apply boundary conditions to primitive variables" + +} + ############################################################ ### Compute first differences of rho for mesh refinement ### ############################################################ -- cgit v1.2.3