diff --git a/apps/gpu/LBM/DrivenCavity/DrivenCavity.cpp b/apps/gpu/LBM/DrivenCavity/DrivenCavity.cpp index 869989462593edf14b198efa598f95c1b7051ba9..9f31c9358620331dd45dd1ff1a32f29b677a6d13 100644 --- a/apps/gpu/LBM/DrivenCavity/DrivenCavity.cpp +++ b/apps/gpu/LBM/DrivenCavity/DrivenCavity.cpp @@ -95,7 +95,7 @@ const real dt = (real)1.0e-3; //0.5e-3; const uint nx = 64; -std::string path("."); +std::string path("D:/out/DrivenCavity/new"); std::string simulationName("DrivenCavityChim"); @@ -123,8 +123,18 @@ void multipleLevel(const std::string& configPath) real dx = L / real(nx); - gridBuilder->addCoarseGrid(-0.5 * L, -0.5 * L, -0.5 * L, - 0.5 * L, 0.5 * L, 0.5 * L, dx); + //gridBuilder->addCoarseGrid(-0.5 * L, -0.5 * L, -0.5 * L, + // 0.5 * L, 0.5 * L, 0.5 * L, dx); + + gridBuilder->addCoarseGrid(-2.0 * dx, -0.5 * L, -0.5 * L, + 2.0 * dx, 0.5 * L, 0.5 * L, dx); + + auto refBox = new Cuboid(-0.1 * L, -0.1 * L, -0.1 * L, + 0.1 * L, 0.1 * L, 0.1 * L); + + gridBuilder->addGrid(refBox, 1); + + gridBuilder->setNumberOfLayers(0, 0); gridBuilder->setPeriodicBoundaryCondition(false, false, false); @@ -166,13 +176,15 @@ void multipleLevel(const std::string& configPath) para->setDevices(std::vector<uint>{(uint)0}); + para->setOutputPath( path ); + para->setOutputPrefix( simulationName ); para->setFName(para->getOutputPath() + "/" + para->getOutputPrefix()); para->setPrintFiles(true); - para->setMaxLevel(1); + para->setMaxLevel(2); para->setVelocity(velocityLB); para->setViscosity(viscosityLB); @@ -202,6 +214,10 @@ void multipleLevel(const std::string& configPath) //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + gridBuilder->writeGridsToVtk(path + "/grid/"); + + //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + SPtr<CudaMemoryManager> cudaMemoryManager = CudaMemoryManager::make(para); SPtr<GridProvider> gridGenerator = GridProvider::makeGridGenerator(gridBuilder, para, cudaMemoryManager); diff --git a/gpu.cmake b/gpu.cmake index eef54759cfbbd7dff9b6c81d9d79b2f0ef0d09b1..44c3ce9ab3eb8d99ed8ede0ddc58bfe4112b78dd 100644 --- a/gpu.cmake +++ b/gpu.cmake @@ -31,12 +31,12 @@ IF (BUILD_VF_GPU) #add_subdirectory(targets/apps/LBM/BaselNU) #add_subdirectory(targets/apps/LBM/BaselMultiGPU) - #add_subdirectory(apps/gpu/LBM/DrivenCavity) + add_subdirectory(apps/gpu/LBM/DrivenCavity) add_subdirectory(apps/gpu/LBM/WTG_RUB) #add_subdirectory(apps/gpu/LBM/gridGeneratorTest) #add_subdirectory(apps/gpu/LBM/TGV_3D) #add_subdirectory(apps/gpu/LBM/TGV_3D_MultiGPU) - add_subdirectory(apps/gpu/LBM/ActuatorLine) + #add_subdirectory(apps/gpu/LBM/ActuatorLine) ELSE() MESSAGE( STATUS "exclude Virtual Fluids GPU." ) ENDIF()