From 7da950f6521b06fc43a14d13b9efe9525771fadd Mon Sep 17 00:00:00 2001 From: Grzegorz Kowal Date: Wed, 17 Jan 2018 08:24:53 -0200 Subject: [PATCH] EQUATIONS: Fix a bug in correct_unphysical_states(). The condition for taking the surrounding region was supposed to be based on the number of physical cells available. Unfortunately, the counter for unphysical cell was checked instead. Fix it. Also increase the maximum region to four cells away. Signed-off-by: Grzegorz Kowal --- src/equations.F90 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/equations.F90 b/src/equations.F90 index 2629e78..0af0757 100644 --- a/src/equations.F90 +++ b/src/equations.F90 @@ -1189,7 +1189,7 @@ module equations ! np = 0 p = 1 - do while (n < 2 .and. p < 3) + do while (np < 2 .and. p <= 4) il = max( 1, i - p) iu = min(im, i + p) jl = max( 1, j - p)