From 0f8aed46a14f071273a60ad931841a8304dbe28a Mon Sep 17 00:00:00 2001 From: Grzegorz Kowal Date: Fri, 4 Nov 2022 19:30:13 -0300 Subject: [PATCH] USER_PROBLEM: Fix slice selection for the magnetic flux integration. Signed-off-by: Grzegorz Kowal --- sources/user_problem.F90 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sources/user_problem.F90 b/sources/user_problem.F90 index 51bd607..5e15bfc 100644 --- a/sources/user_problem.F90 +++ b/sources/user_problem.F90 @@ -671,11 +671,11 @@ module user_problem x(:) = pmeta%xmin + ax(pmeta%level,:) i = nb - do while(abs(x(i)) > dh(1)) + do while(abs(x(i)) > dh(1) .and. i <= ne) i = i + 1 end do - if (nb <= i .and. i <= ne) then + if (nb < i .and. i <= ne) then dyz = ady(pmeta%level) * adz(pmeta%level) @@ -866,7 +866,7 @@ module user_problem rterms(7) = eta * rterms(6) rterms(8) = eta * rterms(7) - write(runit,"(9es25.15e3)") time, 5.0d-01 * rterms(1:8) + write(runit,"(9es25.15e3)") time, rterms(1:8) call flush_and_sync(runit) 100 continue