]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Check for SEACAS support.
authorDavid Wells <drwells@email.unc.edu>
Thu, 3 Sep 2020 16:58:01 +0000 (12:58 -0400)
committerDavid Wells <drwells@email.unc.edu>
Tue, 10 Nov 2020 14:55:30 +0000 (09:55 -0500)
We need it for ExodusII.

cmake/configure/configure_2_trilinos.cmake
doc/external-libs/trilinos.html
include/deal.II/base/config.h.in

index fc65b84a109259a0d1b352e3a42b183aa68dc6ab..b6a8d7463ddf454ef8eccaba9d8cea064eec8d52 100644 (file)
@@ -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 <exodusII.h>
+        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:
index 63c680375197b67263ede0caa2560363586b51dd..406f877c1611bf3b9df788bd3984abb3eb13366b 100644 (file)
@@ -67,6 +67,7 @@
         <li> MueLu (optional, required for TrilinosWrappers::PreconditionAMGMueLu),
         <li> ROL (optional),
         <li> Sacado (optional),
+        <li> SEACAS (optional, required for GridIn::read_exodusii()),
         <li> Teuchos,
         <li> Tpetra (optional),
         <li> 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                          \
index 0c9a16b9f90d031a90790d2416aede06957ff417..d44f6292bc7e94ee86aacf621307fbf56fbe5c7b 100644 (file)
 /* 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
 
 

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.