diff --git a/applications/solvers/df0DFoam/Make/options b/applications/solvers/df0DFoam/Make/options index 41f90666..e66d78f5 100644 --- a/applications/solvers/df0DFoam/Make/options +++ b/applications/solvers/df0DFoam/Make/options @@ -2,6 +2,8 @@ EXE_INC = -std=c++14 \ $(PFLAGS) $(PINC) \ + $(if $(LIBTORCH_ROOT),-DUSE_LIBTORCH,) \ + $(if $(PYTHON_INC_DIR),-DUSE_PYTORCH,) \ -I$(LIB_SRC)/transportModels/compressible/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ -I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \ @@ -18,7 +20,9 @@ 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 = \ -lcompressibleTransportModels \ diff --git a/applications/solvers/df0DFoam/df0DFoam.C b/applications/solvers/df0DFoam/df0DFoam.C index be7095f2..fd71ec3b 100644 --- a/applications/solvers/df0DFoam/df0DFoam.C +++ b/applications/solvers/df0DFoam/df0DFoam.C @@ -29,7 +29,7 @@ Description #include "CanteraMixture.H" #include "hePsiThermo.H" -#ifdef USE_LIBTORCH +#ifdef USE_PYTORCH #include #include #include //used to convert @@ -50,7 +50,7 @@ Description int main(int argc, char *argv[]) { -#ifdef USE_LIBTORCH +#ifdef USE_PYTORCH pybind11::scoped_interpreter guard{};//start python interpreter #endif diff --git a/applications/solvers/dfHighSpeedFoam/Make/options b/applications/solvers/dfHighSpeedFoam/Make/options index 082ca880..82cf3fe9 100644 --- a/applications/solvers/dfHighSpeedFoam/Make/options +++ b/applications/solvers/dfHighSpeedFoam/Make/options @@ -2,6 +2,8 @@ EXE_INC = -std=c++14 \ $(PFLAGS) $(PINC) \ + $(if $(LIBTORCH_ROOT),-DUSE_LIBTORCH,) \ + $(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/dfHighSpeedFoam/dfHighSpeedFoam.C b/applications/solvers/dfHighSpeedFoam/dfHighSpeedFoam.C index 21345bf8..240e8b74 100644 --- a/applications/solvers/dfHighSpeedFoam/dfHighSpeedFoam.C +++ b/applications/solvers/dfHighSpeedFoam/dfHighSpeedFoam.C @@ -34,7 +34,7 @@ Description #include "CanteraMixture.H" #include "hePsiThermo.H" -#ifdef USE_LIBTORCH +#ifdef USE_PYTORCH #include #include #include //used to convert @@ -55,7 +55,7 @@ Description int main(int argc, char *argv[]) { -#ifdef USE_LIBTORCH +#ifdef USE_PYTORCH pybind11::scoped_interpreter guard{};//start python interpreter #endif #define NO_CONTROL diff --git a/applications/solvers/dfLowMachFoam/Make/options b/applications/solvers/dfLowMachFoam/Make/options index 67ecd201..63f8b5bf 100644 --- a/applications/solvers/dfLowMachFoam/Make/options +++ b/applications/solvers/dfLowMachFoam/Make/options @@ -2,6 +2,8 @@ EXE_INC = -std=c++14 \ $(PFLAGS) $(PINC) \ + $(if $(LIBTORCH_ROOT),-DUSE_LIBTORCH,) \ + $(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/dfLowMachFoam/dfLowMachFoam.C b/applications/solvers/dfLowMachFoam/dfLowMachFoam.C index 51111a66..480ef4a9 100644 --- a/applications/solvers/dfLowMachFoam/dfLowMachFoam.C +++ b/applications/solvers/dfLowMachFoam/dfLowMachFoam.C @@ -37,7 +37,7 @@ Description #include "CanteraMixture.H" #include "hePsiThermo.H" -#ifdef USE_LIBTORCH +#ifdef USE_PYTORCH #include #include #include //used to convert @@ -59,7 +59,7 @@ Description int main(int argc, char *argv[]) { -#ifdef USE_LIBTORCH +#ifdef USE_PYTORCH pybind11::scoped_interpreter guard{};//start python interpreter #endif #include "postProcess.H" diff --git a/applications/solvers/dfSprayFoam/Make/options b/applications/solvers/dfSprayFoam/Make/options index 6547314e..7a5a5988 100644 --- a/applications/solvers/dfSprayFoam/Make/options +++ b/applications/solvers/dfSprayFoam/Make/options @@ -30,6 +30,8 @@ EXE_INC = -std=c++14 \ -I$(CANTERA_ROOT)/include \ $(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,) \ $(PYTHON_INC_DIR) EXE_LIBS = \ diff --git a/applications/solvers/dfSprayFoam/dfSprayFoam.C b/applications/solvers/dfSprayFoam/dfSprayFoam.C index 8a587dfa..484e0d79 100644 --- a/applications/solvers/dfSprayFoam/dfSprayFoam.C +++ b/applications/solvers/dfSprayFoam/dfSprayFoam.C @@ -34,7 +34,7 @@ Description #include "hePsiThermo.H" #include "turbulentFluidThermoModel.H" -#ifdef USE_LIBTORCH +#ifdef USE_PYTORCH #include #include #include //used to convert @@ -57,7 +57,7 @@ Description int main(int argc, char *argv[]) { -#ifdef USE_LIBTORCH +#ifdef USE_PYTORCH pybind11::scoped_interpreter guard{};//start python interpreter #endif #include "postProcess.H" diff --git a/docs/source/quickstart/cvode.rst b/docs/source/quickstart/cvode.rst index 81182c84..9fa5c6dc 100644 --- a/docs/source/quickstart/cvode.rst +++ b/docs/source/quickstart/cvode.rst @@ -1,4 +1,4 @@ -CVODE Solver +CVODE Intergrator =================== Follow the steps below to run an example of CVODE. Examples are stored in the directory: diff --git a/docs/source/quickstart/index.rst b/docs/source/quickstart/index.rst index c8127e06..b0cd1976 100644 --- a/docs/source/quickstart/index.rst +++ b/docs/source/quickstart/index.rst @@ -1,5 +1,5 @@ -Quick Examples for Each Integrator -======================================== +Examples for Each Chemistry Integrator +========================================= DeepFlame provides users with three avaiblable integrators: CVODE, LibTorch, and PyTorch. CVODE integraotr does not include any machine learning capability, while the other two use different APIs to make computation with neural neworks on different platforms possible. To get a quick start with all three integrators, there are several examples stored in ``/deepflame-dev/examples/`` that can be run. More details regarding each integrator can be found in the following sections. diff --git a/docs/source/quickstart/libtorch.rst b/docs/source/quickstart/libtorch.rst index 9dc6390b..55a97849 100644 --- a/docs/source/quickstart/libtorch.rst +++ b/docs/source/quickstart/libtorch.rst @@ -1,4 +1,4 @@ -Libtorch Solver +Libtorch Integrator =================== To get a quick start with DeepFlame, there are several examples for each solver stored in the following directory that can be run. diff --git a/docs/source/quickstart/pytorch.rst b/docs/source/quickstart/pytorch.rst index 30af320d..087501a7 100644 --- a/docs/source/quickstart/pytorch.rst +++ b/docs/source/quickstart/pytorch.rst @@ -1,4 +1,4 @@ -PyTorch Solver +PyTorch Integrator =================== To get a quick start with DeepFlame, there are several examples for each solver stored in the following directory that can be run.