19 if (prec_name ==
"Ifpack")
22 else if (prec_name ==
"ML")
27 "Error! Unknown preconditioner type " << prec_name
28 <<
". Valid choices are \"Ifpack\" and \"ML\".");
35 return factory->compute(mat, compute_prec);
43 factory->recompute(mat, prec);
#define TEUCHOS_TEST_FOR_EXCEPTION(throw_exception_test, Exception, msg)
A factory for building ML preconditioners.
virtual Teuchos::RCP< Epetra_Operator > compute(const Teuchos::RCP< Epetra_Operator > &mat, bool compute_prec=true)
Compute preconditioner operator.
TEUCHOS_DEPRECATED RCP< T > rcp(T *p, Dealloc_T dealloc, bool owns_mem)
virtual void recompute(const Teuchos::RCP< Epetra_Operator > &mat, const Teuchos::RCP< Epetra_Operator > &prec)
Recompute preconditioner operator for a new matrix.
A factory for building Ifpack preconditioners.
PreconditionerFactory(const std::string &prec_name, const Teuchos::RCP< Teuchos::ParameterList > ¶ms)
Constructor.
Teuchos::RCP< Stokhos::AbstractPreconditionerFactory > factory
Preconditioner factory.