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 <grzegorz@amuncode.org>
This commit is contained in:
Grzegorz Kowal 2018-01-17 08:24:53 -02:00
parent 27f7e9038e
commit 7da950f652

View File

@ -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)