diff --git a/apps/gpu/LBM/MusselOyster3z/MusselOyster3z.cpp b/apps/gpu/LBM/MusselOyster3z/MusselOyster3z.cpp index d02b49721a425fe81be88ccd175e1220893ae4da..68c32a5db1cee855bea6eda1c62c5f2bd912aef7 100644 --- a/apps/gpu/LBM/MusselOyster3z/MusselOyster3z.cpp +++ b/apps/gpu/LBM/MusselOyster3z/MusselOyster3z.cpp @@ -206,7 +206,7 @@ void multipleLevel(const std::string& configPath) if (useMultiGPU) { const uint generatePart = vf::gpu::Communicator::getInstanz()->getPID(); - real overlap = (real)8.0 * dxGrid; + real overlap = (real)10.0 * dxGrid; const real zSplit = round(((double)bbzp + bbzm) * 0.5); if (generatePart == 0) { @@ -219,7 +219,7 @@ void multipleLevel(const std::string& configPath) } if (useLevels) { - gridBuilder->setNumberOfLayers(6, 8); + gridBuilder->setNumberOfLayers(8, 10); gridBuilder->addGrid(bivalveRef_1_STL, 1); } diff --git a/src/gpu/VirtualFluids_GPU/DataStructureInitializer/GridReaderGenerator/GridGenerator.cpp b/src/gpu/VirtualFluids_GPU/DataStructureInitializer/GridReaderGenerator/GridGenerator.cpp index 2c1636769a6d408fb9394504d8477495c4b71919..4096ddab535491448b8fea3c1050f6ea6b20cae5 100644 --- a/src/gpu/VirtualFluids_GPU/DataStructureInitializer/GridReaderGenerator/GridGenerator.cpp +++ b/src/gpu/VirtualFluids_GPU/DataStructureInitializer/GridReaderGenerator/GridGenerator.cpp @@ -891,7 +891,7 @@ void GridGenerator::reorderSendIndicesForCommAfterFtoC(int *sendIndices, int &nu *logging::out << logging::Logger::INFO_INTERMEDIATE << "reorder send indices for communication after fine to coarse: level: " << level << " direction: " << direction; - if (para->getParH(level)->K_CF == 0 || para->getParH(level)->K_FC == 0) + if (para->getParH(level)->intCF.kCF == 0 || para->getParH(level)->intFC.kFC == 0) *logging::out << logging::Logger::LOGGER_ERROR << "reorderSendIndicesForCommAfterFtoC(): iCellFCC needs to be inititalized before calling " "this function " @@ -907,7 +907,7 @@ void GridGenerator::reorderSendIndicesForCommAfterFtoC(int *sendIndices, int &nu for (uint posInSendIndices = 0; posInSendIndices < numberOfSendIndices; posInSendIndices++) { neighbors.fill(-1); sparseIndexSend = sendIndices[posInSendIndices]; - if (isSparseIndexInICellFCC(para->getParH(level)->K_CF, sparseIndexSend, level)) + if (isSparseIndexInICellFCC(para->getParH(level)->intFC.kFC, sparseIndexSend, level)) addUniqueIndexToCommunicationVectors(sendIndicesAfterFtoC, sparseIndexSend, sendIndicesForCommAfterFtoCPositions, posInSendIndices); } @@ -961,7 +961,7 @@ void GridGenerator::aggregateNodesInICellCFC(int level, std::vector<uint> &nodes uint *neighborY = para->getParH(level)->neighborY_SP; uint *neighborZ = para->getParH(level)->neighborZ_SP; - for (uint x = 0; x < para->getParH(level)->K_FC; x++) { + for (uint x = 0; x < para->getParH(level)->intCF.kCF; x++) { sparseIndex = para->getParH(level)->intCF.ICellCFC[x]; nodesCFC.push_back(sparseIndex); nodesCFC.push_back(neighborX[sparseIndex]); diff --git a/src/gpu/VirtualFluids_GPU/Output/FileWriter.cpp b/src/gpu/VirtualFluids_GPU/Output/FileWriter.cpp index be7540dccf60e02e70029895d220256b6093310e..0a9e34166652613659b5b1d609bc40d07f6cee76 100644 --- a/src/gpu/VirtualFluids_GPU/Output/FileWriter.cpp +++ b/src/gpu/VirtualFluids_GPU/Output/FileWriter.cpp @@ -230,9 +230,10 @@ void FileWriter::writeUnstrucuredGridLT(std::shared_ptr<Parameter> para, int lev nodedata[5][dn1] = (double)para->getParH(level)->geoSP[pos]; //int sendNode = 0; // 0 - not a sendNode; 1 - sendNode; 2 - sendNode in communication after fine to coarse - // testForSendNodeY(para, level, pos, sendNode); // slow and should not be done multiple times --> use for debugging only! + // testForSendNodeZ(para, level, pos, sendNode); // slow and should not be done multiple times --> use for debugging only! //nodedata[6][dn1] = (double) sendNode; // nodedata[7][dn1] = (double) pos; + ////////////////////////////////////////////////////////////////////////// number2 = para->getParH(level)->neighborX_SP[number1]; number3 = para->getParH(level)->neighborY_SP[number2]; @@ -283,6 +284,12 @@ void FileWriter::testForSendNodeY(std::shared_ptr<Parameter> ¶, int level, u ¶->getParH(level)->sendProcessNeighborsAfterFtoCY); } +void FileWriter::testForSendNodeZ(std::shared_ptr<Parameter> ¶, int level, unsigned int pos, int &sendNode) +{ + testForCommunicationNode(para, level, pos, sendNode, ¶->getParH(level)->sendProcessNeighborZ, + ¶->getParH(level)->sendProcessNeighborsAfterFtoCZ); +} + void FileWriter::testForCommunicationNode(std::shared_ptr<Parameter> ¶, int level, unsigned int pos, int &sendNode, std::vector<PN27> *sendOrRecvProcessNeighbor, std::vector<PN27> *sendOrRecvProcessNeighborAfterFtoC) diff --git a/src/gpu/VirtualFluids_GPU/Output/FileWriter.h b/src/gpu/VirtualFluids_GPU/Output/FileWriter.h index 28286034a3874b47232608e4164c09f71e013d66..99c82cbd70aeda67fb92bf0de7ff37e346ccaf11 100644 --- a/src/gpu/VirtualFluids_GPU/Output/FileWriter.h +++ b/src/gpu/VirtualFluids_GPU/Output/FileWriter.h @@ -27,9 +27,10 @@ private: void VIRTUALFLUIDS_GPU_EXPORT writeUnstrucuredGridLT(std::shared_ptr<Parameter> para, int level, std::vector<std::string> &fname); void testForSendNodeY(std::shared_ptr<Parameter> ¶, int level, unsigned int pos, int &sendNode); + void testForSendNodeZ(std::shared_ptr<Parameter> ¶, int level, unsigned int pos, int &sendNode); void testForCommunicationNode(std::shared_ptr<Parameter> ¶, int level, unsigned int pos, int &sendNode, - std::vector<PN27> *sendOrRecvProcessNeighbor, - std::vector<PN27> *sendOrRecvProcessNeighborAfterFtoC); + std::vector<PN27> *sendOrRecvProcessNeighbor, + std::vector<PN27> *sendOrRecvProcessNeighborAfterFtoC); void VIRTUALFLUIDS_GPU_EXPORT writeUnstrucuredGridLTConc(std::shared_ptr<Parameter> para, int level, std::vector<std::string >& fname); void VIRTUALFLUIDS_GPU_EXPORT writeUnstrucuredGridMedianLT(std::shared_ptr<Parameter> para, int level, std::vector<std::string >& fname); void VIRTUALFLUIDS_GPU_EXPORT writeUnstrucuredGridMedianLTConc(std::shared_ptr<Parameter> para, int level, std::vector<std::string >& fname);