10#ifndef IFPACK2_DETAILS_GETCRSMATRIX_HPP
11#define IFPACK2_DETAILS_GETCRSMATRIX_HPP
13#include "Ifpack2_ConfigDefs.hpp"
14#include "Tpetra_CrsMatrix.hpp"
15#include "Tpetra_BlockCrsMatrix.hpp"
16#include "Ifpack2_Details_AdditiveSchwarzFilter.hpp"
23template <
typename SC,
typename LO,
typename GO,
typename NO>
24Teuchos::RCP<const Tpetra::CrsMatrix<SC, LO, GO, NO>> getCrsMatrix(
const Teuchos::RCP<
const Tpetra::RowMatrix<SC, LO, GO, NO>>& A) {
25 using row_matrix_type = Tpetra::RowMatrix<SC, LO, GO, NO>;
26 using crs_matrix_type = Tpetra::CrsMatrix<SC, LO, GO, NO>;
27 auto Acrs = Teuchos::rcp_dynamic_cast<const crs_matrix_type>(A);
30 auto Aasf = Teuchos::rcp_dynamic_cast<const AdditiveSchwarzFilter<row_matrix_type>>(A);
32 return Aasf->getFilteredMatrix();
38template <
typename SC,
typename LO,
typename GO,
typename NO>
39Teuchos::RCP<const Tpetra::BlockCrsMatrix<SC, LO, GO, NO>> getBcrsMatrix(
const Teuchos::RCP<
const Tpetra::RowMatrix<SC, LO, GO, NO>>& A) {
40 using bcrs_matrix_type = Tpetra::BlockCrsMatrix<SC, LO, GO, NO>;
41 auto Abcrs = Teuchos::rcp_dynamic_cast<const bcrs_matrix_type>(A);
Ifpack2 implementation details.
Preconditioners and smoothers for Tpetra sparse matrices.
Definition Ifpack2_AdditiveSchwarz_decl.hpp:40