46 #ifndef XPETRA_ROWMATRIX_HPP
47 #define XPETRA_ROWMATRIX_HPP
53 #include <Teuchos_Describable.hpp>
61 template <class Scalar = Vector<>::scalar_type,
62 class LocalOrdinal = Map<>::local_ordinal_type,
63 class GlobalOrdinal =
typename Map<LocalOrdinal>::global_ordinal_type,
64 class Node =
typename Map<LocalOrdinal, GlobalOrdinal>::node_type>
165 virtual void apply(
const MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &X,
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 = 0;
173 #define XPETRA_ROWMATRIX_SHORT
174 #endif // XPETRA_ROWMATRIX_HPP
virtual bool isLocallyIndexed() const =0
If matrix indices are in the local range, this function returns true. Otherwise, this function return...
virtual void getLocalRowCopy(LocalOrdinal LocalRow, const Teuchos::ArrayView< LocalOrdinal > &Indices, const Teuchos::ArrayView< Scalar > &Values, size_t &NumEntries) const =0
Extract a list of entries in a specified local row of the graph. Put into storage allocated by callin...
virtual void getLocalDiagCopy(Vector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &diag) const =0
Get a copy of the diagonal entries owned by this node, with local row indices.
virtual ~RowMatrix()
Destructor.
virtual bool isGloballyIndexed() const =0
If matrix indices are in the global range, this function returns true. Otherwise, this function retur...
virtual size_t getGlobalMaxNumRowEntries() const =0
Returns the maximum number of entries across all rows/columns on all nodes.
virtual const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > getDomainMap() const =0
Returns the Map associated with the domain of this operator, which must be compatible with X...
virtual const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > getColMap() const =0
Returns the Map that describes the column distribution in this matrix.
virtual void getGlobalRowView(GlobalOrdinal GlobalRow, ArrayView< const GlobalOrdinal > &indices, ArrayView< const Scalar > &values) const =0
Extract a const, non-persisting view of global indices in a specified row of the matrix.
virtual ScalarTraits< Scalar >::magnitudeType getFrobeniusNorm() const =0
Returns the Frobenius norm of the matrix.
virtual const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > getRangeMap() const =0
Returns the Map associated with the range of this operator, which must be compatible with Y...
virtual size_t getNodeNumEntries() const =0
Returns the local number of entries in this matrix.
GlobalOrdinal global_ordinal_type
virtual size_t getNodeNumRows() const =0
Returns the number of rows owned on the calling node.
virtual global_size_t getGlobalNumEntries() const =0
Returns the global number of entries in this matrix.
virtual global_size_t getGlobalNumCols() const =0
Returns the number of global columns in this matrix.
size_t global_size_t
Global size_t object.
virtual bool isFillComplete() const =0
Returns true if fillComplete() has been called.
virtual size_t getNodeMaxNumRowEntries() const =0
Returns the maximum number of entries across all rows/columns on this node.
virtual void getLocalRowView(LocalOrdinal LocalRow, ArrayView< const LocalOrdinal > &indices, ArrayView< const Scalar > &values) const =0
Extract a const, non-persisting view of local indices in a specified row of the matrix.
virtual size_t getNumEntriesInLocalRow(LocalOrdinal localRow) const =0
Returns the current number of entries on this node in the specified local row.
LocalOrdinal local_ordinal_type
virtual void apply(const MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &X, 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 =0
Computes the operator-multivector application.
virtual bool supportsRowViews() const =0
Returns true if getLocalRowView() and getGlobalRowView() are valid for this class.
virtual global_size_t getGlobalNumRows() const =0
Returns the number of global rows in this matrix.
virtual const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > getRowMap() const =0
Returns the Map that describes the row distribution in this matrix.
virtual size_t getNodeNumCols() const =0
Returns the number of columns needed to apply the forward operator on this node, i.e., the number of elements listed in the column map.