diff --git a/CMake/cmake_config_files/MULE.config.cmake b/CMake/cmake_config_files/MULE.config.cmake index 245bc60ccfb807a4852638668993065e47391890..e4ccd6f5785dc10b52edf0ad860eac3ba43dcfbd 100644 --- a/CMake/cmake_config_files/MULE.config.cmake +++ b/CMake/cmake_config_files/MULE.config.cmake @@ -1,4 +1,5 @@ SET(CMAKE_CUDA_ARCHITECTURES "75") list(APPEND USER_APPS "apps/gpu/LBM/ActuatorLine") -list(APPEND USER_APPS "apps/gpu/LBM/BoundaryLayer") \ No newline at end of file +list(APPEND USER_APPS "apps/gpu/LBM/BoundaryLayer") +list(APPEND USER_APPS "apps/gpu/LBM/SphereScaling") \ No newline at end of file diff --git a/apps/gpu/LBM/BoundaryLayer/BoundaryLayer.cpp b/apps/gpu/LBM/BoundaryLayer/BoundaryLayer.cpp index 4a1078d98d806d7e91335ae62d699846b0fd3299..12a5d7dee85a2446d7e8af5c6fdb6179fc212203 100644 --- a/apps/gpu/LBM/BoundaryLayer/BoundaryLayer.cpp +++ b/apps/gpu/LBM/BoundaryLayer/BoundaryLayer.cpp @@ -248,11 +248,12 @@ void multipleLevel(const std::string& configPath) gridBuilder->addCoarseGrid( xGridMin, 0.0, 0.0, xGridMax, L_y, L_z, dx); - if(false)// Add refinement + if(true)// Add refinement { gridBuilder->setNumberOfLayers(4,0); real xMaxRefinement = readPrecursor? xGridMax-H: xGridMax; //Stop refinement some distance before outlet if domain ist not periodic gridBuilder->addGrid( new Cuboid( xGridMin+dx, 0.f, 0.f, xMaxRefinement, L_y, 0.5*L_z) , 1 ); + para->setMaxLevel(2); scalingFactory.setScalingFactory(GridScalingFactory::GridScaling::ScaleCompressible); } diff --git a/src/gpu/GridGenerator/grid/GridImp.cpp b/src/gpu/GridGenerator/grid/GridImp.cpp index 31d04ace4168a0824f36b7faad30745c891d87f7..24dd169e70288b9ae18a29c23dc0c74b14246e3f 100644 --- a/src/gpu/GridGenerator/grid/GridImp.cpp +++ b/src/gpu/GridGenerator/grid/GridImp.cpp @@ -1648,7 +1648,6 @@ bool GridImp::checkIfAtLeastOneValidQ(const uint index, const Vertex & point, co void GridImp::findCommunicationIndices(int direction, SPtr<BoundingBox> subDomainBox, LbmOrGks lbmOrGks) { for( uint index = 0; index < this->size; index++ ){ - real x, y, z; this->transIndexToCoords(index, x, y, z); @@ -1660,7 +1659,6 @@ void GridImp::findCommunicationIndices(int direction, SPtr<BoundingBox> subDomai if( lbmOrGks == LBM && this->getFieldEntry(index) == STOPPER_OUT_OF_GRID_BOUNDARY ) continue; if( lbmOrGks == LBM && this->getFieldEntry(index) == STOPPER_SOLID ) continue; - if( direction == CommunicationDirections::MX ) findCommunicationIndex( index, x, subDomainBox->minX, direction); if( direction == CommunicationDirections::PX ) findCommunicationIndex( index, x, subDomainBox->maxX, direction); if( direction == CommunicationDirections::MY ) findCommunicationIndex( index, y, subDomainBox->minY, direction); @@ -1668,39 +1666,17 @@ void GridImp::findCommunicationIndices(int direction, SPtr<BoundingBox> subDomai if( direction == CommunicationDirections::MZ ) findCommunicationIndex( index, z, subDomainBox->minZ, direction); if( direction == CommunicationDirections::PZ ) findCommunicationIndex( index, z, subDomainBox->maxZ, direction); } - real xS, yS, zS; - this->transIndexToCoords(this->communicationIndices[direction].sendIndices[0], xS, yS, zS); - real xR, yR, zR; - this->transIndexToCoords(this->communicationIndices[direction].receiveIndices[0], xR, yR, zR); - std::cout << "Dir: " << direction << " Sender: " << xS << " " << yS<< " " << zS<< " " - << this->communicationIndices[direction].sendIndices[0] << " " - << (int)this->getFieldEntry(this->communicationIndices[direction].sendIndices[0]) - << " Receiver: " << xR << " " << yR << " " << zR << " " - << this->communicationIndices[direction].receiveIndices[0] << " " - << (int)this->getFieldEntry(this->communicationIndices[direction].receiveIndices[0]) - << std::endl<< std::endl; - } void GridImp::findCommunicationIndex( uint index, real coordinate, real limit, int direction ){ // negative direction get a negative sign real s = ( direction % 2 == 0 ) ? ( -1.0 ) : ( 1.0 ); - bool send = false; - bool rec = false; - if (std::abs(coordinate - (limit + s * 0.5 * this->delta)) < 0.1 * this->delta) { + + if (std::abs(coordinate - (limit + s * 0.5 * this->delta)) < 0.1 * this->delta) this->communicationIndices[direction].receiveIndices.push_back(index); - rec = true; - } - if (std::abs(coordinate - (limit - s * 0.5 * this->delta)) < 0.1 * this->delta) { + if (std::abs(coordinate - (limit - s * 0.5 * this->delta)) < 0.1 * this->delta) this->communicationIndices[direction].sendIndices.push_back(index); - send = true; - } - if( false && (send || rec ) ) - { - std::cout << "Send Idx: " << index << " limit: " << limit << " coord: " << coordinate << " dir: " << direction << " send: " << send << " receive: " << rec << std::endl; - std::cout << "IDX: " << (int)this->getFieldEntry(index)<< std::endl; - } } bool GridImp::isSendNode(int index) const