MueLu Version of the Day
Loading...
Searching...
No Matches
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"
20#include "Teuchos_ParameterList.hpp"
21#include "Teuchos_TestForException.hpp"
22#include "Teuchos_AbstractFactoryStd.hpp"
23
24namespace 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
Concrete preconditioner factory subclass based on MueLu.
void enableMueLuTpetraQ2Q1(LinearSolverBuilder< Scalar > &builder, const std::string &stratName="MueLu")