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

cleanup

parent 51fc0f1f
Branches
Tags
No related merge requests found
...@@ -440,8 +440,6 @@ namespace gmshfem::field ...@@ -440,8 +440,6 @@ namespace gmshfem::field
total_size += sizes[i]; total_size += sizes[i];
} }
// Synchronize the full array // Synchronize the full array
allSharedDofsArray.resize(total_size); allSharedDofsArray.resize(total_size);
...@@ -456,7 +454,7 @@ namespace gmshfem::field ...@@ -456,7 +454,7 @@ namespace gmshfem::field
std::unordered_map< DofIndex, unsigned long long, HashBySecond, std::equal_to<DofIndex> > allSharedDofs; std::unordered_map< DofIndex, unsigned long long, HashBySecond, std::equal_to<DofIndex> > allSharedDofs;
// Put in hashtable // Put in hashtable to check for duplicates.
for (const auto &entry : allSharedDofsArray) { for (const auto &entry : allSharedDofsArray) {
auto result = allSharedDofs.insert({{entry.type, entry.entity}, entry.global}); auto result = allSharedDofs.insert({{entry.type, entry.entity}, entry.global});
if (result.second == false) { if (result.second == false) {
...@@ -465,7 +463,7 @@ namespace gmshfem::field ...@@ -465,7 +463,7 @@ namespace gmshfem::field
return dof->numType() % GMSHFEM_DOF_FIELD_OFFSET == entry.type % GMSHFEM_DOF_FIELD_OFFSET && dof->entity() == entry.entity; return dof->numType() % GMSHFEM_DOF_FIELD_OFFSET == entry.type % GMSHFEM_DOF_FIELD_OFFSET && dof->entity() == entry.entity;
}); });
bool found = (it != _toSend.end()); bool found = (it != _toSend.end());
dumpOwnedKeys(); //dumpOwnedKeys();
throw common::Exception("[" + std::to_string(rank) + "] Duplicate dof in allSharedDofs. Type: " + std::to_string(entry.type) + throw common::Exception("[" + std::to_string(rank) + "] Duplicate dof in allSharedDofs. Type: " + std::to_string(entry.type) +
" Entity: " + std::to_string(entry.entity) + " Found in my owned dofs: " + std::to_string(found)); " Entity: " + std::to_string(entry.entity) + " Found in my owned dofs: " + std::to_string(found));
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment