From: Timo Heister Date: Mon, 6 Jan 2020 20:24:51 +0000 (-0500) Subject: make MueLu optional in Trilinos X-Git-Tag: v9.2.0-rc1~546^2~4 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ff2885736e1d9e53b34e0e88803a6a480e6ead31;p=dealii.git make MueLu optional in Trilinos 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. --- diff --git a/cmake/configure/configure_2_trilinos.cmake b/cmake/configure/configure_2_trilinos.cmake index 0329a9ce9d..6e01e9dbca 100644 --- a/cmake/configure/configure_2_trilinos.cmake +++ b/cmake/configure/configure_2_trilinos.cmake @@ -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}") diff --git a/include/deal.II/base/config.h.in b/include/deal.II/base/config.h.in index 9f09de685e..5980915aa7 100644 --- a/include/deal.II/base/config.h.in +++ b/include/deal.II/base/config.h.in @@ -184,6 +184,7 @@ #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 diff --git a/include/deal.II/lac/trilinos_precondition.h b/include/deal.II/lac/trilinos_precondition.h index a244f86700..d4e32482fd 100644 --- a/include/deal.II/lac/trilinos_precondition.h +++ b/include/deal.II/lac/trilinos_precondition.h @@ -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. * diff --git a/source/lac/trilinos_precondition_muelu.cc b/source/lac/trilinos_precondition_muelu.cc index da3b77d3cc..55f0b78f16 100644 --- a/source/lac/trilinos_precondition_muelu.cc +++ b/source/lac/trilinos_precondition_muelu.cc @@ -17,7 +17,7 @@ #include #ifdef DEAL_II_WITH_TRILINOS -# if DEAL_II_TRILINOS_VERSION_GTE(11, 14, 0) +# ifdef DEAL_II_TRILINOS_WITH_MUELU # include # include @@ -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