diff --git a/apps/gpu/LBM/MusselOyster/MusselOyster.cpp b/apps/gpu/LBM/MusselOyster/MusselOyster.cpp index bd5b7fce83d0f97c3e105cac6a3ed3632fb524a5..e277fc835d44b6e886c1f89f4386792df0b0f4c9 100644 --- a/apps/gpu/LBM/MusselOyster/MusselOyster.cpp +++ b/apps/gpu/LBM/MusselOyster/MusselOyster.cpp @@ -117,7 +117,7 @@ void multipleLevel(const std::string& configPath) std::string bivalveType = "MUSSEL"; // "MUSSEL" "OYSTER" std::string gridPath(gridPathParent + bivalveType); // only for GridGenerator, for GridReader the gridPath needs to be set in the config file - real dxGrid = (real)2.0; + real dxGrid = (real)1.0; real vxLB = (real)0.051; // LB units real Re = (real)300.0; real viscosityLB = (vxLB * dxGrid) / Re; @@ -131,9 +131,14 @@ void multipleLevel(const std::string& configPath) *logging::out << logging::Logger::INFO_HIGH << "viscosity LB [dx^2/dt] = " << viscosityLB << "\n"; *logging::out << logging::Logger::INFO_HIGH << "velocity real [m/s] = " << vxLB * para->getVelocityRatio()<< " \n"; *logging::out << logging::Logger::INFO_HIGH << "viscosity real [m^2/s] = " << viscosityLB * para->getViscosityRatio() << "\n"; + *logging::out << logging::Logger::INFO_HIGH << "dxGrid = " << dxGrid << "\n"; + *logging::out << logging::Logger::INFO_HIGH << "useGridGenerator = " << useGridGenerator << "\n"; + *logging::out << logging::Logger::INFO_HIGH << "useMultiGPU = " << useMultiGPU << "\n"; + *logging::out << logging::Logger::INFO_HIGH << "useStreams = " << useStreams << "\n"; - para->setTOut(10); - para->setTEnd(10); + + para->setTOut(10000); + para->setTEnd(10000); para->setCalcDragLift(false); para->setUseWale(false); @@ -242,8 +247,8 @@ void multipleLevel(const std::string& configPath) gridBuilder->setVelocityBoundaryCondition(SideType::PY, vxLB, 0.0, 0.0); gridBuilder->setVelocityBoundaryCondition(SideType::GEOMETRY, 0.0, 0.0, 0.0); ////////////////////////////////////////////////////////////////////////// - - gridBuilder->findFluidNodes(useStreams); + if (useStreams) + gridBuilder->findFluidNodes(useStreams); //gridBuilder->writeGridsToVtk(path + "/" + bivalveType + "/grid/part" + std::to_string(generatePart) + "_"); //gridBuilder->writeGridsToVtk(path + "/" + bivalveType + "/" + std::to_string(generatePart) + "/grid/"); @@ -272,8 +277,8 @@ void multipleLevel(const std::string& configPath) gridBuilder->setVelocityBoundaryCondition(SideType::GEOMETRY, 0.0, 0.0, 0.0); ////////////////////////////////////////////////////////////////////////// - - gridBuilder->findFluidNodes(useStreams); + if (useStreams) + gridBuilder->findFluidNodes(useStreams); // gridBuilder->writeGridsToVtk("E:/temp/MusselOyster/" + bivalveType + "/grid/"); // gridBuilder->writeArrows ("E:/temp/MusselOyster/" + bivalveType + "/arrow"); diff --git a/apps/gpu/LBM/MusselOyster/configMusselOyster.txt b/apps/gpu/LBM/MusselOyster/configMusselOyster.txt index f80b80469fade6f3e50841af1c47f4eba7e1e890..1cc65164170b72566efd7c09a86b4d712edc9a86 100644 --- a/apps/gpu/LBM/MusselOyster/configMusselOyster.txt +++ b/apps/gpu/LBM/MusselOyster/configMusselOyster.txt @@ -7,14 +7,14 @@ ################################################## #informations for Writing ################################################## -Path="E:/MusselOyster/results" +Path=E:/temp/MusselOysterResults #Path="F:/Work/Computations/out/MusselOyster/" #Prefix="MusselOyster" #WriteGrid=true ################################################## #informations for reading ################################################## -GridPath="E:/temp/GridMussel/MUSSEL" +GridPath=E:/temp/GridMussel/MUSSEL #GridPath="C:" ################################################## diff --git a/src/gpu/VirtualFluids_GPU/Communication/Communicator.cpp b/src/gpu/VirtualFluids_GPU/Communication/Communicator.cpp index 23fe11666d0608dfc763a156d10dce5a50427b75..80823e8c14bc54c7db75f36012b539c6d3f68a77 100644 --- a/src/gpu/VirtualFluids_GPU/Communication/Communicator.cpp +++ b/src/gpu/VirtualFluids_GPU/Communication/Communicator.cpp @@ -208,7 +208,7 @@ int Communicator::mapCudaDevice(const int &rank, const int &size, const std::vec std::vector<double> Communicator::gatherNUPS(double processNups) { double *buffer_send = &processNups; - double *buffer_recv = buffer_recv = (double *)malloc(sizeof(double) * this->numprocs); + double *buffer_recv = (double *)malloc(sizeof(double) * this->numprocs); MPI_Gather(buffer_send, 1, MPI_DOUBLE, buffer_recv, 1, MPI_DOUBLE, 0, commGPU); diff --git a/src/gpu/VirtualFluids_GPU/LBM/Simulation.cpp b/src/gpu/VirtualFluids_GPU/LBM/Simulation.cpp index 4985ab81b16207fe57e4caff20e6fccb924807f7..06f436f3ae9ce351ad49978cf0ce482d467bf694 100644 --- a/src/gpu/VirtualFluids_GPU/LBM/Simulation.cpp +++ b/src/gpu/VirtualFluids_GPU/LBM/Simulation.cpp @@ -87,8 +87,10 @@ void Simulation::init(SPtr<Parameter> para, SPtr<GridProvider> gridProvider, std gridProvider->allocAndCopyForcing(); gridProvider->allocAndCopyQuadricLimiters(); - gridProvider->allocArrays_fluidNodeIndices(); - gridProvider->allocArrays_fluidNodeIndicesBorder(); + if (para->getUseStreams()) { + gridProvider->allocArrays_fluidNodeIndices(); + gridProvider->allocArrays_fluidNodeIndicesBorder(); + } gridProvider->setDimensions(); gridProvider->setBoundingBox();