Droplet Lagrangian Transient One-dimensional Reacting Code Implementation of both liquid and gas phase governing equations.
Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.

51 wiersze
1.5KB

  1. cmake_minimum_required(VERSION 3.12.0)
  2. project(demo)
  3. if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
  4. set(CMAKE_INSTALL_PREFIX ${PROJECT_SOURCE_DIR} CACHE PATH "Installing prefix of the project" FORCE)
  5. endif(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
  6. if (NOT CMAKE_BUILD_TYPE)
  7. message(STATUS "No build type selected, default to Release")
  8. set(CMAKE_BUILD_TYPE "Release")
  9. endif()
  10. set(CMAKE_CXX_STANDARD 11)
  11. find_package(OpenMP REQUIRED)
  12. find_package(Eigen3 REQUIRED)
  13. find_package(fmt REQUIRED)
  14. find_package(PkgConfig REQUIRED)
  15. pkg_check_modules(GSL REQUIRED IMPORTED_TARGET gsl)
  16. pkg_check_modules(CANTERA REQUIRED IMPORTED_TARGET cantera)
  17. # Define path to header files and libraries
  18. set(IDA_DIR /usr/local)
  19. set(COOLPROP_DIR /opt/CoolProp/shared_library/Linux)
  20. set(IDA_INCLUDES ${IDA_DIR}/include)
  21. set(COOLPROP_INCLUDES ${COOLPROP_DIR}/include)
  22. # Search for source files
  23. file(GLOB SRC ${PROJECT_SOURCE_DIR}/src/*.cpp)
  24. add_executable(DropletCombustion ${SRC})
  25. # Link libraries
  26. target_link_directories(DropletCombustion PRIVATE ${IDA_DIR}/lib ${COOLPROP_DIR}/64bit)
  27. target_link_libraries(DropletCombustion
  28. PRIVATE
  29. PkgConfig::CANTERA
  30. PkgConfig::GSL
  31. fmt::fmt
  32. Eigen3::Eigen
  33. sundials_nvecopenmp sundials_ida sundials_sunlinsollapackband CoolProp)
  34. target_link_libraries(DropletCombustion PRIVATE OpenMP::OpenMP_CXX)
  35. # Include directories
  36. target_include_directories(DropletCombustion
  37. PRIVATE ${PROJECT_SOURCE_DIR}/include ${IDA_INCLUDES} ${COOLPROP_INCLUDES})
  38. # Set the output path
  39. install(TARGETS DropletCombustion
  40. DESTINATION bin)