Skip to content

Commit

Permalink
Merge pull request #14425 from Rombur/belos
Browse files Browse the repository at this point in the history
Guard Belos code with macros
  • Loading branch information
bangerth committed Nov 16, 2022
2 parents e1f0930 + 62a28b5 commit a88bce2
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 1 deletion.
2 changes: 1 addition & 1 deletion cmake/configure/configure_20_trilinos.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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}")
Expand Down
1 change: 1 addition & 0 deletions include/deal.II/base/config.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,7 @@

/* 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
Expand Down
6 changes: 6 additions & 0 deletions include/deal.II/lac/trilinos_solver.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,15 @@
# include <Epetra_Operator.h>

// for Belos solvers
#ifdef DEAL_II_TRILINOS_WITH_BELOS
# include <BelosBlockCGSolMgr.hpp>
# include <BelosBlockGmresSolMgr.hpp>
# include <BelosEpetraAdapter.hpp>
# include <BelosIteration.hpp>
# include <BelosMultiVec.hpp>
# include <BelosOperator.hpp>
# include <BelosSolverManager.hpp>
#endif

# include <memory>

Expand Down Expand Up @@ -730,6 +732,7 @@ namespace TrilinosWrappers



#ifdef DEAL_II_TRILINOS_WITH_BELOS
/**
* Wrapper around the iterate solver package from the Belos
* packge
Expand Down Expand Up @@ -805,13 +808,15 @@ namespace TrilinosWrappers
const AdditionalData additional_data;
const Teuchos::RCP<Teuchos::ParameterList> &belos_parameters;
};
#endif

} // namespace TrilinosWrappers



# ifndef DOXYGEN

#ifdef DEAL_II_TRILINOS_WITH_BELOS
namespace TrilinosWrappers
{
namespace internal
Expand Down Expand Up @@ -1429,6 +1434,7 @@ namespace TrilinosWrappers
}

} // namespace TrilinosWrappers
#endif

# endif

Expand Down
7 changes: 7 additions & 0 deletions tests/belos/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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()
File renamed without changes.
File renamed without changes.

0 comments on commit a88bce2

Please sign in to comment.