From cf7ee78e83d902d512dcae92faa0f820e86a0c62 Mon Sep 17 00:00:00 2001 From: Grzegorz Kowal Date: Wed, 9 Oct 2024 17:00:39 -0300 Subject: [PATCH] USER_PROBLEM: Fix plane selection for 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 df938a4..12d29fc 100644 --- a/sources/user_problem.F90 +++ b/sources/user_problem.F90 @@ -1037,7 +1037,7 @@ module user_problem do while(associated(pdata)) pmeta => pdata%meta - if (pmeta%xmin <= 0.0d+00 .and. pmeta%xmax >= 0.0d+00) then + if (pmeta%xmin <= 0.0d+00 .and. 0.0d+00 < pmeta%xmax) then dh(1) = adx(pmeta%level) dh(2) = ady(pmeta%level) @@ -1046,11 +1046,11 @@ module user_problem x(:) = pmeta%xmin + ax(pmeta%level,:) i = nb - do while(abs(x(i)) > dh(1) .and. i <= ne) + 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)