Skip to content
Snippets Groups Projects
Commit 26203900 authored by Jean-Matthieu Etancelin's avatar Jean-Matthieu Etancelin
Browse files

Fix a bad use of MPI precision

parent 6474c1d6
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment