]> https://gitweb.dealii.org/ - dealii.git/commitdiff
make MueLu optional in Trilinos
authorTimo Heister <timo.heister@gmail.com>
Mon, 6 Jan 2020 20:24:51 +0000 (15:24 -0500)
committerTimo Heister <timo.heister@gmail.com>
Tue, 14 Jan 2020 20:05:18 +0000 (15:05 -0500)
Trilinos master (after 12.18) only supports MueLu if Tpetra is disabled
or enabled with GO=int. To be more flexible, detect the presence of
MueLu.

cmake/configure/configure_2_trilinos.cmake
include/deal.II/base/config.h.in
include/deal.II/lac/trilinos_precondition.h
source/lac/trilinos_precondition_muelu.cc

index 0329a9ce9da5f9823a77225d5ae37693f61385b1..6e01e9dbcaf8a12e4bb46b8ed3f283177e2e2e9d 100644 (file)
@@ -42,7 +42,7 @@ MACRO(FEATURE_TRILINOS_FIND_EXTERNAL var)
       )
 
     FOREACH(_module
-        Amesos Epetra Ifpack AztecOO Teuchos ML MueLu
+        Amesos Epetra Ifpack AztecOO Teuchos ML
       )
       ITEM_MATCHES(_module_found ${_module} ${Trilinos_PACKAGE_LIST})
       IF(_module_found)
@@ -110,7 +110,7 @@ MACRO(FEATURE_TRILINOS_FIND_EXTERNAL var)
     IF(DEAL_II_WITH_TRILINOS AND DEAL_II_WITH_PETSC AND NOT DEAL_II_WITH_MPI)
       MESSAGE(STATUS "Incompatible configuration settings: "
         "MPI must be enabled to use both Trilinos and PETSc, as both libraries "
-       "provide mutually incompatible MPI stubs."
+        "provide mutually incompatible MPI stubs."
         )
       SET(TRILINOS_ADDITIONAL_ERROR_STRING
         ${TRILINOS_ADDITIONAL_ERROR_STRING}
@@ -171,7 +171,7 @@ MACRO(FEATURE_TRILINOS_FIND_EXTERNAL var)
       #
       # Check for modules.
       #
-      FOREACH(_optional_module EpetraExt ROL Sacado Tpetra Zoltan)
+      FOREACH(_optional_module EpetraExt ROL Sacado Tpetra MueLu Zoltan)
         ITEM_MATCHES(_module_found ${_optional_module} ${Trilinos_PACKAGE_LIST})
         IF(_module_found)
           MESSAGE(STATUS "Found ${_optional_module}")
index 9f09de685e1da80881299f0c7ffbe61767b043c4..5980915aa71397af59b74bd17d4ed34b70cc3a78 100644 (file)
 #cmakedefine DEAL_II_TRILINOS_WITH_ROL
 #cmakedefine DEAL_II_TRILINOS_WITH_SACADO
 #cmakedefine DEAL_II_TRILINOS_WITH_TPETRA
+#cmakedefine DEAL_II_TRILINOS_WITH_MUELU
 #cmakedefine DEAL_II_TRILINOS_WITH_ZOLTAN
 
 
index a244f86700a8bdafe26c55ae39f81d5989a27f3e..d4e32482fd53dfba25cd331f2cb786c78e816598 100644 (file)
@@ -1716,7 +1716,7 @@ namespace TrilinosWrappers
 
 
 
-#    if defined(DOXYGEN) || DEAL_II_TRILINOS_VERSION_GTE(11, 14, 0)
+#    if defined(DOXYGEN) || defined(DEAL_II_TRILINOS_WITH_MUELU)
   /**
    * This class implements an algebraic multigrid (AMG) preconditioner based
    * on the Trilinos MueLu implementation, which is a black-box preconditioner
@@ -1725,8 +1725,7 @@ namespace TrilinosWrappers
    * except for the higher_order_elements parameter which does not exist in
    * PreconditionerAMGMueLu.
    *
-   * @note This class requires Trilinos 11.14 or higher. At the moment 64bit-indices
-   * are not supported.
+   * @note At the moment 64bit-indices are not supported.
    *
    * @warning This interface should not be considered as stable.
    *
index da3b77d3cc8f4c52d7d70be6b5415a2011e26e1d..55f0b78f169054cdd47af54006bd3b77544671c2 100644 (file)
@@ -17,7 +17,7 @@
 #include <deal.II/lac/trilinos_precondition.h>
 
 #ifdef DEAL_II_WITH_TRILINOS
-#  if DEAL_II_TRILINOS_VERSION_GTE(11, 14, 0)
+#  ifdef DEAL_II_TRILINOS_WITH_MUELU
 #    include <deal.II/lac/sparse_matrix.h>
 #    include <deal.II/lac/trilinos_sparse_matrix.h>
 
@@ -275,5 +275,5 @@ namespace TrilinosWrappers
 
 DEAL_II_NAMESPACE_CLOSE
 
-#  endif // DEAL_II_TRILINOS_VERSION_GTE(11,14,0)
+#  endif // DEAL_II_TRILINOS_WITH_MUELU
 #endif   // DEAL_II_WITH_TRILINOS

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.