diff --git a/NumLib/DOF/MeshComponentMap.cpp b/NumLib/DOF/MeshComponentMap.cpp index 880435ca1a4c8a2d4d5c540d8a89f9f64b4168f5..e476724b0b74ef07369c5b104b6cd7a97d7b8a55 100644 --- a/NumLib/DOF/MeshComponentMap.cpp +++ b/NumLib/DOF/MeshComponentMap.cpp @@ -359,11 +359,11 @@ void MeshComponentMap::createParallelMeshComponentMap( // mesh items are ordered first by node, cell, .... for (std::size_t j = 0; j < c.getNumberOfNodes(); j++) { + const auto node_id = c.getNodeID(j); GlobalIndexType global_index = static_cast<GlobalIndexType>( - components.size() * partitioned_mesh.getGlobalNodeID(j) + + components.size() * partitioned_mesh.getGlobalNodeID(node_id) + comp_id); - const bool is_ghost = partitioned_mesh.isGhostNode( - partitioned_mesh.getNode(j)->getID()); + const bool is_ghost = partitioned_mesh.isGhostNode(node_id); if (is_ghost) { _ghosts_indices.push_back(global_index);