aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorknarf <knarf@c83d129a-5a75-4d5a-9c4d-ed3a5855bf45>2010-06-20 21:53:39 +0000
committerknarf <knarf@c83d129a-5a75-4d5a-9c4d-ed3a5855bf45>2010-06-20 21:53:39 +0000
commit0c3916b7b49b77a4a47b216b8eb4380c6c35324f (patch)
tree5fb609b5a64c841c7a51caaae28b0918a6b08067
parenta781e848e79ceff08f24f4caacabbb236a7a1862 (diff)
Fix error in ppm when using GRHydro_enable_internal_excision == no (which is _not_ the default setting). Thanks go to Christian Ott.
git-svn-id: http://svn.einsteintoolkit.org/cactus/EinsteinEvolve/GRHydro/trunk@123 c83d129a-5a75-4d5a-9c4d-ed3a5855bf45
-rw-r--r--src/GRHydro_PPM.F9022
1 files changed, 11 insertions, 11 deletions
diff --git a/src/GRHydro_PPM.F90 b/src/GRHydro_PPM.F90
index dc40274..9a8a3ce 100644
--- a/src/GRHydro_PPM.F90
+++ b/src/GRHydro_PPM.F90
@@ -441,8 +441,8 @@ do i = GRHydro_stencil, nx - GRHydro_stencil + 1
!!$ 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 @@ do i = GRHydro_stencil, nx - GRHydro_stencil + 1
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 @@ do i = GRHydro_stencil, nx - GRHydro_stencil + 1
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 @@ do i = GRHydro_stencil, nx - GRHydro_stencil + 1
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))