From: David Wells Date: Thu, 3 Sep 2020 16:58:01 +0000 (-0400) Subject: Check for SEACAS support. X-Git-Tag: v9.3.0-rc1~917^2~2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f94a745a10d9dde0c5c1c28a5f1770fe63802f22;p=dealii.git Check for SEACAS support. We need it for ExodusII. --- diff --git a/cmake/configure/configure_2_trilinos.cmake b/cmake/configure/configure_2_trilinos.cmake index fc65b84a10..b6a8d7463d 100644 --- a/cmake/configure/configure_2_trilinos.cmake +++ b/cmake/configure/configure_2_trilinos.cmake @@ -171,7 +171,7 @@ MACRO(FEATURE_TRILINOS_FIND_EXTERNAL var) # # Check for modules. # - FOREACH(_optional_module EpetraExt ROL Sacado Tpetra MueLu Zoltan) + FOREACH(_optional_module EpetraExt MueLu ROL Sacado SEACAS Tpetra Zoltan) ITEM_MATCHES(_module_found ${_optional_module} ${Trilinos_PACKAGE_LIST}) IF(_module_found) MESSAGE(STATUS "Found ${_optional_module}") @@ -281,6 +281,43 @@ MACRO(FEATURE_TRILINOS_FIND_EXTERNAL var) ENDIF() ENDIF() + # the only thing we use from SEACAS right now is ExodusII, so just check + # that it works + IF(${DEAL_II_TRILINOS_WITH_SEACAS}) + LIST(APPEND CMAKE_REQUIRED_INCLUDES ${Trilinos_INCLUDE_DIRS}) + LIST(APPEND CMAKE_REQUIRED_LIBRARIES ${Trilinos_LIBRARIES}) + CHECK_CXX_SOURCE_COMPILES( + " + #include + int + main() + { + int component_word_size = sizeof(double); + int floating_point_word_size = 0; + float ex_version = 0; + const int ex_id = ex_open(\"test.ex\", + EX_READ, + &component_word_size, + &floating_point_word_size, + &ex_version); + ex_close(ex_id); + return 0; + } + " + TRILINOS_SEACAS_IS_FUNCTIONAL + ) + + RESET_CMAKE_REQUIRED() + + IF(NOT TRILINOS_SEACAS_IS_FUNCTIONAL) + MESSAGE( + STATUS + "SEACAS was found but doesn't seem to include ExodusII. Disabling SEACAS support." + ) + SET(DEAL_II_TRILINOS_WITH_SEACAS OFF) + ENDIF() + ENDIF() + IF(${DEAL_II_TRILINOS_WITH_SACADO}) # # Look for Sacado_config.h - we'll query it to determine C++11 support: diff --git a/doc/external-libs/trilinos.html b/doc/external-libs/trilinos.html index 63c6803751..406f877c16 100644 --- a/doc/external-libs/trilinos.html +++ b/doc/external-libs/trilinos.html @@ -67,6 +67,7 @@
  • MueLu (optional, required for TrilinosWrappers::PreconditionAMGMueLu),
  • ROL (optional),
  • Sacado (optional), +
  • SEACAS (optional, required for GridIn::read_exodusii()),
  • Teuchos,
  • Tpetra (optional),
  • Zoltan (optional). @@ -90,6 +91,7 @@ -DTrilinos_ENABLE_Ifpack=ON \ -DTrilinos_ENABLE_AztecOO=ON \ -DTrilinos_ENABLE_Sacado=ON \ + -DTrilinos_ENABLE_SEACAS=ON \ -DTrilinos_ENABLE_Teuchos=ON \ -DTrilinos_ENABLE_MueLu=ON \ -DTrilinos_ENABLE_ML=ON \ diff --git a/include/deal.II/base/config.h.in b/include/deal.II/base/config.h.in index 0c9a16b9f9..d44f6292bc 100644 --- a/include/deal.II/base/config.h.in +++ b/include/deal.II/base/config.h.in @@ -205,10 +205,11 @@ /* cmake/configure/configure_2_trilinos.cmake */ #cmakedefine DEAL_II_TRILINOS_CXX_SUPPORTS_SACADO_COMPLEX_RAD #cmakedefine DEAL_II_TRILINOS_WITH_EPETRAEXT +#cmakedefine DEAL_II_TRILINOS_WITH_MUELU #cmakedefine DEAL_II_TRILINOS_WITH_ROL #cmakedefine DEAL_II_TRILINOS_WITH_SACADO +#cmakedefine DEAL_II_TRILINOS_WITH_SEACAS #cmakedefine DEAL_II_TRILINOS_WITH_TPETRA -#cmakedefine DEAL_II_TRILINOS_WITH_MUELU #cmakedefine DEAL_II_TRILINOS_WITH_ZOLTAN