10 #include <Tpetra_RowMatrix.hpp>
14 template <class Scalar = Tpetra::Operator<>::scalar_type,
27 using mag_type =
typename Kokkos::ArithTraits<impl_scalar_type>::mag_type;
30 typename row_matrix_type::local_inds_device_view_type;
32 typename row_matrix_type::local_inds_host_view_type;
34 typename row_matrix_type::nonconst_local_inds_host_view_type;
37 typename row_matrix_type::global_inds_device_view_type;
39 typename row_matrix_type::global_inds_host_view_type;
41 typename row_matrix_type::nonconst_global_inds_host_view_type;
44 typename row_matrix_type::values_device_view_type;
46 typename row_matrix_type::values_host_view_type;
48 typename row_matrix_type::nonconst_values_host_view_type;
56 ,
diag_(Teuchos::null) {}
65 return op_->getDomainMap();
70 return op_->getRangeMap();
83 op_->apply(X, Y, mode, alpha, beta);
88 return op_->getRangeMap();
100 return op_->getDomainMap()->getComm();
108 return getRowMap()->getGlobalNumElements();
116 return getRowMap()->getLocalNumElements();
175 size_t& NumEntries)
const {
183 size_t& NumEntries)
const {
void leftScale(const Tpetra::Vector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &x)
MueLu::DefaultLocalOrdinal LocalOrdinal
TpetraOperatorAsRowMatrix(const RCP< op_type > &op, const RCP< vec_type > &diag)
bool isLocallyIndexed() const
Teuchos::RCP< const Tpetra::Map< LocalOrdinal, GlobalOrdinal, Node > > getDomainMap() const
Returns the Tpetra::Map object associated with the domain of this operator.
size_t getLocalNumEntries() const
void getGlobalRowCopy(GlobalOrdinal GlobalRow, nonconst_global_inds_host_view_type &Indices, nonconst_values_host_view_type &Values, size_t &NumEntries) const
row_matrix_type::local_ordinal_type getBlockSize() const
typename row_matrix_type::values_device_view_type values_device_view_type
LocalOrdinal local_ordinal_type
size_t getNumEntriesInGlobalRow(GlobalOrdinal globalRow) const
void rightScale(const Tpetra::Vector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &x)
typename row_matrix_type::local_inds_host_view_type local_inds_host_view_type
Tpetra::global_size_t getGlobalNumRows() const
Tpetra::global_size_t getGlobalNumCols() const
void getLocalRowCopy(LocalOrdinal LocalRow, nonconst_local_inds_host_view_type &Indices, nonconst_values_host_view_type &Values, size_t &NumEntries) const
void getLocalDiagCopy(Tpetra::Vector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &diag) const
size_t getGlobalMaxNumRowEntries() const
typename Kokkos::ArithTraits< Scalar >::val_type impl_scalar_type
typename row_matrix_type::nonconst_local_inds_host_view_type nonconst_local_inds_host_view_type
GlobalOrdinal getIndexBase() const
MueLu::DefaultScalar Scalar
MueLu::DefaultGlobalOrdinal GlobalOrdinal
typename Kokkos::ArithTraits< Scalar >::mag_type mag_type
size_t getLocalNumRows() const
bool isGloballyIndexed() const
size_t getNumEntriesInLocalRow(LocalOrdinal localRow) const
bool supportsRowViews() const
void apply(const Tpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &X, Tpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &Y, Teuchos::ETransp mode=Teuchos::NO_TRANS, Scalar alpha=Teuchos::ScalarTraits< Scalar >::one(), Scalar beta=Teuchos::ScalarTraits< Scalar >::zero()) const
Returns in Y the result of a Tpetra::Operator applied to a Tpetra::MultiVector X. ...
typename row_matrix_type::values_host_view_type values_host_view_type
Tpetra::global_size_t getGlobalNumEntries() const
mag_type getFrobeniusNorm() const
typename row_matrix_type::nonconst_global_inds_host_view_type nonconst_global_inds_host_view_type
Teuchos::RCP< const Teuchos::Comm< int > > getComm() const
Teuchos::RCP< const Tpetra::RowGraph< LocalOrdinal, GlobalOrdinal, Node > > getGraph() const
typename row_matrix_type::local_inds_device_view_type local_inds_device_view_type
Teuchos::RCP< const Tpetra::Map< LocalOrdinal, GlobalOrdinal, Node > > getColMap() const
typename row_matrix_type::global_inds_host_view_type global_inds_host_view_type
typename row_matrix_type::global_inds_device_view_type global_inds_device_view_type
typename row_matrix_type::nonconst_values_host_view_type nonconst_values_host_view_type
Teuchos::RCP< const Tpetra::Map< LocalOrdinal, GlobalOrdinal, Node > > getRangeMap() const
Returns the Tpetra::Map object associated with the range of this operator.
Exception throws to report errors in the internal logical of the program.
void getLocalRowView(LocalOrdinal LocalRow, local_inds_host_view_type &indices, values_host_view_type &values) const
TpetraOperatorAsRowMatrix(const RCP< op_type > &op)
Constructor.
bool isFillComplete() const
size_t getLocalNumCols() const
size_t getLocalMaxNumRowEntries() const
void getGlobalRowView(GlobalOrdinal GlobalRow, global_inds_host_view_type &indices, values_host_view_type &values) const
Teuchos::RCP< const Tpetra::Map< LocalOrdinal, GlobalOrdinal, Node > > getRowMap() const