45class ScaledDampedResidual {
47 using SC =
typename TpetraOperatorType::scalar_type;
48 using LO =
typename TpetraOperatorType::local_ordinal_type;
49 using GO =
typename TpetraOperatorType::global_ordinal_type;
50 using NT =
typename TpetraOperatorType::node_type;
52 using crs_matrix_type = Tpetra::CrsMatrix<SC, LO, GO, NT>;
53 using multivector_type = Tpetra::MultiVector<SC, LO, GO, NT>;
54 using operator_type = Tpetra::Operator<SC, LO, GO, NT>;
55 using vector_type = Tpetra::Vector<SC, LO, GO, NT>;
58 ScaledDampedResidual (
const Teuchos::RCP<const operator_type>& A);
61 setMatrix (
const Teuchos::RCP<const operator_type>& A);
64 compute (multivector_type& W,
72 using import_type = Tpetra::Import<LO, GO, NT>;
73 using export_type = Tpetra::Export<LO, GO, NT>;
75 Teuchos::RCP<const operator_type> A_op_;
76 Teuchos::RCP<const crs_matrix_type> A_crs_;
77 Teuchos::RCP<const import_type> imp_;
78 Teuchos::RCP<const export_type> exp_;
79 std::unique_ptr<vector_type> X_colMap_;
80 std::unique_ptr<multivector_type> V1_;
82 Teuchos::RCP<vector_type> W_vec_, B_vec_, X_vec_;
86 importVector (vector_type& X_domMap);
88 bool canFuse (
const multivector_type& B)
const;
91 unfusedCase (multivector_type& W,
95 const operator_type& A,
100 fusedCase (vector_type& W,
104 const crs_matrix_type& A,