Commit a455083b authored by GILLES Sebastien's avatar GILLES Sebastien
Browse files

#745 Small improvement in Mpi wrapper.

parent f5f91e39
......@@ -290,8 +290,6 @@ namespace HappyHeart
void ApplyBoundaryCondition(const DirichletBoundaryCondition& boundary_condition, GlobalVector& vector) const;
private:
// Non constant access to the list of node bearers.
......@@ -303,8 +301,6 @@ namespace HappyHeart
//! Get non constant access to the geometric mesh region object.
GeometricMeshRegion& GetNonCstGeometricMeshRegion();
/*!
* \brief Return the list of all boundaries conditions.
*/
......@@ -313,8 +309,6 @@ namespace HappyHeart
private:
//! Init the nodes.
void CreateNodeList();
......
......@@ -146,7 +146,8 @@ namespace HappyHeart
ContainerT& gathered_data,
MpiNS::Op mpi_operation) const
{
gathered_data.resize(sent_data.size());
const auto size = sent_data.size();
gathered_data.resize(size);
using value_type = typename ContainerT::value_type;
const auto& mpi_datatype = Private::Mpi::MpiDatatype<value_type>::Type();
......@@ -159,7 +160,7 @@ namespace HappyHeart
MPI_Allreduce(sent_data.data(),
gathered_data.data(),
static_cast<int>(gathered_data.size()),
static_cast<int>(size),
mpi_datatype,
MpiNS::Operator(mpi_operation),
GetCommunicator());
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment