User: rhaas Date: 2013/05/29 11:35 AM
Modified: /trunk/ param.ccl /trunk/src/ GRHydro_Con2Prim.F90
Log: GRHydro: add option to control action taken when con2prim failed
From: Roland Haas rhaas@caltech.edu
File Changes:
Directory: /trunk/src/ ======================
File [modified]: GRHydro_Con2Prim.F90 Delta lines: +8 -1 =================================================================== --- trunk/src/GRHydro_Con2Prim.F90 2013-05-29 16:35:01 UTC (rev 528) +++ trunk/src/GRHydro_Con2Prim.F90 2013-05-29 16:35:04 UTC (rev 529) @@ -2288,6 +2288,7 @@
DECLARE_CCTK_PARAMETERS DECLARE_CCTK_ARGUMENTS + DECLARE_CCTK_FUNCTIONS
integer :: i, j, k, nx, ny, nz character(len=300) warnline @@ -2401,7 +2402,13 @@ write(warnline,'(a32,4g16.7)') 'lapse, shift: ',& alp(i,j,k),betax(i,j,k),betay(i,j,k),betaz(i,j,k) call CCTK_WARN(1,warnline) - call CCTK_WARN(0,"Aborting.") + if (CCTK_EQUALS(GRHydro_c2p_failed_action, "terminate")) then + call CCTK_TerminateNext(cctkGH) + else if (CCTK_EQUALS(GRHydro_c2p_failed_action, "abort")) then + call CCTK_ERROR("Aborting.") + else + call CCTK_ERROR("Internal error, unknown action") + end if !$OMP END CRITICAL
end if
Directory: /trunk/ ==================
File [modified]: param.ccl Delta lines: +6 -0 =================================================================== --- trunk/param.ccl 2013-05-29 16:35:01 UTC (rev 528) +++ trunk/param.ccl 2013-05-29 16:35:04 UTC (rev 529) @@ -397,6 +397,12 @@ 0:1 :: "Either 0 or 1" } 0
+keyword GRHydro_c2p_failed_action "what to do when we detect a c2p failure" +{ + "abort" :: "abort with error" + "terminate" :: "request termination" +} "abort" + REAL sqrtdet_thr "Threshold to apply cons rescalings deep inside the horizon" STEERABLE=ALWAYS { 1.0: :: "Larger values guarantees this sort of rescaling only deep inside the horizon"