From 9ccce03abdb73b5c19900cbd0e375e20a77fbcc9 Mon Sep 17 00:00:00 2001
From: Grzegorz Kowal <grzegorz@amuncode.org>
Date: Fri, 14 Aug 2020 22:10:00 -0300
Subject: [PATCH] INTEGRALS: Clean up unused variables.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
---
 sources/integrals.F90 | 15 ++++++++++++---
 1 file changed, 12 insertions(+), 3 deletions(-)

diff --git a/sources/integrals.F90 b/sources/integrals.F90
index 251d817..6a7c4fe 100644
--- a/sources/integrals.F90
+++ b/sources/integrals.F90
@@ -367,8 +367,14 @@ module integrals
     use blocks         , only : block_meta, block_data, list_data
     use coordinates    , only : ni => ncells
     use coordinates    , only : nb, nbl, nbu, ne, nel, neu
-    use coordinates    , only : adx, ady, adz, advol, voli, periodic
-    use coordinates    , only : ymin, ymax, zmin, zmax, yarea, zarea
+    use coordinates    , only : adx, ady, adz, advol, voli
+#if NDIMS == 3
+    use coordinates    , only : periodic
+#endif /* NDIMS == 3 */
+    use coordinates    , only : ymin, ymax, yarea
+#if NDIMS == 3
+    use coordinates    , only : zmin, zmax, zarea
+#endif /* NDIMS == 3 */
     use equations      , only : idn, ipr, ivx, ivy, ivz, ibx, iby, ibz, ibp
     use equations      , only : ien, imx, imy, imz
     use equations      , only : magnetized, gamma, csnd
@@ -386,7 +392,10 @@ module integrals
 
 ! local variables
 !
-    real(kind=8)                  :: dvol, dvolh, dxy, dxz
+    real(kind=8)                  :: dvol, dvolh, dxz
+#if NDIMS == 3
+    real(kind=8)                  :: dxy
+#endif /* NDIMS == 3 */
     real(kind=8), dimension(3)    :: dh
 
 ! local pointers