diff --git a/applications/solvers/df0DFoam/Make/options b/applications/solvers/df0DFoam/Make/options index 9ba47317..9f2607c1 100644 --- a/applications/solvers/df0DFoam/Make/options +++ b/applications/solvers/df0DFoam/Make/options @@ -1,9 +1,10 @@ -include $(GENERAL_RULES)/mplibType EXE_INC = -std=c++14 \ + -Wno-old-style-cast \ $(PFLAGS) $(PINC) \ $(if $(LIBTORCH_ROOT),-DUSE_LIBTORCH,) \ - $(if $(PYTHON_INC_DIR),-DUSE_PYTORCH,) \ + $(if $(PYTHON_INC_DIR),-DUSE_PYTORCH,) \ -I$(LIB_SRC)/transportModels/compressible/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ -I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \ @@ -20,8 +21,8 @@ EXE_INC = -std=c++14 \ $(if $(LIBTORCH_ROOT),-I$(LIBTORCH_ROOT)/include/torch/csrc/api/include,) \ $(if $(BOOST_ARCH_PATH),-I$(BOOST_ARCH_PATH),) \ $(if $(BOOST_ARCH_PATH),-DBOOST_ARCH_PATH_FOUNDD,) \ - $(PYTHON_INC_DIR) - + $(PYTHON_INC_DIR) + EXE_LIBS = \ diff --git a/applications/solvers/dfHighSpeedFoam/Make/options b/applications/solvers/dfHighSpeedFoam/Make/options index 1eb295b6..1405ff83 100644 --- a/applications/solvers/dfHighSpeedFoam/Make/options +++ b/applications/solvers/dfHighSpeedFoam/Make/options @@ -1,9 +1,10 @@ -include $(GENERAL_RULES)/mplibType EXE_INC = -std=c++14 \ + -Wno-old-style-cast \ $(PFLAGS) $(PINC) \ $(if $(LIBTORCH_ROOT),-DUSE_LIBTORCH,) \ - $(if $(PYTHON_INC_DIR),-DUSE_PYTORCH,) \ + $(if $(PYTHON_INC_DIR),-DUSE_PYTORCH,) \ -I$(FOAM_APP)/solvers/compressible/rhoCentralFoam/BCs/lnInclude \ -I$(LIB_SRC)/finiteVolume/cfdTools \ -I$(LIB_SRC)/finiteVolume/lnInclude \ diff --git a/applications/solvers/dfLowMachFoam/Make/options b/applications/solvers/dfLowMachFoam/Make/options index 21b86a77..9f19ede2 100644 --- a/applications/solvers/dfLowMachFoam/Make/options +++ b/applications/solvers/dfLowMachFoam/Make/options @@ -1,9 +1,10 @@ -include $(GENERAL_RULES)/mplibType EXE_INC = -std=c++14 \ + -Wno-old-style-cast \ $(PFLAGS) $(PINC) \ $(if $(LIBTORCH_ROOT),-DUSE_LIBTORCH,) \ - $(if $(PYTHON_INC_DIR),-DUSE_PYTORCH,) \ + $(if $(PYTHON_INC_DIR),-DUSE_PYTORCH,) \ -I$(LIB_SRC)/transportModels/compressible/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ -I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \ diff --git a/applications/solvers/dfSprayFoam/Make/options b/applications/solvers/dfSprayFoam/Make/options index 2de14d1f..235e66f3 100644 --- a/applications/solvers/dfSprayFoam/Make/options +++ b/applications/solvers/dfSprayFoam/Make/options @@ -1,6 +1,7 @@ -include $(GENERAL_RULES)/mplibType EXE_INC = -std=c++14 \ + -Wno-old-style-cast \ -I. \ -I$(FOAM_APP)/solvers/lagrangian/reactingParcelFoam \ -I$(FOAM_APP)/solvers/compressible/rhoPimpleFoam \ @@ -31,7 +32,7 @@ EXE_INC = -std=c++14 \ $(if $(LIBTORCH_ROOT),-I$(LIBTORCH_ROOT)/include,) \ $(if $(LIBTORCH_ROOT),-I$(LIBTORCH_ROOT)/include/torch/csrc/api/include,) \ $(if $(LIBTORCH_ROOT),-DUSE_LIBTORCH,) \ - $(if $(PYTHON_INC_DIR),-DUSE_PYTORCH,) \ + $(if $(PYTHON_INC_DIR),-DUSE_PYTORCH,) \ $(PYTHON_INC_DIR) EXE_LIBS = \ diff --git a/install.sh b/install.sh index 62131fb1..f7d0fc78 100755 --- a/install.sh +++ b/install.sh @@ -1,6 +1,11 @@ #!/bin/sh - +unset USE_LIBTORCH +unset USE_PYTORCH +unset LIBTORCH_DIR +unset LIBCANTERA_DIR +unset PYTORCH_INC +unset PYTORCH_LIB print_usage() { echo "Usage: . install.sh --libtorch_no (default) | --libtorch_dir _path_to_libtorch | --libtorch_autodownload | --use_pytorch | --libcantera_dir _path_to_libcantera" diff --git a/src/CanteraMixture/CanteraMixture.H b/src/CanteraMixture/CanteraMixture.H index af0ead42..005236e3 100644 --- a/src/CanteraMixture/CanteraMixture.H +++ b/src/CanteraMixture/CanteraMixture.H @@ -241,7 +241,7 @@ public: scalarList Cp_R(nSpecies()); CanteraGas_->getCp_R(Cp_R.begin()); CpTemp_ = Cp_R*RR; - for(int i=0; i::getGPUProblems // choose DNN module if ((Qdot_[cellI] < Qdotact2_) && (T_[cellI] < Tact2_) && ( T_[cellI] >= Tact1_))//choose1 { - problem.DNNid = 0; + problem.DNNid = 0; problemList.append(problem); continue; } if(((Qdot_[cellI] >= Qdotact2_) && (T_[cellI] < Tact2_)&&(T_[cellI] >= Tact1_))||((Qdot_[cellI] > Qdotact3_) && T_[cellI] > Tact2_)) //choose2 { - problem.DNNid = 1; + problem.DNNid = 1; problemList.append(problem); continue; } if ((Qdot_[cellI] < Qdotact3_) && (T_[cellI] >= Tact2_) && (Qdot_[cellI]!=0)) //choose3 { - problem.DNNid = 2; + problem.DNNid = 2; problemList.append(problem); continue; } } - return problemList; + return problemList; } template void Foam::dfChemistryModel::getDNNinputs ( - const Foam::DynamicBuffer& problemBuffer, + const Foam::DynamicBuffer& problemBuffer, std::vector