69compute(
const Teuchos::RCP<Epetra_Operator>& op,
bool compute_prec) {
71 Teuchos::RCP<Epetra_RowMatrix> mat =
72 Teuchos::rcp_dynamic_cast<Epetra_RowMatrix>(op,
true);
73 Teuchos::RCP<ML_Epetra::MultiLevelPreconditioner> ml_prec =
74 Teuchos::rcp(
new ML_Epetra::MultiLevelPreconditioner(*mat, *precParams,
79 TEUCHOS_TEST_FOR_EXCEPTION(
true, std::logic_error,
80 "Stokhos::MLPreconditionerFactory is available " <<
81 "only with configured with ML support!");
88recompute(
const Teuchos::RCP<Epetra_Operator>& op,
89 const Teuchos::RCP<Epetra_Operator>& prec_op) {
92 Teuchos::RCP<Epetra_CrsMatrix> mat =
93 Teuchos::rcp_dynamic_cast<Epetra_CrsMatrix>(op,
true);
94 Teuchos::RCP<ML_Epetra::MultiLevelPreconditioner> ml_prec =
95 Teuchos::rcp_dynamic_cast<ML_Epetra::MultiLevelPreconditioner>(prec_op);
101 non_const_prec_crs_mat = *mat;
104 ml_prec->ComputePreconditioner();
106 TEUCHOS_TEST_FOR_EXCEPTION(
true, std::logic_error,
107 "Stokhos::MLPreconditionerFactory is available " <<
108 "only with configured with ML support!");