diff --git a/src/field/DistributedField.cpp b/src/field/DistributedField.cpp index 5f1ea0d5eeb85001a7cdfc9b68ec7184ef8d692d..51ec71e2c0c5942d4f654f00e100184533fbb10d 100644 --- a/src/field/DistributedField.cpp +++ b/src/field/DistributedField.cpp @@ -258,9 +258,10 @@ namespace gmshfem::field } template< class T_Scalar, field::Form T_Form > - void DistributedField< T_Scalar, T_Form >::_computeToSend() + void DistributedField< T_Scalar, T_Form >::_computeToSend(const std::optional<std::vector<int>>& neighborRanks) { #ifdef HAVE_MPI + // What I have to send is what others have to read // Send all owned interfaces and inner dofs that are read by someone else std::vector< DofGlobalIndex > local, global; @@ -339,7 +340,7 @@ namespace gmshfem::field timeOwnership.tick(); msg::debug << '[' << gmshfem::common::GmshFem::getMPIRank() << "] synchronizes ownership of shared Dofs..." << msg::endl; _synchronizeInterfaceOwnership(neighboringRanks); - _computeToSend(); + _computeToSend(neighboringRanks); timeOwnership.tock(); msg::debug << "Dof ownership in " << timeOwnership << msg::endl; } diff --git a/src/field/DistributedField.h b/src/field/DistributedField.h index fe5bc175fc2c833d327fd6348fa0e3f108c7eee5..b52a90f519740d12cfde442448cde53c079c4178 100644 --- a/src/field/DistributedField.h +++ b/src/field/DistributedField.h @@ -54,8 +54,8 @@ namespace gmshfem::field private: void _computeDofsSubsets(); // Computes the sets above, assuming this->_values is filled. - void _synchronizeInterfaceOwnership(const std::optional<std::vector<int>>& neighboringRanks = std::nullopt); - void _computeToSend(); + void _synchronizeInterfaceOwnership(const std::optional<std::vector<int>>& neighboringRanks); + void _computeToSend(const std::optional<std::vector<int>>& neighboringRanks); public: virtual void preProMPI(const std::optional<std::vector<int>>& neighboringRanks = std::nullopt) override;