From ab398713171b4fa6bbc12a13707d5ab413e939e5 Mon Sep 17 00:00:00 2001 From: Soeren Peters <peters@irmb.tu-bs.de> Date: Thu, 25 Feb 2021 11:26:51 +0100 Subject: [PATCH] Switch to W3 warning level on windows for now. --- CMake/3rd/boost.cmake | 2 - CMake/compilerflags/MSVC.cmake | 8 +- src/gpu/GridGenerator/CMakeLists.txt | 5 +- .../GridGenerator/geometries/Sphere/Sphere.cu | 8 +- .../geometries/Triangle/Triangle.cu | 2 +- .../grid/GridBuilder/LevelGridBuilder.cpp | 6 +- src/gpu/VirtualFluids_GPU/Calculation/Cp.cpp | 134 +++++++++--------- src/gpu/VirtualFluids_GPU/GPU/Cumulant27.cu | 2 +- .../VirtualFluids_GPU/GPU/Cumulant_F3_27.cu | 6 +- .../CumulantAll4CompSP27_Device.cu | 4 +- .../CumulantK15/CumulantK15Incomp_Device.cu | 2 +- .../Mod27/ADIncomp27/ADIncomp27_Device.cu | 2 +- 12 files changed, 93 insertions(+), 88 deletions(-) diff --git a/CMake/3rd/boost.cmake b/CMake/3rd/boost.cmake index 74f6f165c..89d4bfd87 100644 --- a/CMake/3rd/boost.cmake +++ b/CMake/3rd/boost.cmake @@ -30,10 +30,8 @@ function(linkBoost) if(DEFINED ARG_COMPONENTS) find_package( Boost REQUIRED COMPONENTS ${ARG_COMPONENTS}) target_link_libraries(${library_name} PRIVATE ${Boost_LIBRARIES}) - message("here") else() find_package( Boost REQUIRED) - message("or here") endif() diff --git a/CMake/compilerflags/MSVC.cmake b/CMake/compilerflags/MSVC.cmake index 2af38d98e..73c1d765b 100644 --- a/CMake/compilerflags/MSVC.cmake +++ b/CMake/compilerflags/MSVC.cmake @@ -8,7 +8,7 @@ list(APPEND CS_COMPILER_FLAGS_CXX "-MP") # enable multi-threaded compiling ############################################################################################################# # warnings ############################################################################################################# -list(APPEND CS_COMPILER_FLAGS_CXX "/W4") # highest warning level +list(APPEND CS_COMPILER_FLAGS_CXX "/W3") # highest warning level # With W4 the following warnings appear many times. As long they are not eliminated they are suppressed: list(APPEND CS_COMPILER_FLAGS_CXX "/wd4458") # C4458: declaration of 'XXX' hides class member @@ -25,6 +25,12 @@ list(APPEND CS_COMPILER_FLAGS_CXX "/wd4701") # C4701: potentially uninitialized list(APPEND CS_COMPILER_FLAGS_CXX "/wd4251") # disable needs to have dll interface list(APPEND CS_COMPILER_FLAGS_CXX "/wd4005") # disable macro redefinition (triggered by metis.h) + +list(APPEND CS_COMPILER_FLAGS_CXX "/wd26812") # disable the enum type is unscoped +list(APPEND CS_COMPILER_FLAGS_CXX "/wd4100") # unreferenced formal parameter +list(APPEND CS_COMPILER_FLAGS_CXX "/wd4324") +list(APPEND CS_COMPILER_FLAGS_CXX "/wd4201") + ############################################################################################################# # preprocessor definitions ############################################################################################################# diff --git a/src/gpu/GridGenerator/CMakeLists.txt b/src/gpu/GridGenerator/CMakeLists.txt index 30d705e0e..516e56047 100644 --- a/src/gpu/GridGenerator/CMakeLists.txt +++ b/src/gpu/GridGenerator/CMakeLists.txt @@ -24,8 +24,7 @@ endif() # suppress warning 2979: calling a __host__ function from __host__ __device__ is not allowed if(MSVC) - set(cuda_warnings_suppressions "${cuda_warnings_suppressions} --diag_suppress=2979 --diag_suppress=2976 --diag_suppress=3005") + set(cuda_warnings_suppressions "${cuda_warnings_suppressions} --diag_suppress=2979 --diag_suppress=2976 --diag_suppress=3005 --diag_suppress=2978 --diag_suppress=3009") endif() -target_compile_options(${library_name} PRIVATE $<$<COMPILE_LANGUAGE:CUDA>:-Xcudafe ${cuda_warnings_suppressions} >) - +target_compile_options(${library_name} PUBLIC $<$<COMPILE_LANGUAGE:CUDA>:-Xcudafe ${cuda_warnings_suppressions} >) diff --git a/src/gpu/GridGenerator/geometries/Sphere/Sphere.cu b/src/gpu/GridGenerator/geometries/Sphere/Sphere.cu index 85d353d39..fe403cd7e 100644 --- a/src/gpu/GridGenerator/geometries/Sphere/Sphere.cu +++ b/src/gpu/GridGenerator/geometries/Sphere/Sphere.cu @@ -109,7 +109,7 @@ CUDA_HOST int Sphere::getIntersection(const Vertex & point, const Vertex & direc real q = ( relativePoint.x * relativePoint.x + relativePoint.y * relativePoint.y + relativePoint.z * relativePoint.z - - this->radius * this->radius ) + - (real)this->radius * (real)this->radius ) / directionSquare; real discriminant = 0.25 * p * p - q; @@ -122,8 +122,10 @@ CUDA_HOST int Sphere::getIntersection(const Vertex & point, const Vertex & direc if( result1 < 0.0 && result2 < 0.0 ) return 1; - if( result1 < 0.0 ) result1 = 1e99; - if( result2 < 0.0 ) result2 = 1e99; + if (result1 < 0.0) + result1 = (real)FLT_MAX; + if (result2 < 0.0) + result2 = (real)FLT_MAX; real t = std::min( result1, result2 ); diff --git a/src/gpu/GridGenerator/geometries/Triangle/Triangle.cu b/src/gpu/GridGenerator/geometries/Triangle/Triangle.cu index 0b6aaa080..f38eff75a 100644 --- a/src/gpu/GridGenerator/geometries/Triangle/Triangle.cu +++ b/src/gpu/GridGenerator/geometries/Triangle/Triangle.cu @@ -36,7 +36,7 @@ HOSTDEVICE Vertex Triangle::get(int index) if (index == 2) return v3; else - return Vertex(-999999999999999, -99999999999999, -9999999999999); + return Vertex((real)-999999999999999, (real)-99999999999999, (real)-9999999999999); } HOSTDEVICE void Triangle::calcNormal() diff --git a/src/gpu/GridGenerator/grid/GridBuilder/LevelGridBuilder.cpp b/src/gpu/GridGenerator/grid/GridBuilder/LevelGridBuilder.cpp index 2312b7198..f24547298 100644 --- a/src/gpu/GridGenerator/grid/GridBuilder/LevelGridBuilder.cpp +++ b/src/gpu/GridGenerator/grid/GridBuilder/LevelGridBuilder.cpp @@ -315,9 +315,9 @@ void LevelGridBuilder::getVelocityValues(real* vx, real* vy, real* vz, int* indi { indices[allIndicesCounter] = grids[level]->getSparseIndex(boundaryCondition->indices[i]) +1; - vx[allIndicesCounter] = (uint)boundaryCondition->getVx(i); - vy[allIndicesCounter] = (uint)boundaryCondition->getVy(i); - vz[allIndicesCounter] = (uint)boundaryCondition->getVz(i); + vx[allIndicesCounter] = (uint)boundaryCondition->getVx((uint)i); + vy[allIndicesCounter] = (uint)boundaryCondition->getVy((uint)i); + vz[allIndicesCounter] = (uint)boundaryCondition->getVz((uint)i); allIndicesCounter++; } } diff --git a/src/gpu/VirtualFluids_GPU/Calculation/Cp.cpp b/src/gpu/VirtualFluids_GPU/Calculation/Cp.cpp index 29887e025..112a29fcf 100644 --- a/src/gpu/VirtualFluids_GPU/Calculation/Cp.cpp +++ b/src/gpu/VirtualFluids_GPU/Calculation/Cp.cpp @@ -35,31 +35,31 @@ void calcCp(Parameter* para, CudaMemoryManager* cudaManager, int lev) std::vector< double > cpBottom2Row; ////////////////////////////////////////////////////////////////////////// //calc cp top - for (unsigned int it = 0; it < para->getParH(lev)->numberOfPointsCpTop; it++) + for (unsigned int it = 0; it < para->getParH((int)lev)->numberOfPointsCpTop; it++) { - pressSI = (double)(para->getParH(lev)->cpPressTop[it] / (double)3.0 * (double)para->getDensityRatio() * (double)para->getVelocityRatio() * (double)para->getVelocityRatio()); + pressSI = (double)(para->getParH((int)lev)->cpPressTop[it] / (double)3.0 * (double)para->getDensityRatio() * (double)para->getVelocityRatio() * (double)para->getVelocityRatio()); cp = (double) (pressSI / (0.5 * rhoSI * veloSI * veloSI)); cpTopRow.push_back(cp); } - para->getParH(lev)->cpTop.push_back(cpTopRow); + para->getParH((int)lev)->cpTop.push_back(cpTopRow); ////////////////////////////////////////////////////////////////////////// //calc cp bottom - for (uint it = 0; it < para->getParH(lev)->numberOfPointsCpBottom; it++) + for (uint it = 0; it < para->getParH((int)lev)->numberOfPointsCpBottom; it++) { - pressSI = (double)(para->getParH(lev)->cpPressBottom[it] / (double)3.0 * (double)para->getDensityRatio() * (double)para->getVelocityRatio() * (double)para->getVelocityRatio()); + pressSI = (double)(para->getParH((int)lev)->cpPressBottom[it] / (double)3.0 * (double)para->getDensityRatio() * (double)para->getVelocityRatio() * (double)para->getVelocityRatio()); cp = (double) (pressSI / (0.5 * rhoSI * veloSI * veloSI)); cpBottomRow.push_back(cp); } - para->getParH(lev)->cpBottom.push_back(cpBottomRow); + para->getParH((int)lev)->cpBottom.push_back(cpBottomRow); ////////////////////////////////////////////////////////////////////////// //calc cp bottom 2 - for (uint it = 0; it < para->getParH(lev)->numberOfPointsCpBottom2; it++) + for (uint it = 0; it < para->getParH((int)lev)->numberOfPointsCpBottom2; it++) { - pressSI = (double)(para->getParH(lev)->cpPressBottom2[it] / (double)3.0 * (double)para->getDensityRatio() * (double)para->getVelocityRatio() * (double)para->getVelocityRatio()); + pressSI = (double)(para->getParH((int)lev)->cpPressBottom2[it] / (double)3.0 * (double)para->getDensityRatio() * (double)para->getVelocityRatio() * (double)para->getVelocityRatio()); cp = (double) (pressSI / (0.5 * rhoSI * veloSI * veloSI)); cpBottom2Row.push_back(cp); } - para->getParH(lev)->cpBottom2.push_back(cpBottom2Row); + para->getParH((int)lev)->cpBottom2.push_back(cpBottom2Row); ////////////////////////////////////////////////////////////////////////// } @@ -79,7 +79,7 @@ void printCpTopIntermediateStep(Parameter* para, unsigned int t, int lev) ostr.open(fname); ////////////////////////////////////////////////////////////////////////// //fill file with data - for (vector< vector<double> >::const_iterator i = para->getParH(lev)->cpTop.begin(); i != para->getParH(lev)->cpTop.end(); ++i) + for (vector< vector<double> >::const_iterator i = para->getParH((int)lev)->cpTop.begin(); i != para->getParH((int)lev)->cpTop.end(); ++i) { for (vector<double>::const_iterator j = i->begin(); j != i->end(); ++j) { @@ -91,7 +91,7 @@ void printCpTopIntermediateStep(Parameter* para, unsigned int t, int lev) //close file ostr.close(); ////////////////////////////////////////////////////////////////////////// - para->getParH(lev)->cpTop.clear(); + para->getParH((int)lev)->cpTop.clear(); ////////////////////////////////////////////////////////////////////////// } @@ -111,7 +111,7 @@ void printCpTop(Parameter* para, CudaMemoryManager* cudaManager, int lev) ostr.open(fname); ////////////////////////////////////////////////////////////////////////// //fill file with data - for (vector< vector<double> >::const_iterator i = para->getParH(lev)->cpTop.begin() ; i != para->getParH(lev)->cpTop.end(); ++i) + for (vector< vector<double> >::const_iterator i = para->getParH((int)lev)->cpTop.begin() ; i != para->getParH((int)lev)->cpTop.end(); ++i) { for (vector<double>::const_iterator j=i->begin(); j!=i->end(); ++j) { @@ -123,7 +123,7 @@ void printCpTop(Parameter* para, CudaMemoryManager* cudaManager, int lev) //close file ostr.close(); ////////////////////////////////////////////////////////////////////////// - para->getParH(lev)->cpTop.clear(); + para->getParH((int)lev)->cpTop.clear(); cudaManager->cudaFreeCpTop(lev); ////////////////////////////////////////////////////////////////////////// } @@ -147,7 +147,7 @@ void printCpBottom(Parameter* para, CudaMemoryManager* cudaManager) ostr.open(fname); ////////////////////////////////////////////////////////////////////////// //fill file with data - for (vector< vector<double> >::const_iterator i = para->getParH(lev)->cpBottom.begin() ; i != para->getParH(lev)->cpBottom.end(); ++i) + for (vector< vector<double> >::const_iterator i = para->getParH((int)lev)->cpBottom.begin() ; i != para->getParH((int)lev)->cpBottom.end(); ++i) { for (vector<double>::const_iterator j=i->begin(); j!=i->end(); ++j) { @@ -159,7 +159,7 @@ void printCpBottom(Parameter* para, CudaMemoryManager* cudaManager) //close file ostr.close(); ////////////////////////////////////////////////////////////////////////// - para->getParH(lev)->cpBottom.clear(); + para->getParH((int)lev)->cpBottom.clear(); cudaManager->cudaFreeCpBottom(lev); ////////////////////////////////////////////////////////////////////////// } @@ -183,7 +183,7 @@ void printCpBottom2(Parameter* para, CudaMemoryManager* cudaManager) ostr.open(fname); ////////////////////////////////////////////////////////////////////////// //fill file with data - for (vector< vector<double> >::const_iterator i = para->getParH(lev)->cpBottom2.begin() ; i != para->getParH(lev)->cpBottom2.end(); ++i) + for (vector< vector<double> >::const_iterator i = para->getParH((int)lev)->cpBottom2.begin() ; i != para->getParH((int)lev)->cpBottom2.end(); ++i) { for (vector<double>::const_iterator j=i->begin(); j!=i->end(); ++j) { @@ -195,7 +195,7 @@ void printCpBottom2(Parameter* para, CudaMemoryManager* cudaManager) //close file ostr.close(); ////////////////////////////////////////////////////////////////////////// - para->getParH(lev)->cpBottom2.clear(); + para->getParH((int)lev)->cpBottom2.clear(); cudaManager->cudaFreeCpBottom2(lev); ////////////////////////////////////////////////////////////////////////// } @@ -224,22 +224,22 @@ void printCpBottom2(Parameter* para, CudaMemoryManager* cudaManager) void excludeGridInterfaceNodesForMirror(Parameter* para, int lev) { bool tempBool = true; - para->getParH(lev)->numberOfPointsPressWindow = 0; + para->getParH((int)lev)->numberOfPointsPressWindow = 0; para->getParH(lev + 1)->numberOfPointsPressWindow = 0; ////////////////////////////////////////////////////////////////////////// //define bool vector for nodes outside the interface for (unsigned int it = 0; it < para->getParH(lev + 1)->numberOfPointsCpTop; it++) { - for (unsigned int ifit = 0; ifit < para->getParH(lev)->K_CF; ifit++) + for (unsigned int ifit = 0; ifit < para->getParH((int)lev)->K_CF; ifit++) { - if ((para->getParH(lev + 1)->cpTopIndex[it] == (int)para->getParH(lev)->intCF.ICellCFF[ifit]) || - (para->getParH(lev + 1)->cpTopIndex[it] == (int)para->getParH(lev + 1)->neighborX_SP[para->getParH(lev)->intCF.ICellCFF[ifit]]) || - (para->getParH(lev + 1)->cpTopIndex[it] == (int)para->getParH(lev + 1)->neighborY_SP[para->getParH(lev)->intCF.ICellCFF[ifit]]) || - (para->getParH(lev + 1)->cpTopIndex[it] == (int)para->getParH(lev + 1)->neighborZ_SP[para->getParH(lev)->intCF.ICellCFF[ifit]]) || - (para->getParH(lev + 1)->cpTopIndex[it] == (int)para->getParH(lev + 1)->neighborY_SP[para->getParH(lev + 1)->neighborX_SP[para->getParH(lev)->intCF.ICellCFF[ifit]]]) || - (para->getParH(lev + 1)->cpTopIndex[it] == (int)para->getParH(lev + 1)->neighborZ_SP[para->getParH(lev + 1)->neighborX_SP[para->getParH(lev)->intCF.ICellCFF[ifit]]]) || - (para->getParH(lev + 1)->cpTopIndex[it] == (int)para->getParH(lev + 1)->neighborZ_SP[para->getParH(lev + 1)->neighborY_SP[para->getParH(lev)->intCF.ICellCFF[ifit]]]) || - (para->getParH(lev + 1)->cpTopIndex[it] == (int)para->getParH(lev + 1)->neighborZ_SP[para->getParH(lev + 1)->neighborY_SP[para->getParH(lev + 1)->neighborX_SP[para->getParH(lev)->intCF.ICellCFF[ifit]]]])) + if ((para->getParH(lev + 1)->cpTopIndex[it] == (int)para->getParH((int)lev)->intCF.ICellCFF[ifit]) || + (para->getParH(lev + 1)->cpTopIndex[it] == (int)para->getParH(lev + 1)->neighborX_SP[para->getParH((int)lev)->intCF.ICellCFF[ifit]]) || + (para->getParH(lev + 1)->cpTopIndex[it] == (int)para->getParH(lev + 1)->neighborY_SP[para->getParH((int)lev)->intCF.ICellCFF[ifit]]) || + (para->getParH(lev + 1)->cpTopIndex[it] == (int)para->getParH(lev + 1)->neighborZ_SP[para->getParH((int)lev)->intCF.ICellCFF[ifit]]) || + (para->getParH(lev + 1)->cpTopIndex[it] == (int)para->getParH(lev + 1)->neighborY_SP[para->getParH(lev + 1)->neighborX_SP[para->getParH((int)lev)->intCF.ICellCFF[ifit]]]) || + (para->getParH(lev + 1)->cpTopIndex[it] == (int)para->getParH(lev + 1)->neighborZ_SP[para->getParH(lev + 1)->neighborX_SP[para->getParH((int)lev)->intCF.ICellCFF[ifit]]]) || + (para->getParH(lev + 1)->cpTopIndex[it] == (int)para->getParH(lev + 1)->neighborZ_SP[para->getParH(lev + 1)->neighborY_SP[para->getParH((int)lev)->intCF.ICellCFF[ifit]]]) || + (para->getParH(lev + 1)->cpTopIndex[it] == (int)para->getParH(lev + 1)->neighborZ_SP[para->getParH(lev + 1)->neighborY_SP[para->getParH(lev + 1)->neighborX_SP[para->getParH((int)lev)->intCF.ICellCFF[ifit]]]])) { para->getParH(lev + 1)->isOutsideInterface.push_back(false); tempBool = false; @@ -254,28 +254,28 @@ void excludeGridInterfaceNodesForMirror(Parameter* para, int lev) tempBool = true; } //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - for (unsigned int it = 0; it < para->getParH(lev)->numberOfPointsCpTop; it++) + for (unsigned int it = 0; it < para->getParH((int)lev)->numberOfPointsCpTop; it++) { - for (unsigned int ifit = 0; ifit < para->getParH(lev)->K_FC; ifit++) + for (unsigned int ifit = 0; ifit < para->getParH((int)lev)->K_FC; ifit++) { - if (para->getParH(lev)->cpTopIndex[it] == (int)para->getParH(lev)->intFC.ICellFCC[ifit]) + if (para->getParH((int)lev)->cpTopIndex[it] == (int)para->getParH((int)lev)->intFC.ICellFCC[ifit]) { - para->getParH(lev)->isOutsideInterface.push_back(false); + para->getParH((int)lev)->isOutsideInterface.push_back(false); tempBool = false; break; } } if (tempBool == true) { - para->getParH(lev)->isOutsideInterface.push_back(true); - para->getParH(lev)->numberOfPointsPressWindow++; + para->getParH((int)lev)->isOutsideInterface.push_back(true); + para->getParH((int)lev)->numberOfPointsPressWindow++; } tempBool = true; } //////////////////////////////////////////////////////////////////////////// - std::cout << "number of nodes cp top level 7:" << para->getParH(lev)->numberOfPointsCpTop << endl; - std::cout << "number of nodes bool level 7:" << para->getParH(lev)->isOutsideInterface.size() << endl; - std::cout << "number of nodes press window level 7:" << para->getParH(lev)->numberOfPointsPressWindow << endl; + std::cout << "number of nodes cp top level 7:" << para->getParH((int)lev)->numberOfPointsCpTop << endl; + std::cout << "number of nodes bool level 7:" << para->getParH((int)lev)->isOutsideInterface.size() << endl; + std::cout << "number of nodes press window level 7:" << para->getParH((int)lev)->numberOfPointsPressWindow << endl; std::cout << "number of nodes cp top level 8:" << para->getParH(lev + 1)->numberOfPointsCpTop << endl; std::cout << "number of nodes bool level 8:" << para->getParH(lev + 1)->isOutsideInterface.size() << endl; std::cout << "number of nodes press window level 8:" << para->getParH(lev + 1)->numberOfPointsPressWindow << endl; @@ -293,16 +293,16 @@ void calcPressForMirror(Parameter* para, CudaMemoryManager* cudaManager, int lev double pressSI; ////////////////////////////////////////////////////////////////////////// //calc press - for (unsigned int it = 0; it < para->getParH(lev)->numberOfPointsCpTop; it++) + for (unsigned int it = 0; it < para->getParH((int)lev)->numberOfPointsCpTop; it++) { - if (para->getParH(lev)->isOutsideInterface[it]) + if (para->getParH((int)lev)->isOutsideInterface[it]) { - pressSI = (double)(para->getParH(lev)->cpPressTop[it] / (double)3.0 * (double)para->getDensityRatio() * (double)para->getVelocityRatio() * (double)para->getVelocityRatio()); - para->getParH(lev)->pressMirror.push_back(pressSI); + pressSI = (double)(para->getParH((int)lev)->cpPressTop[it] / (double)3.0 * (double)para->getDensityRatio() * (double)para->getVelocityRatio() * (double)para->getVelocityRatio()); + para->getParH((int)lev)->pressMirror.push_back(pressSI); } } //////////////////////////////////////////////////////////////////////////// - //std::cout << "number of nodes press mirror:" << para->getParH(lev)->pressMirror.size() << ", at level: " << lev << endl; + //std::cout << "number of nodes press mirror:" << para->getParH((int)lev)->pressMirror.size() << ", at level: " << lev << endl; } @@ -386,7 +386,7 @@ extern "C" void printGeoFile(Parameter* para, bool fileFormat) unsigned int non = 0; for (size_t lev = startlevel; lev <= endlevel; lev++) { - non += para->getParH(lev)->numberOfPointsPressWindow; + non += para->getParH((int)lev)->numberOfPointsPressWindow; } ////////////////////////////////////////////////////////////////////////// @@ -415,11 +415,11 @@ extern "C" void printGeoFile(Parameter* para, bool fileFormat) // X for (size_t lev = startlevel; lev <= endlevel; lev++) { - for (unsigned int i = 0; i < para->getParH(lev)->numberOfPointsCpTop; i++) + for (unsigned int i = 0; i < para->getParH((int)lev)->numberOfPointsCpTop; i++) { - if (para->getParH(lev)->isOutsideInterface[i]) + if (para->getParH((int)lev)->isOutsideInterface[i]) { - ostr << (para->getParH(lev)->coordX_SP[para->getParH(lev)->cpTopIndex[i]] * para->getScaleLBMtoSI().at(0) + para->getTranslateLBMtoSI().at(0)) << std::endl; + ostr << (para->getParH((int)lev)->coordX_SP[para->getParH((int)lev)->cpTopIndex[i]] * para->getScaleLBMtoSI().at(0) + para->getTranslateLBMtoSI().at(0)) << std::endl; } } } @@ -427,11 +427,11 @@ extern "C" void printGeoFile(Parameter* para, bool fileFormat) // Y for (size_t lev = startlevel; lev <= endlevel; lev++) { - for (unsigned int i = 0; i < para->getParH(lev)->numberOfPointsCpTop; i++) + for (unsigned int i = 0; i < para->getParH((int)lev)->numberOfPointsCpTop; i++) { - if (para->getParH(lev)->isOutsideInterface[i]) + if (para->getParH((int)lev)->isOutsideInterface[i]) { - ostr << (para->getParH(lev)->coordY_SP[para->getParH(lev)->cpTopIndex[i]] * para->getScaleLBMtoSI().at(1) + para->getTranslateLBMtoSI().at(1)) << std::endl; + ostr << (para->getParH((int)lev)->coordY_SP[para->getParH((int)lev)->cpTopIndex[i]] * para->getScaleLBMtoSI().at(1) + para->getTranslateLBMtoSI().at(1)) << std::endl; } } } @@ -439,11 +439,11 @@ extern "C" void printGeoFile(Parameter* para, bool fileFormat) // Z for (size_t lev = startlevel; lev <= endlevel; lev++) { - for (unsigned int i = 0; i < para->getParH(lev)->numberOfPointsCpTop; i++) + for (unsigned int i = 0; i < para->getParH((int)lev)->numberOfPointsCpTop; i++) { - if (para->getParH(lev)->isOutsideInterface[i]) + if (para->getParH((int)lev)->isOutsideInterface[i]) { - ostr << (para->getParH(lev)->coordZ_SP[para->getParH(lev)->cpTopIndex[i]] * para->getScaleLBMtoSI().at(2) + para->getTranslateLBMtoSI().at(2)) << std::endl; + ostr << (para->getParH((int)lev)->coordZ_SP[para->getParH((int)lev)->cpTopIndex[i]] * para->getScaleLBMtoSI().at(2) + para->getTranslateLBMtoSI().at(2)) << std::endl; } } } @@ -453,7 +453,7 @@ extern "C" void printGeoFile(Parameter* para, bool fileFormat) unsigned int j = 0; for (size_t lev = startlevel; lev <= endlevel; lev++) { - for (size_t i = 0; i < para->getParH(lev)->numberOfPointsPressWindow; i++) + for (size_t i = 0; i < para->getParH((int)lev)->numberOfPointsPressWindow; i++) { j++; ostr << j << "\n"; @@ -485,11 +485,11 @@ extern "C" void printGeoFile(Parameter* para, bool fileFormat) // X for (size_t lev = startlevel; lev <= endlevel; lev++) { - for (unsigned int i = 0; i < para->getParH(lev)->numberOfPointsCpTop; i++) + for (unsigned int i = 0; i < para->getParH((int)lev)->numberOfPointsCpTop; i++) { - if (para->getParH(lev)->isOutsideInterface[i]) + if (para->getParH((int)lev)->isOutsideInterface[i]) { - tempCoord = (para->getParH(lev)->coordX_SP[para->getParH(lev)->cpTopIndex[i]] * para->getScaleLBMtoSI().at(0) + para->getTranslateLBMtoSI().at(0)); + tempCoord = (para->getParH((int)lev)->coordX_SP[para->getParH((int)lev)->cpTopIndex[i]] * para->getScaleLBMtoSI().at(0) + para->getTranslateLBMtoSI().at(0)); writeFloatToFile(tempCoord, ostr); tempX++; } @@ -500,11 +500,11 @@ extern "C" void printGeoFile(Parameter* para, bool fileFormat) // Y for (size_t lev = startlevel; lev <= endlevel; lev++) { - for (unsigned int i = 0; i < para->getParH(lev)->numberOfPointsCpTop; i++) + for (unsigned int i = 0; i < para->getParH((int)lev)->numberOfPointsCpTop; i++) { - if (para->getParH(lev)->isOutsideInterface[i]) + if (para->getParH((int)lev)->isOutsideInterface[i]) { - tempCoord = (para->getParH(lev)->coordY_SP[para->getParH(lev)->cpTopIndex[i]] * para->getScaleLBMtoSI().at(1) + para->getTranslateLBMtoSI().at(1)); + tempCoord = (para->getParH((int)lev)->coordY_SP[para->getParH((int)lev)->cpTopIndex[i]] * para->getScaleLBMtoSI().at(1) + para->getTranslateLBMtoSI().at(1)); writeFloatToFile(tempCoord, ostr); } } @@ -513,11 +513,11 @@ extern "C" void printGeoFile(Parameter* para, bool fileFormat) // Z for (size_t lev = startlevel; lev <= endlevel; lev++) { - for (unsigned int i = 0; i < para->getParH(lev)->numberOfPointsCpTop; i++) + for (unsigned int i = 0; i < para->getParH((int)lev)->numberOfPointsCpTop; i++) { - if (para->getParH(lev)->isOutsideInterface[i]) + if (para->getParH((int)lev)->isOutsideInterface[i]) { - tempCoord = (para->getParH(lev)->coordZ_SP[para->getParH(lev)->cpTopIndex[i]] * para->getScaleLBMtoSI().at(2) + para->getTranslateLBMtoSI().at(2)); + tempCoord = (para->getParH((int)lev)->coordZ_SP[para->getParH((int)lev)->cpTopIndex[i]] * para->getScaleLBMtoSI().at(2) + para->getTranslateLBMtoSI().at(2)); writeFloatToFile(tempCoord, ostr); } } @@ -529,12 +529,12 @@ extern "C" void printGeoFile(Parameter* para, bool fileFormat) unsigned int j = 0; for (size_t lev = startlevel; lev <= endlevel; lev++) { - for (size_t i = 0; i < para->getParH(lev)->numberOfPointsPressWindow; i++) + for (size_t i = 0; i < para->getParH((int)lev)->numberOfPointsPressWindow; i++) { j++; writeIntToFile(j, ostr); } - //std::cout << "level: " << lev << ", numberOfPointsPressWindow:" << para->getParH(lev)->numberOfPointsPressWindow << endl; + //std::cout << "level: " << lev << ", numberOfPointsPressWindow:" << para->getParH((int)lev)->numberOfPointsPressWindow << endl; } ostr.close(); } @@ -572,7 +572,7 @@ extern "C" void printScalars(Parameter* para, bool fileFormat) //fill file with data for (size_t lev = startlevel; lev <= endlevel; lev++) { - for (vector<double>::const_iterator i = para->getParH(lev)->pressMirror.begin(); i != para->getParH(lev)->pressMirror.end(); ++i) + for (vector<double>::const_iterator i = para->getParH((int)lev)->pressMirror.begin(); i != para->getParH((int)lev)->pressMirror.end(); ++i) { ostr << *i << "\n"; } @@ -581,7 +581,7 @@ extern "C" void printScalars(Parameter* para, bool fileFormat) ////////////////////////////////////////////////////////////////////////// for (size_t lev = startlevel; lev <= endlevel; lev++) { - para->getParH(lev)->pressMirror.clear(); + para->getParH((int)lev)->pressMirror.clear(); } } else //Binary: @@ -598,7 +598,7 @@ extern "C" void printScalars(Parameter* para, bool fileFormat) //fill file with data for (size_t lev = startlevel; lev <= endlevel; lev++) { - for (vector<double>::const_iterator i = para->getParH(lev)->pressMirror.begin(); i != para->getParH(lev)->pressMirror.end(); ++i) + for (vector<double>::const_iterator i = para->getParH((int)lev)->pressMirror.begin(); i != para->getParH((int)lev)->pressMirror.end(); ++i) { writeFloatToFile(*i, ostr); } @@ -607,7 +607,7 @@ extern "C" void printScalars(Parameter* para, bool fileFormat) ////////////////////////////////////////////////////////////////////////// for (size_t lev = startlevel; lev <= endlevel; lev++) { - para->getParH(lev)->pressMirror.clear(); + para->getParH((int)lev)->pressMirror.clear(); } } } diff --git a/src/gpu/VirtualFluids_GPU/GPU/Cumulant27.cu b/src/gpu/VirtualFluids_GPU/GPU/Cumulant27.cu index d0ee5eb61..0da46c500 100644 --- a/src/gpu/VirtualFluids_GPU/GPU/Cumulant27.cu +++ b/src/gpu/VirtualFluids_GPU/GPU/Cumulant27.cu @@ -4023,7 +4023,7 @@ extern "C" __global__ void LB_Kernel_Kum_New_SP_27( real omega, real mxxMzz = mfcaa - mfaac; ////////////////////////////////////////////////////////////////////////// - real magicBulk=(CUMacc+CUMcac+CUMcca)*(c1o1/OxxPyyPzz-c1o2)*c3o2*8.; + //real magicBulk=(CUMacc+CUMcac+CUMcca)*(c1o1/OxxPyyPzz-c1o2)*c3o2*8.; ////////////////////////////////////////////////////////////////////////// //limiter-Scheise Teil 1 diff --git a/src/gpu/VirtualFluids_GPU/GPU/Cumulant_F3_27.cu b/src/gpu/VirtualFluids_GPU/GPU/Cumulant_F3_27.cu index 035384cdf..6b2323336 100644 --- a/src/gpu/VirtualFluids_GPU/GPU/Cumulant_F3_27.cu +++ b/src/gpu/VirtualFluids_GPU/GPU/Cumulant_F3_27.cu @@ -472,9 +472,9 @@ extern "C" __global__ void LB_PostProcessor_F3_2018_Fehlberg(real omega, //////////////////////////////////////////////////////////// //3. ////////////////////////////// - real OxyyPxzz = c8o1*(-c2o1 + omega)*(c1o1 + c2o1*omega) / (-c8o1 - c14o1*omega + c7o1*omega*omega);//one; - real OxyyMxzz = c8o1*(-c2o1 + omega)*(-c7o1 + c4o1*omega) / (c56o1 - c50o1*omega + c9o1*omega*omega);//one; - real Oxyz = c24o1*(-c2o1 + omega)*(-c2o1 - c7o1*omega + c3o1*omega*omega) / (c48o1 + c152o1*omega - c130o1*omega*omega + c29o1*omega*omega*omega);//one; + //real OxyyPxzz = c8o1*(-c2o1 + omega)*(c1o1 + c2o1*omega) / (-c8o1 - c14o1*omega + c7o1*omega*omega);//one; + //real OxyyMxzz = c8o1*(-c2o1 + omega)*(-c7o1 + c4o1*omega) / (c56o1 - c50o1*omega + c9o1*omega*omega);//one; + //real Oxyz = c24o1*(-c2o1 + omega)*(-c2o1 - c7o1*omega + c3o1*omega*omega) / (c48o1 + c152o1*omega - c130o1*omega*omega + c29o1*omega*omega*omega);//one; //////////////////////////////////////////////////////////// //central moments to cumulants //4. diff --git a/src/gpu/VirtualFluids_GPU/Kernel/Kernels/BasicKernels/Advection/Compressible/CumulantAll4/CumulantAll4CompSP27_Device.cu b/src/gpu/VirtualFluids_GPU/Kernel/Kernels/BasicKernels/Advection/Compressible/CumulantAll4/CumulantAll4CompSP27_Device.cu index 814e239b7..99f7a4c03 100644 --- a/src/gpu/VirtualFluids_GPU/Kernel/Kernels/BasicKernels/Advection/Compressible/CumulantAll4/CumulantAll4CompSP27_Device.cu +++ b/src/gpu/VirtualFluids_GPU/Kernel/Kernels/BasicKernels/Advection/Compressible/CumulantAll4/CumulantAll4CompSP27_Device.cu @@ -563,8 +563,8 @@ extern "C" __global__ void LB_Kernel_Cumulant_D3Q27All4( real omega, //////////////////////////////////////////////////////////////////////////////////// //limiter advect - real lambdaAdvect = 1000;//100000; - real limAdvect = lambdaAdvect * (c1o1 / omega - c1o2) * (c1o1 / omega - c1o2); + //real lambdaAdvect = 1000;//100000; + //real limAdvect = lambdaAdvect * (c1o1 / omega - c1o2) * (c1o1 / omega - c1o2); //////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////// diff --git a/src/gpu/VirtualFluids_GPU/Kernel/Kernels/BasicKernels/Advection/Incompressible/CumulantK15/CumulantK15Incomp_Device.cu b/src/gpu/VirtualFluids_GPU/Kernel/Kernels/BasicKernels/Advection/Incompressible/CumulantK15/CumulantK15Incomp_Device.cu index 4b316f864..1aece7875 100644 --- a/src/gpu/VirtualFluids_GPU/Kernel/Kernels/BasicKernels/Advection/Incompressible/CumulantK15/CumulantK15Incomp_Device.cu +++ b/src/gpu/VirtualFluids_GPU/Kernel/Kernels/BasicKernels/Advection/Incompressible/CumulantK15/CumulantK15Incomp_Device.cu @@ -797,7 +797,7 @@ extern "C" __global__ void LB_Kernel_CumulantK15Incomp(real omega, real mxxMzz = mfcaa - mfaac; ////////////////////////////////////////////////////////////////////////// - real magicBulk = (CUMacc + CUMcac + CUMcca)*(c1o1 / OxxPyyPzz - c1o2)*c3o2*8.; + //real magicBulk = (CUMacc + CUMcac + CUMcca)*(c1o1 / OxxPyyPzz - c1o2)*c3o2*8.; ////////////////////////////////////////////////////////////////////////// //limiter-Scheise Teil 1 diff --git a/src/gpu/VirtualFluids_GPU/Kernel/Kernels/BasicKernels/AdvectionDiffusion/Incompressible/Mod27/ADIncomp27/ADIncomp27_Device.cu b/src/gpu/VirtualFluids_GPU/Kernel/Kernels/BasicKernels/AdvectionDiffusion/Incompressible/Mod27/ADIncomp27/ADIncomp27_Device.cu index 1da2b22d1..0daf75c0a 100644 --- a/src/gpu/VirtualFluids_GPU/Kernel/Kernels/BasicKernels/AdvectionDiffusion/Incompressible/Mod27/ADIncomp27/ADIncomp27_Device.cu +++ b/src/gpu/VirtualFluids_GPU/Kernel/Kernels/BasicKernels/AdvectionDiffusion/Incompressible/Mod27/ADIncomp27/ADIncomp27_Device.cu @@ -260,7 +260,7 @@ extern "C" __global__ void LB_Kernel_AD_Incomp_27(real diffusivity, real drho = ((((mfccc + mfaaa) + (mfaca + mfcac)) + ((mfacc + mfcaa) + (mfaac + mfcca))) + (((mfbac + mfbca) + (mfbaa + mfbcc)) + ((mfabc + mfcba) + (mfaba + mfcbc)) + ((mfacb + mfcab) + (mfaab + mfccb))) + ((mfabb + mfcbb) + (mfbab + mfbcb)) + (mfbba + mfbbc)) + mfbbb; - real rho = c1o1 + drho; + //real rho = c1o1 + drho; //////////////////////////////////////////////////////////////////////////////////// real vvx = ((fTNE - fBSW) + (fBNE - fTSW) + (fTSE - fBNW) + (fBSE - fTNW) + (fNE - fSW) + (fSE - fNW) + (fTE - fBW) + (fBE - fTW) + (fE - fW)); -- GitLab