15 #ifdef HAVE_STOKHOS_ML
16 #include "ml_include.h"
17 #include "ml_MultiLevelPreconditioner.h"
24 #ifdef HAVE_STOKHOS_ML
28 ML_Epetra::SetDefaults(
precParams->
get<std::string>(
"default values"),
38 #ifdef HAVE_STOKHOS_ML
42 Teuchos::rcp(
new ML_Epetra::MultiLevelPreconditioner(*mat, *precParams,
48 "Stokhos::MLPreconditionerFactory is available " <<
49 "only with configured with ML support!");
51 #endif // HAVE_STOKHOS_ML
58 #ifdef HAVE_STOKHOS_ML
63 Teuchos::rcp_dynamic_cast<ML_Epetra::MultiLevelPreconditioner>(prec_op);
69 non_const_prec_crs_mat = *mat;
72 ml_prec->ComputePreconditioner();
75 "Stokhos::MLPreconditionerFactory is available " <<
76 "only with configured with ML support!");
77 #endif // HAVE_STOKHOS_ML
virtual Teuchos::RCP< Epetra_Operator > compute(const Teuchos::RCP< Epetra_Operator > &op, bool compute_prec=true)
Compute preconditioner.
MLPreconditionerFactory(const Teuchos::RCP< Teuchos::ParameterList > &p)
Constructor.
Teuchos::RCP< Teuchos::ParameterList > precParams
Preconditioner parameters.
T & get(ParameterList &l, const std::string &name)
#define TEUCHOS_TEST_FOR_EXCEPTION(throw_exception_test, Exception, msg)
TEUCHOS_DEPRECATED RCP< T > rcp(T *p, Dealloc_T dealloc, bool owns_mem)
virtual void recompute(const Teuchos::RCP< Epetra_Operator > &op, const Teuchos::RCP< Epetra_Operator > &prec)
Recompute preconditioner operator for a new matrix.
ParameterList & setParametersNotAlreadySet(const ParameterList &source)
bool isType(const std::string &name) const