41#ifndef STRATIMIKOS_BELOS_PREC_TPETRA_HELPERS_HPP
42#define STRATIMIKOS_BELOS_PREC_TPETRA_HELPERS_HPP
44#include "Stratimikos_LinearSolverBuilder.hpp"
48#include "Teuchos_RCP.hpp"
49#include "Teuchos_ParameterList.hpp"
50#include "Teuchos_TestForException.hpp"
51#include "Teuchos_AbstractFactoryStd.hpp"
57 template <
typename MatrixType>
60 const Teuchos::RCP<const Teuchos::ParameterList> precValidParams = Teuchos::sublist(builder.
getValidParameters(),
"Preconditioner Types");
62 TEUCHOS_TEST_FOR_EXCEPTION(precValidParams->isParameter(stratName), std::logic_error,
63 "Stratimikos::enableBelosPrecTpetra cannot add \"" + stratName +
"\" because it is already included in builder!");
65 typedef typename MatrixType::scalar_type scalar_type;
66 typedef Thyra::PreconditionerFactoryBase<scalar_type> Base;
Concrete subclass of Thyra::LinearSolverBuilderBase for creating LinearOpWithSolveFactoryBase objects...
RCP< const ParameterList > getValidParameters() const
void setPreconditioningStrategyFactory(const RCP< const AbstractFactory< Thyra::PreconditionerFactoryBase< Scalar > > > &precStrategyFactory, const std::string &precStrategyName, const bool makeDefault=false)
Set a new preconditioner strategy factory object.
Concrete preconditioner factory subclass based on Belos. (Yes, Belos solvers can also be used as prec...
void enableBelosPrecTpetra(LinearSolverBuilder< typename MatrixType::scalar_type > &builder, const std::string &stratName="BelosPrecTpetra")