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

constcorrectness

parent 1c0c4034
No related branches found
No related tags found
No related merge requests found
Pipeline #12955 failed
...@@ -379,13 +379,13 @@ namespace gmshfem::field ...@@ -379,13 +379,13 @@ namespace gmshfem::field
} }
template< class T_Scalar, field::Form T_Form > template< class T_Scalar, field::Form T_Form >
std::unordered_set< dofs::Dof * > DistributedField< T_Scalar, T_Form >::getAllOwnedDofs() std::unordered_set< dofs::Dof * > DistributedField< T_Scalar, T_Form >::getAllOwnedDofs() const
{ {
return _ownedDofs; return _ownedDofs;
} }
template< class T_Scalar, field::Form T_Form > template< class T_Scalar, field::Form T_Form >
std::unordered_set< dofs::Dof * > DistributedField< T_Scalar, T_Form >::getNonOwnedDofs() std::unordered_set< dofs::Dof * > DistributedField< T_Scalar, T_Form >::getNonOwnedDofs() const
{ {
return _toRead; return _toRead;
} }
......
...@@ -59,8 +59,8 @@ namespace gmshfem::field ...@@ -59,8 +59,8 @@ namespace gmshfem::field
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;
virtual std::unordered_set<dofs::Dof*> getAllOwnedDofs() override; virtual std::unordered_set<dofs::Dof*> getAllOwnedDofs() const override;
virtual std::unordered_set<dofs::Dof*> getNonOwnedDofs() override; virtual std::unordered_set<dofs::Dof*> getNonOwnedDofs() const 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; 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();
......
...@@ -151,7 +151,7 @@ namespace gmshfem::field ...@@ -151,7 +151,7 @@ namespace gmshfem::field
} }
template< class T_Scalar > template< class T_Scalar >
std::unordered_set< dofs::Dof * > FieldInterface< T_Scalar >::getAllOwnedDofs() std::unordered_set< dofs::Dof * > FieldInterface< T_Scalar >::getAllOwnedDofs() const
{ {
// By default, all DOFs are owned // By default, all DOFs are owned
...@@ -162,7 +162,7 @@ namespace gmshfem::field ...@@ -162,7 +162,7 @@ namespace gmshfem::field
} }
template< class T_Scalar > template< class T_Scalar >
std::unordered_set< dofs::Dof * > FieldInterface< T_Scalar >::getNonOwnedDofs() std::unordered_set< dofs::Dof * > FieldInterface< T_Scalar >::getNonOwnedDofs() const
{ {
// Empty by default // Empty by default
return std::unordered_set< dofs::Dof * >(); return std::unordered_set< dofs::Dof * >();
......
...@@ -242,8 +242,8 @@ namespace gmshfem::field ...@@ -242,8 +242,8 @@ namespace gmshfem::field
public: public:
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() const;
virtual std::unordered_set<dofs::Dof*> getNonOwnedDofs(); virtual std::unordered_set<dofs::Dof*> getNonOwnedDofs() const;
virtual void syncGlobalDofs(std::vector<unsigned long long>& localToGlobal, std::vector<unsigned long long>& readIDs, const std::optional<std::vector<int>>& neighboringRanks = std::nullopt); virtual void syncGlobalDofs(std::vector<unsigned long long>& localToGlobal, std::vector<unsigned long long>& readIDs, const std::optional<std::vector<int>>& neighboringRanks = std::nullopt);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment