From 2620390084b3f95c5b27dcff3cde066046c40829 Mon Sep 17 00:00:00 2001
From: Jean-Matthieu Etancelin <jean-matthieu.etancelin@imag.fr>
Date: Wed, 26 Feb 2014 15:34:42 +0000
Subject: [PATCH] Fix a bad use of MPI precision

---
 HySoP/hysop/operator/monitors/compute_forces.py | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/HySoP/hysop/operator/monitors/compute_forces.py b/HySoP/hysop/operator/monitors/compute_forces.py
index c6a6dc9b8..038600f8c 100644
--- a/HySoP/hysop/operator/monitors/compute_forces.py
+++ b/HySoP/hysop/operator/monitors/compute_forces.py
@@ -4,7 +4,7 @@
 Compute forces
 """
 from parmepy.constants import debug, np, ORDER, \
-    PARMES_INTEGER, PI, XDIR, YDIR, ZDIR
+    PARMES_INTEGER, PI, XDIR, YDIR, ZDIR, PARMES_MPI_REAL
 from parmepy.numerics.updateGhosts import UpdateGhosts
 from parmepy.numerics.differential_operations import Laplacian,\
     DivStressTensor3D
@@ -573,7 +573,8 @@ class Forces(Monitoring):
             # Reduction operation
             if self.topo.comm.Get_rank() == 0:
                 comm = self.topo.comm
-                comm.Reduce([localForce, MPI.DOUBLE], [force, MPI.DOUBLE],
+                comm.Reduce([localForce, PARMES_MPI_REAL],
+                            [force, PARMES_MPI_REAL],
                             op=MPI.SUM, root=0)
                 force = force * self.coef
                 # Print drag, lift and side force coefficients in output file
-- 
GitLab