COORDINATES: Update toplev only if it was not changed before.

If we restart a job from a run with different maximum refinement level,
toplev parameter is set from a restart file and coordinate variables are
recreated. Setting toplev to maxlev all the time fails in recreating
correct coordinate variables and results in crashes.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
This commit is contained in:
Grzegorz Kowal 2019-01-26 11:35:53 -02:00
parent a9123e466a
commit d88a1396dd

View File

@ -59,7 +59,7 @@ module coordinates
! the limits of refinement level
!
integer , save :: minlev = 1, maxlev = 1, toplev = 1
integer , save :: minlev = 1, maxlev = 1, toplev = -1
! block indices
!
@ -255,7 +255,7 @@ module coordinates
! set the top level
!
toplev = maxlev
if (toplev == -1) toplev = maxlev
! obtain the domain base division
!