From efb98b79bea1a02044db59b44e97f72614afada9 Mon Sep 17 00:00:00 2001 From: Wenqing Wang <wenqing.wang@ufz.de> Date: Wed, 15 Sep 2021 10:56:36 +0200 Subject: [PATCH] [MeshComponentMap/PETSc] Corrected the usage of node ID of partition --- NumLib/DOF/MeshComponentMap.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/NumLib/DOF/MeshComponentMap.cpp b/NumLib/DOF/MeshComponentMap.cpp index 880435ca1a4..e476724b0b7 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); -- GitLab