Skip to content
Snippets Groups Projects
Commit 2137c323 authored by Boris Martin's avatar Boris Martin
Browse files

Preparing for upgrading toSend

parent 06657626
No related branches found
No related tags found
No related merge requests found
Pipeline #12704 failed
...@@ -258,9 +258,10 @@ namespace gmshfem::field ...@@ -258,9 +258,10 @@ namespace gmshfem::field
} }
template< class T_Scalar, field::Form T_Form > 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 #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 // Send all owned interfaces and inner dofs that are read by someone else
std::vector< DofGlobalIndex > local, global; std::vector< DofGlobalIndex > local, global;
...@@ -339,7 +340,7 @@ namespace gmshfem::field ...@@ -339,7 +340,7 @@ namespace gmshfem::field
timeOwnership.tick(); timeOwnership.tick();
msg::debug << '[' << gmshfem::common::GmshFem::getMPIRank() << "] synchronizes ownership of shared Dofs..." << msg::endl; msg::debug << '[' << gmshfem::common::GmshFem::getMPIRank() << "] synchronizes ownership of shared Dofs..." << msg::endl;
_synchronizeInterfaceOwnership(neighboringRanks); _synchronizeInterfaceOwnership(neighboringRanks);
_computeToSend(); _computeToSend(neighboringRanks);
timeOwnership.tock(); timeOwnership.tock();
msg::debug << "Dof ownership in " << timeOwnership << msg::endl; msg::debug << "Dof ownership in " << timeOwnership << msg::endl;
} }
......
...@@ -54,8 +54,8 @@ namespace gmshfem::field ...@@ -54,8 +54,8 @@ namespace gmshfem::field
private: private:
void _computeDofsSubsets(); // Computes the sets above, assuming this->_values is filled. void _computeDofsSubsets(); // Computes the sets above, assuming this->_values is filled.
void _synchronizeInterfaceOwnership(const std::optional<std::vector<int>>& neighboringRanks = std::nullopt); void _synchronizeInterfaceOwnership(const std::optional<std::vector<int>>& neighboringRanks);
void _computeToSend(); void _computeToSend(const std::optional<std::vector<int>>& neighboringRanks);
public: public:
virtual void preProMPI(const std::optional<std::vector<int>>& neighboringRanks = std::nullopt) override; virtual void preProMPI(const std::optional<std::vector<int>>& neighboringRanks = std::nullopt) override;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment