From a41c3734da1a52a3feb7321106501a925155a58c Mon Sep 17 00:00:00 2001 From: David Schneller Date: Wed, 6 Mar 2024 10:05:08 +0100 Subject: [PATCH] Fix typos in the Netcdf reader --- src/input/NetCDFMesh.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/input/NetCDFMesh.h b/src/input/NetCDFMesh.h index 358b5ed..fac05f7 100644 --- a/src/input/NetCDFMesh.h +++ b/src/input/NetCDFMesh.h @@ -154,7 +154,7 @@ class NetCDFMesh : public FullStorageMeshData { std::size_t vertexOffset = 0; for (std::size_t i = 0; i < nLocalPart; i++) { std::copy_n(partitions[i].vertices(), partitions[i].nVertices() * 3, - geometryData.begin() + vertexOffset * 3); + verticesLocal.begin() + vertexOffset * 3); vertexOffset += partitions[i].nVertices(); } @@ -169,6 +169,7 @@ class NetCDFMesh : public FullStorageMeshData { std::copy_n(filter.localVertices().begin(), nVertices * 3, geometryData.begin()); std::size_t elementOffset = 0; + vertexOffset = 0; for (std::size_t i = 0; i < nLocalPart; i++) { #ifdef _OPENMP #pragma omp parallel for schedule(static) @@ -192,6 +193,7 @@ class NetCDFMesh : public FullStorageMeshData { groupData.begin() + elementOffset); elementOffset += partitions[i].nElements(); + vertexOffset += partitions[i].nVertices(); } logInfo(rank) << "Converting local to global vertex identifier";