From feaf04798f47cc8a54ad7503d90b08dc0864c786 Mon Sep 17 00:00:00 2001 From: Jesse Carter Date: Mon, 6 Jan 2025 16:35:12 -0700 Subject: [PATCH] use node iterator instead of node ids so mesh with non-contiguous node numberings can be used, closes #29652 --- framework/src/meshgenerators/ParsedGenerateNodeset.C | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/framework/src/meshgenerators/ParsedGenerateNodeset.C b/framework/src/meshgenerators/ParsedGenerateNodeset.C index c7de9e591649..10d0ed9e51a8 100644 --- a/framework/src/meshgenerators/ParsedGenerateNodeset.C +++ b/framework/src/meshgenerators/ParsedGenerateNodeset.C @@ -95,11 +95,8 @@ ParsedGenerateNodeset::generate() mooseAssert(nodeset_ids.size() == 1, "Length of nodeset_ids should be one"); // Loop over nodes - for (const auto node_id : make_range(mesh->n_nodes())) + for (const auto curr_node : as_range(mesh->active_nodes_begin(), mesh->active_nodes_end())) { - // Get a pointer to the node - const auto curr_node = mesh->query_node_ptr(node_id); - // Get all nodesets the node is currently a part of const auto & node_nodesets_iters = nodeset_map.equal_range(curr_node);