[Commits] [svn:einsteintoolkit] GRHydro/trunk/ (Rev. 351)

rhaas at tapir.caltech.edu rhaas at tapir.caltech.edu
Tue Jun 5 15:51:49 CDT 2012


User: rhaas
Date: 2012/06/05 03:51 PM

Modified:
 /trunk/
  param.ccl
 /trunk/src/
  GRHydro_PreLoop.F90, GRHydro_Scalars.F90, GRHydro_TVDReconstruct.F90, make.code.defn

Log:
 GRHydro: Fix slope limiters and get rid of broken cases;
 
 there is a related patch in TRAC at the moment
 
 Patch by Josh Faber. 
 Some additional checks by Roland Haas.

File Changes:

Directory: /trunk/src/
======================

File [modified]: GRHydro_PreLoop.F90
Delta lines: +0 -9
===================================================================
--- trunk/src/GRHydro_PreLoop.F90	2012-06-05 20:50:25 UTC (rev 350)
+++ trunk/src/GRHydro_PreLoop.F90	2012-06-05 20:51:49 UTC (rev 351)
@@ -39,9 +39,6 @@
   DECLARE_CCTK_FUNCTIONS
 
   MINMOD = .false.
-  MINMOD2 = .false.
-  MINMOD3 = .false.
-  MC1 = .false.
   MC2 = .false.
   SUPERBEE = .false.
   HLLE = .false.
@@ -49,12 +46,6 @@
 
   if (CCTK_EQUALS(tvd_limiter,"minmod")) then
     MINMOD = .true.    
-  else if (CCTK_EQUALS(tvd_limiter,"minmod2")) then
-    MINMOD2 = .true.
-  else if (CCTK_EQUALS(tvd_limiter,"minmod3")) then
-    MINMOD3 = .true.
-  else if (CCTK_EQUALS(tvd_limiter,"vanleerMC")) then
-    MC1 = .true.
   else if (CCTK_EQUALS(tvd_limiter,"vanleerMC2")) then
     MC2 = .true.
   else if (CCTK_EQUALS(tvd_limiter,"Superbee")) then

File [modified]: GRHydro_Scalars.F90
Delta lines: +1 -1
===================================================================
--- trunk/src/GRHydro_Scalars.F90	2012-06-05 20:50:25 UTC (rev 350)
+++ trunk/src/GRHydro_Scalars.F90	2012-06-05 20:51:49 UTC (rev 351)
@@ -16,7 +16,7 @@
 
    implicit none
 
-   LOGICAL :: MINMOD, MINMOD2, MINMOD3, MC1, MC2, SUPERBEE, PPM3, PPM4
+   LOGICAL :: MINMOD, MC2, SUPERBEE, PPM3, PPM4
    LOGICAL :: ANALYTICAL
    LOGICAL :: FAST
    LOGICAL :: HLLE, LLF

File [modified]: GRHydro_TVDReconstruct.F90
Delta lines: +18 -14
===================================================================
--- trunk/src/GRHydro_TVDReconstruct.F90	2012-06-05 20:50:25 UTC (rev 350)
+++ trunk/src/GRHydro_TVDReconstruct.F90	2012-06-05 20:51:49 UTC (rev 351)
@@ -79,22 +79,26 @@
             dloc = orig(i+xoffset, j+yoffset, k+zoffset) - orig(i, j, k)
 
             if (MINMOD) then
-              delta = minmod_func(dupw,dloc)
+               delta = minmod_func(dupw,dloc)
             else if (MC2) then
-!!$            This is an alternative equivalent implementation 
-!!$              of vanLeeer MC slopelimiter
-              if (dupw*dloc < 0.d0) then
-                delta=0.d0
-              else 
-                delta=sign(min(2.d0*abs(dupw),2.d0*abs(dloc),&
-                     0.5d0*(abs(dupw)+abs(dloc))),dupw+dloc)
-              end if
+!!$            This is the van Leer MC slope limiter
+               if (dupw*dloc < 0.d0) then
+                  delta=0.d0
+               else 
+                  delta=sign(min(2.d0*abs(dupw),2.d0*abs(dloc),&
+                       0.5d0*(abs(dupw)+abs(dloc))),dupw+dloc)
+               end if
+            else if (SUPERBEE) then
+               if (dupw*dloc < 0.d0) then
+                  delta=0.d0
+               else 
+                  delta=sign(max(min(2.d0*abs(dupw),abs(dloc)),&
+                       min(2.d0*abs(dloc),abs(dupw))),dupw+dloc)
+               end if
             else
-              delta = 0.5d0*(dupw + dloc)
-              if (abs(dupw) < myfloor ) dupw = myfloor*sign(1.d0, dupw) 
-              if (abs(dloc) < myfloor ) dloc = myfloor*sign(1.d0, dloc) 
-              ratio = dupw / dloc
-              call slopelimiter(ratio, delta)
+               call CCTK_WARN(0, "Type of limiter not recognized")
+               ! NOTREACHED
+               delta = 0d0 
             end if
             hdelta = 0.5d0 * delta 
             bextm(i, j, k) = orig(i, j, k) - hdelta

File [modified]: make.code.defn
Delta lines: +0 -1
===================================================================
--- trunk/src/make.code.defn	2012-06-05 20:50:25 UTC (rev 350)
+++ trunk/src/make.code.defn	2012-06-05 20:51:49 UTC (rev 351)
@@ -35,7 +35,6 @@
 	GRHydro_RoeSolver.F90 \
 	GRHydro_Scalars.F90 \
 	GRHydro_Shift.F90 \
-	GRHydro_SlopeLimiter.F90 \
 	GRHydro_Source.F90 \
 	GRHydro_Startup.F90 \
 	GRHydro_TVDReconstruct.F90 \

Directory: /trunk/
==================

File [modified]: param.ccl
Delta lines: +0 -3
===================================================================
--- trunk/param.ccl	2012-06-05 20:50:25 UTC (rev 350)
+++ trunk/param.ccl	2012-06-05 20:51:49 UTC (rev 351)
@@ -116,10 +116,7 @@
 keyword tvd_limiter "Which slope limiter to use"
 {
   "minmod" 	:: "Minmod"
-  "vanleerMC"	:: "Van Leer MC - Ian"
   "vanleerMC2"	:: "Van Leer MC - Luca"
-  "minmod2"	:: "Minmod - Ian"
-  "minmod3"	:: "Minmod - Luca (or vice versa). Expect I've made a typo"
   "Superbee"	:: "Superbee"
 } "minmod"
 



More information about the Commits mailing list