From 5cf014773608b585a0b960dd04ac54c4204d4dc3 Mon Sep 17 00:00:00 2001 From: "TESLA03\\Master" <a.wellmann@tu-bs.de> Date: Tue, 20 Jul 2021 13:33:31 +0200 Subject: [PATCH] Simplify calculating the size of geoFluidNodeIndices --- src/gpu/GridGenerator/grid/GridImp.cu | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/src/gpu/GridGenerator/grid/GridImp.cu b/src/gpu/GridGenerator/grid/GridImp.cu index 980cda55b..40d66190c 100644 --- a/src/gpu/GridGenerator/grid/GridImp.cu +++ b/src/gpu/GridGenerator/grid/GridImp.cu @@ -861,25 +861,21 @@ CUDA_HOST void GridImp::updateSparseIndices() CUDA_HOST void GridImp::findMatrixIDsGEO_FLUID() // typeOfGridNode = para->getParD(level)->geoSP[index] { // auf Basis von getNodeValues und updateSparseIndices - int removedNodes = 0; + int geoFluidSize = 0; int geoFluidNodesIndex = 0; for (uint index = 0; index < size; index++) { - if (this->sparseIndices[index] == -1) { - removedNodes++; + if (this->sparseIndices[index] == -1) //unnötig? continue; - } if (this->field.isFluid(index)) { // + 1 for numbering shift between GridGenerator and VF_GPU geoFluidNodes[geoFluidNodesIndex] = index + 1; //+1 notwendig? geoFluidNodesIndex++; + geoFluidSize++; } /*if (typeOfGridNode[index] == GEO_FLUID) - geoFluidNodes.push_back(index); */ - else - removedNodes++; + geoFluidNodes.push_back(index); */ } - geoFluidSize = size - removedNodes; } HOSTDEVICE void GridImp::setNeighborIndices(uint index) -- GitLab