bug fixes for build with float in cuda

This commit is contained in:
Hamidreza Norouzi 2025-01-20 15:43:56 +03:30
parent a32786eb8a
commit cb1faf04f8
7 changed files with 6 additions and 7 deletions

View File

@ -6,7 +6,7 @@ project(phasicFlow VERSION 1.0 )
set(CMAKE_CXX_STANDARD 17 CACHE STRING "" FORCE) set(CMAKE_CXX_STANDARD 17 CACHE STRING "" FORCE)
set(CMAKE_CXX_STANDARD_REQUIRED True) set(CMAKE_CXX_STANDARD_REQUIRED True)
set(CMAKE_INSTALL_PREFIX ${phasicFlow_SOURCE_DIR} CACHE PATH "Install path of phasicFlow" FORCE) set(CMAKE_INSTALL_PREFIX ${phasicFlow_SOURCE_DIR} CACHE PATH "Install path of phasicFlow" FORCE)
set(CMAKE_BUILD_TYPE Debug CACHE STRING "build type" FORCE) set(CMAKE_BUILD_TYPE Release CACHE STRING "build type" FORCE)
set(BUILD_SHARED_LIBS ON CACHE BOOL "Build using shared libraries" FORCE) set(BUILD_SHARED_LIBS ON CACHE BOOL "Build using shared libraries" FORCE)
mark_as_advanced(FORCE var BUILD_SHARED_LIBS) mark_as_advanced(FORCE var BUILD_SHARED_LIBS)

View File

@ -431,7 +431,7 @@ T dictionary::getValOrSet
template<typename T> template<typename T>
T dictionary::getValOrSetMax(const word& keyword, const T& setMaxVal)const T dictionary::getValOrSetMax(const word& keyword, const T& setMaxVal)const
{ {
return max(getValOrSet(keyword, setMaxVal), setMaxVal); return max(getValOrSet(keyword, setMaxVal), static_cast<T>(setMaxVal));
} }
template<typename T> template<typename T>

View File

@ -167,7 +167,7 @@ void pFlow::timeControl::checkForOutputToFile()
lastSaved_ = currentTime_; lastSaved_ = currentTime_;
save = true; save = true;
} }
else if( std::abs(currentTime_ - lastSaved_) < std::min( pow(10.0,-1.0*timePrecision_), 0.5 *dt_) ) else if( std::abs(currentTime_ - lastSaved_) < std::min( pow(10.0,-1.0*timePrecision_), static_cast<real>(0.5 *dt_)) )
{ {
lastSaved_ = currentTime_; lastSaved_ = currentTime_;
save = true; save = true;

View File

@ -31,7 +31,7 @@ bool pFlow::simulationDomain::prepareBoundaryDicts()
real neighborLength = boundaries.getVal<real>("neighborLength"); real neighborLength = boundaries.getVal<real>("neighborLength");
real boundaryExtntionLengthRatio = real boundaryExtntionLengthRatio =
boundaries.getValOrSetMax("boundaryExtntionLengthRatio", 0.1); boundaries.getValOrSetMax("boundaryExtntionLengthRatio", static_cast<real>(0.1));
uint32 updateInterval = uint32 updateInterval =
boundaries.getValOrSetMax<uint32>("updateInterval", 1u); boundaries.getValOrSetMax<uint32>("updateInterval", 1u);

View File

@ -21,7 +21,6 @@ Licence:
#include <algorithm> #include <algorithm>
#include <iomanip> #include <iomanip>
#include <sstream> #include <sstream>
#include "bTypesFunctions.hpp" #include "bTypesFunctions.hpp"
pFlow::int32 pFlow::int32

View File

@ -26,7 +26,7 @@ Licence:
#define __bTypesFunctions_hpp__ #define __bTypesFunctions_hpp__
#include "builtinTypes.hpp" #include "builtinTypes.hpp"
//#include "math.hpp" #include "math.hpp"
#include "numericConstants.hpp" #include "numericConstants.hpp"
#include "pFlowMacros.hpp" #include "pFlowMacros.hpp"