58 void enableBelosPrecTpetra(LinearSolverBuilder<typename MatrixType::scalar_type>& builder,
const std::string& stratName =
"BelosPrecTpetra")
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;
67 typedef Thyra::BelosTpetraPreconditionerFactory<MatrixType> Impl;
69 builder.setPreconditioningStrategyFactory(Teuchos::abstractFactoryStd<Base, Impl>(), stratName);