User: rhaas Date: 2012/06/22 03:37 PM
Modified: /trunk/ interface.ccl, schedule.ccl /trunk/src/ GRHydro_Boundaries.F90, GRHydro_UpdateMask.F90
Log: Revert "* improve handling of cs2 < 0 in the "standard" (non-MHD, non-hot EOS) eigenvalue routine."
actually this introduce the real valued atmosphere mask.
This reverts commit deccf528b463820b615dfa73e46e137cd59c65be.
File Changes:
Directory: /trunk/src/ ======================
File [modified]: GRHydro_Boundaries.F90 Delta lines: +1 -6 =================================================================== --- trunk/src/GRHydro_Boundaries.F90 2012-06-22 20:37:44 UTC (rev 371) +++ trunk/src/GRHydro_Boundaries.F90 2012-06-22 20:37:46 UTC (rev 372) @@ -99,8 +99,6 @@ !endif endif
- call SetCartSymVN(ierr, cctkGH, sym, "GRHydro::atmosphere_mask_real") - sym(1) = -1 sym(2) = 1 sym(3) = 1 @@ -212,8 +210,6 @@ "GRHydro::tau", "Flat") ierr = ierr + Boundary_SelectGroupForBC(cctkGH, faces, GRHydro_stencil, -ione, & "GRHydro::scon", "Flat") - ierr = ierr + Boundary_SelectGroupForBC(cctkGH, faces, GRHydro_stencil, -ione, & - "GRHydro::GRHydro_atmosphere_mask_real", "Flat") if (sync_conserved_only .eq. 0) then ierr = ierr + Boundary_SelectGroupForBC(cctkGH, faces, GRHydro_stencil, -ione, & "HydroBase::w_lorentz", "Flat") @@ -286,8 +282,7 @@ "GRHydro::tau", "None") ierr = ierr + Boundary_SelectGroupForBC(cctkGH, faces, GRHydro_stencil, -ione, & "GRHydro::scon", "None") - ierr = ierr + Boundary_SelectGroupForBC(cctkGH, faces, GRHydro_stencil, -ione, & - "GRHydro::GRHydro_atmosphere_mask_real", "None") + if (sync_conserved_only .eq. 0) then ierr = ierr + Boundary_SelectGroupForBC(cctkGH, faces, GRHydro_stencil, -ione, & "HydroBase::w_lorentz", "None")
File [modified]: GRHydro_UpdateMask.F90 Delta lines: +2 -35 =================================================================== --- trunk/src/GRHydro_UpdateMask.F90 2012-06-22 20:37:44 UTC (rev 371) +++ trunk/src/GRHydro_UpdateMask.F90 2012-06-22 20:37:46 UTC (rev 372) @@ -48,9 +48,7 @@ densrhs(i,j,k) = 0.0d0 srhs(i,j,k,:) = 0.0d0 taurhs(i,j,k) = 0.0d0 - ! Set real-valued mask! This will be sync'ed and right after syncing translated to - ! our standard integer based mask (so that atmosphere_mask is still valid!). - atmosphere_mask_real(i,j,k) = 1 + atmosphere_mask(i,j,k) = 1 end if end do end do @@ -69,9 +67,7 @@ densrhs(i,j,k) = 0.0d0 srhs(i,j,k,:) = 0.0d0 taurhs(i,j,k) = 0.0d0 - ! Set real-valued mask! This will be sync'ed and right after syncing translated to - ! our standard integer based mask (so that atmosphere_mask is still valid!). - atmosphere_mask_real(i,j,k) = 1 + atmosphere_mask(i,j,k) = 1 end if end do end do @@ -81,33 +77,6 @@
end subroutine GRHydroUpdateAtmosphereMask
- -subroutine GRHydroPostSyncAtmosphereMask(CCTK_ARGUMENTS) - - implicit none - - DECLARE_CCTK_ARGUMENTS - DECLARE_CCTK_PARAMETERS - - CCTK_INT :: i,j,k - -!! This sets the integer atmo mask based on the real-valued (and sync'ed) atmo mask - - !$OMP PARALLEL DO PRIVATE(k,j,i) - do k = 1, cctk_lsh(3) - do j = 1, cctk_lsh(2) - do i = 1, cctk_lsh(1) - if ( atmosphere_mask_real(i,j,k) .ne. 0) then - atmosphere_mask(i,j,k) = 1 - end if - end do - end do - end do - !$OMP END PARALLEL DO - -end subroutine GRHydroPostSyncAtmosphereMask - - /*@@ @routine GRHydro_SetupMask @date Thu Jun 20 13:27:28 2002 @@ -147,7 +116,6 @@ endif
atmosphere_mask = 0 - atmosphere_mask_real = 0
call CCTK_INFO("Setting up the atmosphere mask: all points are not_atmosphere")
@@ -295,7 +263,6 @@ velz(i,j,k), eps(i,j,k), press(i,j,k), w_lorentz(i,j,k)) if (wk_atmosphere .eq. 0) then atmosphere_mask(i, j, k) = 0 - atmosphere_mask_real(i, j, k) = 0 end if endif
Directory: /trunk/ ==================
File [modified]: interface.ccl Delta lines: +0 -9 =================================================================== --- trunk/interface.ccl 2012-06-22 20:37:44 UTC (rev 371) +++ trunk/interface.ccl 2012-06-22 20:37:46 UTC (rev 372) @@ -424,15 +424,6 @@ atmosphere_mask } "Flags to say whether a point needs to be reset to the atmosphere"
-# This real mask is set during UpdateAtmosphereMask and sync'ed afterwards (including possible interpatch interpolation) -# After syn'ing and before any con2prim fun, we set the integer mask above based on the real-valued mask. -# This ensures that any routine using the int mask is still correctly working. -real GRHydro_atmosphere_mask_real type = GF Timelevels = 1 tags='Prolongation="copy"' -{ - atmosphere_mask_real -} "Flags to say whether a point needs to be reset to the atmosphere. This is sync'ed (and possibly interpolated)!" - - int GRHydro_atmosphere_descriptors type=SCALAR { atmosphere_field_descriptor
File [modified]: schedule.ccl Delta lines: +7 -11 =================================================================== --- trunk/schedule.ccl 2012-06-22 20:37:44 UTC (rev 371) +++ trunk/schedule.ccl 2012-06-22 20:37:46 UTC (rev 372) @@ -477,7 +477,6 @@ 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 @@ -1025,7 +1024,6 @@ SYNC: Y_e_con SYNC: lvel SYNC: lBvec - SYNC: GRHydro_atmosphere_mask_real # Must be synced otherwise we get inconsistent results when using multiple procs } "Select GRHydro boundary conditions" } else @@ -1041,7 +1039,6 @@ SYNC: psidc SYNC: GRHydro_cons_tracers SYNC: Y_e_con - SYNC: GRHydro_atmosphere_mask_real # Must be synced otherwise we get inconsistent results when using multiple procs } "Select GRHydro boundary conditions"
# after a regrid Cactus relies on the boundary thorns to fill in the outer @@ -1053,6 +1050,11 @@ { } "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)! + schedule group GRHydro_PrimitiveBoundaries IN HydroBase_PostStep BEFORE HydroBase_Boundaries IF GRHydro::InLastMoLPostStep + { + } "Apply boundary conditions to primitives" +
if(CCTK_IsImplementationActive("Coordinates")) {
@@ -1158,20 +1160,14 @@ ### This is executed in the last MoL_PosStep ### ################################################################
-# First we need to convert real (and synchronized mask) to an integer mask! -schedule GRHydroPostSyncAtmosphereMask IN HydroBase_PostStep AFTER HydroBase_Boundaries -{ - LANG: Fortran -} "Set integer atmosphere mask from synchronized real atmosphere mask" - if (CCTK_Equals(Bvec_evolution_method,"GRHydro")) { - schedule GRHydro_AtmosphereResetM IN HydroBase_PostStep BEFORE HydroBase_Con2Prim IF GRHydro::InLastMoLPostStep + schedule GRHydro_AtmosphereResetM IN MoL_PostStep AFTER ADMBase_SetADMVars AFTER GRHydro_SetLastMoLPostStep BEFORE HydroBase_PostStep IF GRHydro::InLastMoLPostStep { LANG: Fortran } "Reset the atmosphere - MHD version" } else { - schedule GRHydro_AtmosphereReset IN HydroBase_PostStep BEFORE HydroBase_Con2Prim IF GRHydro::InLastMoLPostStep + schedule GRHydro_AtmosphereReset IN MoL_PostStep AFTER ADMBase_SetADMVars BEFORE HydroBase_PostStep IF GRHydro::InLastMoLPostStep { LANG: Fortran } "Reset the atmosphere"