10 #ifndef XPETRA_ROWMATRIX_HPP
11 #define XPETRA_ROWMATRIX_HPP
17 #include <Teuchos_Describable.hpp>
18 #include <Tpetra_KokkosCompat_DefaultNode.hpp>
20 #include "Xpetra_Map.hpp"
26 template <
class Scalar,
29 class Node = Tpetra::KokkosClassic::DefaultNode::DefaultNodeType>
49 virtual const Teuchos::RCP<const Map<LocalOrdinal, GlobalOrdinal, Node> >
getRowMap()
const = 0;
52 virtual const Teuchos::RCP<const Map<LocalOrdinal, GlobalOrdinal, Node> >
getColMap()
const = 0;
99 virtual void getLocalRowCopy(LocalOrdinal LocalRow,
const Teuchos::ArrayView<LocalOrdinal> &Indices,
const Teuchos::ArrayView<Scalar> &Values,
size_t &NumEntries)
const = 0;
102 virtual void getGlobalRowView(GlobalOrdinal GlobalRow, ArrayView<const GlobalOrdinal> &indices, ArrayView<const Scalar> &values)
const = 0;
105 virtual void getLocalRowView(LocalOrdinal LocalRow, ArrayView<const LocalOrdinal> &indices, ArrayView<const Scalar> &values)
const = 0;
116 virtual typename ScalarTraits<Scalar>::magnitudeType
getFrobeniusNorm()
const = 0;
124 virtual const Teuchos::RCP<const Map<LocalOrdinal, GlobalOrdinal, Node> >
getDomainMap()
const = 0;
127 virtual const Teuchos::RCP<const Map<LocalOrdinal, GlobalOrdinal, Node> >
getRangeMap()
const = 0;
130 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;
138 #define XPETRA_ROWMATRIX_SHORT
139 #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 getLocalNumCols() 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.
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 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 > > getRangeMap() const =0
Returns the Map associated with the range of this operator, which must be compatible with Y...
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 size_t getLocalNumEntries() const =0
Returns the local number of entries in this matrix.
virtual const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > getColMap() const =0
Returns the Map that describes the column distribution in this matrix.
GlobalOrdinal global_ordinal_type
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 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.
virtual size_t getLocalNumRows() const =0
Returns the number of rows owned on the calling node.
virtual ScalarTraits< Scalar >::magnitudeType getFrobeniusNorm() const =0
Returns the Frobenius norm of the matrix.
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 size_t getLocalMaxNumRowEntries() const =0
Returns the maximum number of entries across all rows/columns on this node.
virtual const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > getRowMap() const =0
Returns the Map that describes the row distribution in this matrix.
virtual global_size_t getGlobalNumRows() const =0
Returns the number of global rows in this matrix.