Skip to content

Commit

Permalink
Merge pull request #25295 from GiudGiud/PR_mesh_repair_1
Browse files Browse the repository at this point in the history
Avoid removing from local-only nodes
  • Loading branch information
loganharbour authored Aug 24, 2023
2 parents a52b257 + b68ad2f commit 7a54ed3
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions framework/src/meshgenerators/MeshRepairGenerator.C
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ MeshRepairGenerator::generate()
auto pl = mesh->sub_point_locator();
std::unordered_set<dof_id_type> nodes_removed;
// loop on nodes
for (auto & node : mesh->local_node_ptr_range())
for (auto & node : mesh->node_ptr_range())
{
// this node has already been removed
if (nodes_removed.count(node->id()))
Expand Down Expand Up @@ -120,7 +120,13 @@ MeshRepairGenerator::generate()
}
}
_console << "Number of overlapping nodes which got merged: " << _num_fixed_nodes << std::endl;
mesh->remove_orphaned_nodes();
if (mesh->allow_renumbering())
mesh->renumber_nodes_and_elements();
else
{
mesh->remove_orphaned_nodes();
mesh->update_parallel_id_counts();
}
}

// Flip orientation of elements to keep positive volumes
Expand Down

0 comments on commit 7a54ed3

Please sign in to comment.