From 4b7615e72f22b642621561c403eef473451b6c72 Mon Sep 17 00:00:00 2001 From: Grzegorz Kowal Date: Fri, 8 Mar 2019 07:03:39 -0300 Subject: [PATCH] INTEGRALS: Use 'magnetized' instead of 'ibx > 0'. Signed-off-by: Grzegorz Kowal --- sources/integrals.F90 | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/sources/integrals.F90 b/sources/integrals.F90 index 462e43a..8d8884a 100644 --- a/sources/integrals.F90 +++ b/sources/integrals.F90 @@ -319,7 +319,7 @@ module integrals use coordinates , only : advol, voli use equations , only : idn, ipr, ivx, ivy, ivz, ibx, iby, ibz, ibp use equations , only : ien, imx, imy, imz - use equations , only : gamma, csnd + use equations , only : magnetized, gamma, csnd use evolution , only : step, time, dtn use mpitools , only : master #ifdef MPI @@ -384,7 +384,7 @@ module integrals mnarr(2) = 0.0d+00 mxarr(2) = 0.0d+00 end if - if (ibx < 1) then + if (.not. magnetized) then mnarr(4) = 0.0d+00 mxarr(4) = 0.0d+00 mnarr(5) = 0.0d+00 @@ -446,7 +446,7 @@ module integrals ! sum up magnetic energy ! - if (ibx > 0) then + if (magnetized) then #if NDIMS == 3 inarr(7) = inarr(7) + sum(pdata%u(ibx,nb:ne,nb:ne,nb:ne)**2 & + pdata%u(iby,nb:ne,nb:ne,nb:ne)**2 & @@ -496,7 +496,7 @@ module integrals ! get average, minimum and maximum values of magnetic field amplitude, and ! divergence potential ! - if (ibx > 0) then + if (magnetized) then #if NDIMS == 3 mag(:,:,:) = sqrt(sum(pdata%q(ibx:ibz,nb:ne,nb:ne,nb:ne)**2, 1)) #else /* NDIMS == 3 */ @@ -542,7 +542,7 @@ module integrals ! get average, minimum and maximum values of Alfvénic Mach number ! - if (ibx > 0) then + if (magnetized) then tmp(:,:,:) = sqd(:,:,:) * vel(:,:,:) / max(eps, mag(:,:,:)) avarr(7) = avarr(7) + sum(tmp(:,:,:)) * dvol mnarr(7) = min(mnarr(7), minval(tmp(:,:,:)))