From 88fec39859f0e450350db95eb759eab955c8d569 Mon Sep 17 00:00:00 2001 From: Anna Wellmann <a.wellmann@tu-braunschweig.de> Date: Fri, 6 Aug 2021 14:28:48 +0200 Subject: [PATCH] Use sendNodes as border nodes instead of bc nodes --- src/gpu/GridGenerator/grid/GridImp.cu | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/gpu/GridGenerator/grid/GridImp.cu b/src/gpu/GridGenerator/grid/GridImp.cu index 3cb312617..4ec62b88c 100644 --- a/src/gpu/GridGenerator/grid/GridImp.cu +++ b/src/gpu/GridGenerator/grid/GridImp.cu @@ -871,7 +871,8 @@ CUDA_HOST void GridImp::findFluidNodeIndices(bool splitDomain) // When not splitDomain: push indices of all fluid nodes to "fluidNodeIndices" if (this->field.isFluid(index)) { if (splitDomain) - if (this->field.isFluidNodeOfSpecialInterest(index)) + //if (this->field.isFluidNodeOfSpecialInterest(index)) + if (this->isSendNode(index)) this->fluidNodeIndicesBorder.push_back((uint)sparseIndex + 1); else this->fluidNodeIndices.push_back((uint)sparseIndex + 1); @@ -1580,23 +1581,21 @@ void GridImp::findCommunicationIndex( uint index, real coordinate, real limit, i bool GridImp::isSendNode(int index) const { bool isSendNode = false; - for (size_t direction = 0; direction < this->communicationIndices.size(); direction++) { + for (size_t direction = 0; direction < this->communicationIndices.size(); direction++) if (std::find(this->communicationIndices[direction].sendIndices.begin(), this->communicationIndices[direction].sendIndices.end(), index) != this->communicationIndices[direction].sendIndices.end()) isSendNode = true; - } return isSendNode; } bool GridImp::isReceiveNode(int index) const { bool isReceiveNode = false; - for (size_t direction = 0; direction < this->communicationIndices.size(); direction++) { + for (size_t direction = 0; direction < this->communicationIndices.size(); direction++) if (std::find(this->communicationIndices[direction].receiveIndices.begin(), this->communicationIndices[direction].receiveIndices.end(), index) != this->communicationIndices[direction].receiveIndices.end()) isReceiveNode = true; - } return isReceiveNode; } -- GitLab