User: rhaas Date: 2012/11/08 07:53 PM
Modified: /trunk/ interface.ccl, param.ccl /trunk/src/ GRHydro_Minima.F90, GRHydro_Prim2ConM.F90
Log: GRHydro: Introduce GRHydro_tau_min = 10^-10 max(tau(t=0)) to be used in tau rescaling in con2prim failures.
From: Bruno Coutinho Mundim bcmsma@astro.rit.edu
File Changes:
Directory: /trunk/src/ ======================
File [modified]: GRHydro_Minima.F90 Delta lines: +2 -0 =================================================================== --- trunk/src/GRHydro_Minima.F90 2012-11-09 01:53:16 UTC (rev 436) +++ trunk/src/GRHydro_Minima.F90 2012-11-09 01:53:19 UTC (rev 437) @@ -46,6 +46,8 @@
if (initial_atmosphere_factor > 0.0) GRHydro_rho_min = GRHydro_rho_min * initial_atmosphere_factor
+ GRHydro_tau_min = tau_rel_min + return
end subroutine GRHydro_Rho_Minima_Setup
File [modified]: GRHydro_Prim2ConM.F90 Delta lines: +19 -1 =================================================================== --- trunk/src/GRHydro_Prim2ConM.F90 2012-11-09 01:53:16 UTC (rev 436) +++ trunk/src/GRHydro_Prim2ConM.F90 2012-11-09 01:53:19 UTC (rev 437) @@ -453,10 +453,13 @@ CCTK_REAL :: xtemp(1) CCTK_INT :: i, j, k CCTK_REAL :: det + CCTK_REAL :: maxtau0 + + maxtau0 = -1.0d60
if(evolve_temper.ne.1) then
- !$OMP PARALLEL DO PRIVATE(k,j,i,det) + !$OMP PARALLEL DO PRIVATE(k,j,i,det), REDUCTION(MAX:maxtau0) do k = GRHydro_stencil,cctk_lsh(3)-GRHydro_stencil+1 do j = GRHydro_stencil,cctk_lsh(2)-GRHydro_stencil+1 do i = GRHydro_stencil,cctk_lsh(1)-GRHydro_stencil+1 @@ -473,10 +476,25 @@ eps(i,j,k),press(i,j,k),Bvecx(i,j,k), & Bvecy(i,j,k), Bvecz(i,j,k), w_lorentz(i,j,k))
+ maxtau0 = max(maxtau0,tau(i,j,k)) + end do end do end do !$OMP END PARALLEL DO + + ! TODO: to actually reduce GRHydro_tau_min over all Carpet components + ! we need to modify Carpet looping to allow this function to be called + ! on all AMR levels before calling any other function. The best would be + ! to set a special bin where functions would be called on all levels first + ! instead of calling all functions per level. The workaround for this problem + ! is to set GRHydro_tau_min to a user specified value as it was set in + ! GRHydro_Minima.F90. Once this issue is solved, then uncomment the line + ! below and create two other routines to be run in global mode so that + ! GRHydro_tau_min can be properly initialized and reduced. + + !GRHydro_tau_min = GRHydro_tau_min * maxtau0 + else !$OMP PARALLEL DO PRIVATE(k,j,i,det) do k = GRHydro_stencil,cctk_lsh(3)-GRHydro_stencil+1
Directory: /trunk/ ==================
File [modified]: interface.ccl Delta lines: +1 -0 =================================================================== --- trunk/interface.ccl 2012-11-09 01:53:16 UTC (rev 436) +++ trunk/interface.ccl 2012-11-09 01:53:19 UTC (rev 437) @@ -359,6 +359,7 @@ CCTK_REAL GRHydro_minima type = SCALAR { GRHydro_rho_min + GRHydro_tau_min # GRHydro_dens_min } "Atmosphere values"
File [modified]: param.ccl Delta lines: +5 -0 =================================================================== --- trunk/param.ccl 2012-11-09 01:53:16 UTC (rev 436) +++ trunk/param.ccl 2012-11-09 01:53:19 UTC (rev 437) @@ -404,6 +404,11 @@
##Parameters for the atmosphere.
+REAL tau_rel_min "A minimum relative tau (taumin = maxtau(t=0) * tau_rel_min) below which tau is reschaled" +{ + 0: :: "" +} 1.e-10 + REAL rho_abs_min "A minimum rho below which evolution is turned off (atmosphere). If negative, the relative minimum will be used instead." { -1.0: :: ""
commits@lists.einsteintoolkit.org