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

Adding the ranks topology arg to SynGlobalDofs

parent ebae657f
No related branches found
No related tags found
No related merge requests found
...@@ -391,7 +391,7 @@ namespace gmshfem::field ...@@ -391,7 +391,7 @@ 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 >::syncGlobalDofs(std::vector< unsigned long long > &localToGlobal, std::vector< unsigned long long > &readIDs) void DistributedField< T_Scalar, T_Form >::syncGlobalDofs(std::vector< unsigned long long > &localToGlobal, std::vector< unsigned long long > &readIDs, const std::optional<std::vector<int>>& neighboringRanks)
{ {
#ifdef HAVE_MPI #ifdef HAVE_MPI
......
...@@ -61,7 +61,7 @@ namespace gmshfem::field ...@@ -61,7 +61,7 @@ namespace gmshfem::field
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;
virtual std::unordered_set<dofs::Dof*> getAllOwnedDofs() override; virtual std::unordered_set<dofs::Dof*> getAllOwnedDofs() override;
virtual std::unordered_set<dofs::Dof*> getNonOwnedDofs() override; virtual std::unordered_set<dofs::Dof*> getNonOwnedDofs() override;
virtual void syncGlobalDofs(std::vector<unsigned long long>& localToGlobal, std::vector<unsigned long long>& readIDs) override; virtual void syncGlobalDofs(std::vector<unsigned long long>& localToGlobal, std::vector<unsigned long long>& readIDs, const std::optional<std::vector<int>>& neighboringRanks = std::nullopt) override;
void dumpOwnedKeys(); void dumpOwnedKeys();
public: public:
......
...@@ -169,7 +169,7 @@ namespace gmshfem::field ...@@ -169,7 +169,7 @@ namespace gmshfem::field
} }
template< class T_Scalar > template< class T_Scalar >
void FieldInterface< T_Scalar >::syncGlobalDofs(std::vector<unsigned long long>& localToGlobal, std::vector<unsigned long long>& readIDs) void FieldInterface< T_Scalar >::syncGlobalDofs(std::vector<unsigned long long>& localToGlobal, std::vector<unsigned long long>& readIDs, const std::optional<std::vector<int>>& neighboringRanks)
{ {
// Do nothing // Do nothing
} }
......
...@@ -244,7 +244,7 @@ namespace gmshfem::field ...@@ -244,7 +244,7 @@ namespace gmshfem::field
virtual void preProMPI(const std::optional<std::vector<int>>& neighboringRanks = std::nullopt); virtual void preProMPI(const std::optional<std::vector<int>>& neighboringRanks = std::nullopt);
virtual std::unordered_set<dofs::Dof*> getAllOwnedDofs(); virtual std::unordered_set<dofs::Dof*> getAllOwnedDofs();
virtual std::unordered_set<dofs::Dof*> getNonOwnedDofs(); virtual std::unordered_set<dofs::Dof*> getNonOwnedDofs();
virtual void syncGlobalDofs(std::vector<unsigned long long>& localToGlobal, std::vector<unsigned long long>& readIDs); virtual void syncGlobalDofs(std::vector<unsigned long long>& localToGlobal, std::vector<unsigned long long>& readIDs, const std::optional<std::vector<int>>& neighboringRanks = std::nullopt);
public: public:
......
...@@ -1242,7 +1242,7 @@ namespace gmshfem::problem ...@@ -1242,7 +1242,7 @@ namespace gmshfem::problem
timeSyncGlobal.tick(); timeSyncGlobal.tick();
/* A dof knows its gmsh ID and its global index -> let the field handle the sharing */ /* A dof knows its gmsh ID and its global index -> let the field handle the sharing */
for (auto [tag, fieldInterfacePtr] : _unknownFields) { for (auto [tag, fieldInterfacePtr] : _unknownFields) {
fieldInterfacePtr->syncGlobalDofs(localToGlobalMap, localIdOfNonOwned); fieldInterfacePtr->syncGlobalDofs(localToGlobalMap, localIdOfNonOwned, neighboringRanks);
} }
common::GmshFem::BarrierMPI(); common::GmshFem::BarrierMPI();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment