]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Guard Belos code with macros 14425/head
authorBruno Turcksin <bruno.turcksin@gmail.com>
Tue, 15 Nov 2022 19:38:28 +0000 (19:38 +0000)
committerBruno Turcksin <bruno.turcksin@gmail.com>
Tue, 15 Nov 2022 19:43:25 +0000 (19:43 +0000)
cmake/configure/configure_20_trilinos.cmake
include/deal.II/base/config.h.in
include/deal.II/lac/trilinos_solver.h
tests/belos/CMakeLists.txt [new file with mode: 0644]
tests/belos/solver_belos_01.cc [moved from tests/trilinos/solver_belos_01.cc with 100% similarity]
tests/belos/solver_belos_01.output [moved from tests/trilinos/solver_belos_01.with_trilinos=true.output with 100% similarity]

index 7363847146ebb10e59d24b3948830bc8deb0f6f8..6adaf536cb6be60126642574af207f3a9a0a73c9 100644 (file)
@@ -150,7 +150,7 @@ MACRO(FEATURE_TRILINOS_FIND_EXTERNAL var)
       #
       # Check for modules.
       #
-      FOREACH(_optional_module EpetraExt Kokkos MueLu ROL Sacado SEACAS Tpetra Zoltan)
+      FOREACH(_optional_module Belos EpetraExt Kokkos MueLu ROL Sacado SEACAS Tpetra Zoltan)
         ITEM_MATCHES(_module_found ${_optional_module} ${Trilinos_PACKAGE_LIST})
         IF(_module_found)
           MESSAGE(STATUS "  Found ${_optional_module}")
index a201f301ded359061aca74ba3f76c8f4a12cc971..888dffcd7d7b16721d1455733438f93709a2de6c 100644 (file)
 
 /* cmake/configure/configure_2_trilinos.cmake */
 #cmakedefine DEAL_II_TRILINOS_CXX_SUPPORTS_SACADO_COMPLEX_RAD
+#cmakedefine DEAL_II_TRILINOS_WITH_BELOS
 #cmakedefine DEAL_II_TRILINOS_WITH_EPETRAEXT
 #cmakedefine DEAL_II_TRILINOS_WITH_MUELU
 #cmakedefine DEAL_II_TRILINOS_WITH_ROL
index 95315516441cbc9e03477ad3a584c5f560f00c1e..ea309e8a043d3d542ef103073a79c61af2ac6f73 100644 (file)
@@ -33,6 +33,7 @@
 #  include <Epetra_Operator.h>
 
 // for Belos solvers
+#ifdef DEAL_II_TRILINOS_WITH_BELOS
 #  include <BelosBlockCGSolMgr.hpp>
 #  include <BelosBlockGmresSolMgr.hpp>
 #  include <BelosEpetraAdapter.hpp>
@@ -40,6 +41,7 @@
 #  include <BelosMultiVec.hpp>
 #  include <BelosOperator.hpp>
 #  include <BelosSolverManager.hpp>
+#endif
 
 #  include <memory>
 
@@ -730,6 +732,7 @@ namespace TrilinosWrappers
 
 
 
+#ifdef DEAL_II_TRILINOS_WITH_BELOS
   /**
    * Wrapper around the iterate solver package from the Belos
    * packge
@@ -805,6 +808,7 @@ namespace TrilinosWrappers
     const AdditionalData                        additional_data;
     const Teuchos::RCP<Teuchos::ParameterList> &belos_parameters;
   };
+#endif
 
 } // namespace TrilinosWrappers
 
@@ -812,6 +816,7 @@ namespace TrilinosWrappers
 
 #  ifndef DOXYGEN
 
+#ifdef DEAL_II_TRILINOS_WITH_BELOS
 namespace TrilinosWrappers
 {
   namespace internal
@@ -1429,6 +1434,7 @@ namespace TrilinosWrappers
   }
 
 } // namespace TrilinosWrappers
+#endif
 
 #  endif
 
diff --git a/tests/belos/CMakeLists.txt b/tests/belos/CMakeLists.txt
new file mode 100644 (file)
index 0000000..9f5a104
--- /dev/null
@@ -0,0 +1,7 @@
+CMAKE_MINIMUM_REQUIRED(VERSION 3.3.0)
+INCLUDE(../setup_testsubproject.cmake)
+PROJECT(testsuite CXX)
+
+IF(DEAL_II_WITH_TRILINOS AND DEAL_II_TRILINOS_WITH_BELOS)
+  DEAL_II_PICKUP_TESTS()
+ENDIF()

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.