3D EM based on Schur decomposition
選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

CMakeLists.txt 3.3KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. # Configure EMSchur3D
  2. set(EMSCHUR3D_VERSION_MAJOR "0")
  3. set(EMSCHUR3D_VERSION_MINOR "0")
  4. set(EMSCHUR3D_VERSION_PATCH "1")
  5. set(EMSCHUR3D_VERSION "\"${EMSCHUR3D_VERSION_MAJOR}.${EMSCHUR3D_VERSION_MINOR}.${EMSCHUR3D_VERSION_PATCH}\"")
  6. set(EMSCHUR3D_VERSION_NOQUOTES "${EMSCHUR3D_VERSION_MAJOR}.${EMSCHUR3D_VERSION_MINOR}.${EMSCHUR3D_VERSION_PATCH}")
  7. option ( LEMMA_MODULE_EMSCHUR3D TRUE )
  8. find_package( SuperLU )
  9. if (SUPERLU_FOUND)
  10. message( STATUS "SuperLU was found" )
  11. add_compile_options(-DHAVE_SUPERLU)
  12. INCLUDE_DIRECTORIES(${SUPERLU_INCLUDES})
  13. endif()
  14. find_package( PaSTiX )
  15. if ( PASTIX_FOUND )
  16. message( STATUS "PaSTiX was found" )
  17. add_compile_options(-DHAVE_PASTIX)
  18. INCLUDE_DIRECTORIES(${PASTIX_INCLUDES})
  19. endif()
  20. find_package( Umfpack )
  21. if ( UMFPACK_FOUND )
  22. message( STATUS "Umfpack was found" )
  23. add_compile_options(-DHAVE_UMFPACK)
  24. INCLUDE_DIRECTORIES(${UMFPACK_INCLUDES})
  25. endif()
  26. if ( LEMMA_VTK6_SUPPORT OR LEMMA_VTK7_SUPPORT OR LEMMA_VTK8_SUPPORT AND LEMMA_MODULE_EMSCHUR3D )
  27. configure_file (
  28. "${CMAKE_CURRENT_SOURCE_DIR}/config/EMSchur3DConfig.h.in"
  29. "${PROJECT_BINARY_DIR}/include/EMSchur3DConfig.h"
  30. )
  31. install ( FILES ${PROJECT_BINARY_DIR}/include/EMSchur3DConfig.h DESTINATION ${CMAKE_INSTALL_PREFIX}/include/Lemma/ )
  32. add_subdirectory("src")
  33. add_library( emschur3d ${EMSCHUR3DSOURCE} )
  34. target_include_directories( emschur3d PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/include" )
  35. set_target_properties(emschur3d PROPERTIES
  36. VERSION "${EMSCHUR3D_VERSION_NOQUOTES}"
  37. SOVERSION "${EMSCHUR3D_VERSION_MAJOR}.${LEMMA_VERSION_MINOR}"
  38. PROJECT_LABEL "EMSCHUR3D ${LABEL_SUFFIX}"
  39. CXX_STANDARD_14
  40. CXX_STANDARD_REQUIRED_ON
  41. )
  42. # No OpenMP
  43. #set (MKLLINK "-L$MKLROOT/lib/intel64 -lmkl_intel_lp64 -lmkl_sequential -lmkl_core -lpthread -Wl,-rpath=$MKLROOT/lib/intel64")
  44. # OpenMP
  45. set (MKLLINK "-L$MKLROOT/lib/intel64 -Wl,-rpath=$MKLROOT/lib/intel64 -lmkl_intel_lp64 -lmkl_intel_thread -lmkl_core -liomp5 -lpthread")
  46. target_link_libraries(emschur3d "lemmacore" ${MKLLINK})
  47. # Linking
  48. target_link_libraries(emschur3d "lemmacore" "fdem1d" )
  49. # Linking
  50. target_link_libraries(emschur3d ${VTK_LIBRARIES})
  51. if ( SUPERLU_FOUND )
  52. target_link_libraries(emschur3d ${SUPERLU_LIBRARIES})
  53. endif()
  54. if ( PASTIX_FOUND )
  55. target_link_libraries(emschur3d ${PASTIX_LIBRARIES})
  56. target_link_libraries(emschur3d "blas" "metis" "scotch" "scotchmetis" "scotcherr" "scotcherrexit" "hwloc")
  57. endif()
  58. if ( UMFPACK_FOUND )
  59. target_link_libraries(emschur3d ${UMFPACK_LIBRARIES})
  60. endif()
  61. # Testing
  62. if (LEMMA_ENABLE_TESTING)
  63. add_subdirectory(testing)
  64. endif()
  65. # Install
  66. install ( TARGETS emschur3d DESTINATION ${CMAKE_INSTALL_PREFIX}/lib )
  67. install ( FILES include/EMSchur3D DESTINATION ${CMAKE_INSTALL_PREFIX}/include/Lemma )
  68. install ( DIRECTORY include/ DESTINATION ${CMAKE_INSTALL_PREFIX}/include/Lemma FILES_MATCHING PATTERN "*.h")
  69. #install ( DIRECTORY include/ DESTINATION ${CMAKE_INSTALL_PREFIX}/include/Lemma/ FILES_MATCHING PATTERN "FDEM1D")
  70. #install ( DIRECTORY include/ DESTINATION ${CMAKE_INSTALL_PREFIX}/include/Lemma/FDEM1D FILES_MATCHING PATTERN "*.h")
  71. # Examples
  72. if ( LEMMA_BUILD_EXAMPLES)
  73. add_subdirectory(examples)
  74. endif()
  75. else()
  76. if ( LEMMA_MODULE_EMSCHUR3D )
  77. message ( FATAL_ERROR
  78. "EMSChur3D requires VTK 6, 7, or 8"
  79. )
  80. endif()
  81. endif()