MueLu  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Stratimikos_MueLuHelpers.cpp
Go to the documentation of this file.
1 // @HEADER
2 // *****************************************************************************
3 // MueLu: A package for multigrid based preconditioning
4 //
5 // Copyright 2012 NTESS and the MueLu contributors.
6 // SPDX-License-Identifier: BSD-3-Clause
7 // *****************************************************************************
8 // @HEADER
9 
11 
12 #include "MueLu_ConfigDefs.hpp"
13 
15 #if defined(HAVE_MUELU_EXPERIMENTAL) && defined(HAVE_MUELU_TEKO)
17 #endif
18 
19 #include "Teuchos_RCP.hpp"
22 #include "Teuchos_AbstractFactoryStd.hpp"
23 
24 namespace Stratimikos {
25 
26 #if defined(HAVE_MUELU_EXPERIMENTAL) && defined(HAVE_MUELU_TEKO)
27 #if 0
28  void enableMueLuTpetraQ2Q1(DefaultLinearSolverBuilder &builder, const std::string &stratName) {
29  const Teuchos::RCP<const Teuchos::ParameterList> precValidParams = Teuchos::sublist(builder.getValidParameters(), "Preconditioner Types");
30 
31  TEUCHOS_TEST_FOR_EXCEPTION(precValidParams->isParameter(stratName), std::logic_error,
32  "Stratimikos::enableMueLuTpetraQ2Q1 cannot add \"" + stratName +"\" because it is already included in builder!");
33 
34  typedef Thyra::PreconditionerFactoryBase<double> Base;
36 
37  builder.setPreconditioningStrategyFactory(Teuchos::abstractFactoryStd<Base, Impl>(), stratName);
38  }
39 #endif
40 #endif
41 
42 } // namespace Stratimikos
#define TEUCHOS_TEST_FOR_EXCEPTION(throw_exception_test, Exception, msg)
Concrete preconditioner factory subclass based on MueLu.
void enableMueLuTpetraQ2Q1(LinearSolverBuilder< Scalar > &builder, const std::string &stratName="MueLu")
bool isParameter(const std::string &name) const