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

knarf at cct.lsu.edu knarf at cct.lsu.edu
Sun Jun 20 16:53:40 CDT 2010


User: knarf
Date: 2010/06/20 04:53 PM

Modified:
 /trunk/src/
  GRHydro_PPM.F90

Log:
 Fix error in ppm when using GRHydro_enable_internal_excision == no (which is _not_ the default setting). Thanks go to Christian Ott.

File Changes:

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

File [modified]: GRHydro_PPM.F90
Delta lines: +11 -11
===================================================================
--- trunk/src/GRHydro_PPM.F90	2010-06-17 19:59:13 UTC (rev 122)
+++ trunk/src/GRHydro_PPM.F90	2010-06-20 21:53:39 UTC (rev 123)
@@ -441,8 +441,8 @@
       !!$ Do not optimize cond away by combining the 'if's. Fortran does not
       !!$  have to follow the order of sub-expressions given here and might
       !!$  access outside the array range
-      cond = i .gt. 1
-      if (cond .and. GRHydro_enable_internal_excision /= 0) then
+      cond = .false.
+      if (i .gt. 1 .and. GRHydro_enable_internal_excision /= 0) then
         cond = hydro_excision_mask(i-1) .ne. 0
       end if
       if (cond) then
@@ -469,9 +469,9 @@
           epsplus(i-1)=eps(i)
         end if
       else
-        cond = (i.gt.2) .and. (i.lt.nx)
-        if (cond .and. GRHydro_enable_internal_excision /= 0) then
-            cond = (ppm_mppm .eq. 0) .and. (hydro_excision_mask(i-2) .ne. 0)
+        cond = .false.
+        if ((i.gt.2) .and. (i.lt.nx) .and. GRHydro_enable_internal_excision /= 0) then
+          cond = (ppm_mppm .eq. 0) .and. (hydro_excision_mask(i-2) .ne. 0)
         end if
         if (cond) then
           call PPM_TVD(rho(i-1), rho(i), rho(i+1), rhominus(i), rhoplus(i))
@@ -483,9 +483,9 @@
           end if
         end if
       end if
-      cond = i.lt.nx
-      if (cond .and. GRHydro_enable_internal_excision /= 0) then
-          cond = hydro_excision_mask(i+1) .ne. 0
+      cond = .false.
+      if (i .lt. nx .and. GRHydro_enable_internal_excision /= 0) then
+        cond = hydro_excision_mask(i+1) .ne. 0
       end if
       if (cond) then
         rhominus(i)=rho(i)
@@ -511,9 +511,9 @@
           epsplus(i+1)=eps(i)
         endif
       else
-        cond = (i.lt.nx-1) .and. (i.gt.1)
-        if (cond .and. GRHydro_enable_internal_excision /= 0) then
-            cond = (ppm_mppm .eq. 0) .and. (hydro_excision_mask(i+2) .ne. 0)
+        cond = .false.
+        if ((i.lt.nx-1) .and. (i.gt.1) .and. GRHydro_enable_internal_excision /= 0) then
+          cond = (ppm_mppm .eq. 0) .and. (hydro_excision_mask(i+2) .ne. 0)
         end if
         if (cond) then
           call PPM_TVD(rho(i-1), rho(i), rho(i+1), rhominus(i), rhoplus(i))



More information about the Commits mailing list