42 #ifndef TPETRA_ROWMATRIX_DECL_HPP 43 #define TPETRA_ROWMATRIX_DECL_HPP 45 #include "Tpetra_ConfigDefs.hpp" 48 #include "Tpetra_Operator.hpp" 52 #include "Teuchos_Describable.hpp" 81 template <
class Scalar = ::Tpetra::Details::DefaultTypes::scalar_type,
83 class GlobalOrdinal = ::Tpetra::Details::DefaultTypes::global_ordinal_type,
86 virtual public Operator<Scalar, LocalOrdinal, GlobalOrdinal, Node>,
88 public Packable<char, LocalOrdinal> {
121 virtual Teuchos::RCP<const Teuchos::Comm<int> >
getComm()
const = 0;
124 virtual Teuchos::RCP<Node>
getNode()
const = 0;
127 virtual Teuchos::RCP<const Map<LocalOrdinal,GlobalOrdinal,Node> >
getRowMap()
const = 0;
130 virtual Teuchos::RCP<const Map<LocalOrdinal,GlobalOrdinal,Node> >
getColMap()
const = 0;
133 virtual Teuchos::RCP<const RowGraph<LocalOrdinal,GlobalOrdinal,Node> >
getGraph()
const = 0;
303 const Teuchos::ArrayView<GlobalOrdinal> &Indices,
304 const Teuchos::ArrayView<Scalar> &Values,
305 size_t &NumEntries)
const = 0;
329 const Teuchos::ArrayView<LocalOrdinal> &Indices,
330 const Teuchos::ArrayView<Scalar> &Values,
331 size_t &NumEntries)
const = 0;
359 Teuchos::ArrayView<const GlobalOrdinal> &indices,
360 Teuchos::ArrayView<const Scalar> &values)
const = 0;
388 Teuchos::ArrayView<const LocalOrdinal>& indices,
389 Teuchos::ArrayView<const Scalar>& values)
const = 0;
419 LocalOrdinal& numEnt,
420 const LocalOrdinal*& lclColInds,
421 const Scalar*& vals)
const;
513 virtual Teuchos::RCP<RowMatrix<Scalar, LocalOrdinal, GlobalOrdinal, Node> >
514 add (
const Scalar& alpha,
519 const Teuchos::RCP<Teuchos::ParameterList>& params = Teuchos::null)
const;
525 packRow (
char*
const numEntOut,
529 const LocalOrdinal lclRow)
const;
534 allocatePackSpace (Teuchos::Array<char>& exports,
535 size_t& totalNumEntries,
536 const Teuchos::ArrayView<const LocalOrdinal>& exportLIDs)
const;
543 packImpl (
const Teuchos::ArrayView<const LocalOrdinal>& exportLIDs,
544 Teuchos::Array<char>& exports,
545 const Teuchos::ArrayView<size_t>& numPacketsPerLID,
546 size_t& constantNumPackets,
560 pack (
const Teuchos::ArrayView<const LocalOrdinal>& exportLIDs,
561 Teuchos::Array<char>& exports,
562 const Teuchos::ArrayView<size_t>& numPacketsPerLID,
563 size_t& constantNumPackets,
570 #endif // TPETRA_ROWMATRIX_DECL_HPP virtual Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > getRowMap() const =0
The Map that describes the distribution of rows over processes.
Namespace Tpetra contains the class and methods constituting the Tpetra library.
virtual ~RowMatrix()
Destructor (virtual for memory safety of derived classes).
virtual size_t getNodeMaxNumRowEntries() const =0
Maximum number of entries in any row of the matrix, on this process.
virtual LocalOrdinal getLocalRowViewRaw(const LocalOrdinal lclRow, LocalOrdinal &numEnt, const LocalOrdinal *&lclColInds, const Scalar *&vals) const
Get a constant, nonpersisting, locally indexed view of the given row of the matrix, using "raw" pointers instead of Teuchos::ArrayView.
virtual void getGlobalRowView(GlobalOrdinal GlobalRow, Teuchos::ArrayView< const GlobalOrdinal > &indices, Teuchos::ArrayView< const Scalar > &values) const =0
Get a constant, nonpersisting, globally indexed view of the given row of the matrix.
virtual size_t getGlobalMaxNumRowEntries() const =0
Maximum number of entries in any row of the matrix, over all processes.
virtual mag_type getFrobeniusNorm() const =0
The Frobenius norm of the matrix.
A distributed dense vector.
Abstract base class for objects that can be the source of an Import or Export operation, and that also know how to pack their data to send to the target object.
virtual void rightScale(const Vector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &x)=0
Scale the matrix on the right with the given Vector.
virtual bool isFillComplete() const =0
Whether fillComplete() has been called.
Forward declaration of Tpetra::RowMatrix.
virtual void pack(const Teuchos::ArrayView< const LocalOrdinal > &exportLIDs, Teuchos::Array< char > &exports, const Teuchos::ArrayView< size_t > &numPacketsPerLID, size_t &constantNumPackets, Distributor &distor) const
Pack this object's data for an Import or Export.
virtual bool supportsRowViews() const =0
Whether this object implements getLocalRowView() and getGlobalRowView().
Abstract base class for sources of an Import or Export.
virtual bool isGloballyIndexed() const =0
Whether matrix indices are globally indexed.
MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::mag_type mag_type
Type of a norm result.
virtual void getLocalRowView(LocalOrdinal LocalRow, Teuchos::ArrayView< const LocalOrdinal > &indices, Teuchos::ArrayView< const Scalar > &values) const =0
Get a constant, nonpersisting, locally indexed view of the given row of the matrix.
virtual Teuchos::RCP< Node > getNode() const =0
The Kokkos Node instance.
virtual Teuchos::RCP< const RowGraph< LocalOrdinal, GlobalOrdinal, Node > > getGraph() const =0
The RowGraph associated with this matrix.
int local_ordinal_type
Default value of Scalar template parameter.
virtual void leftScale(const Vector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &x)=0
Scale the matrix on the left with the given Vector.
virtual size_t getNodeNumRows() const =0
The number of rows owned by the calling process.
Scalar scalar_type
The type of the entries in the sparse matrix.
Forward declaration of Tpetra::RowGraph.
virtual bool TPETRA_DEPRECATED isUpperTriangular() const =0
Whether the matrix is locally upper triangular.
size_t global_size_t
Global size_t object.
virtual global_size_t TPETRA_DEPRECATED getGlobalNumDiags() const =0
Number of diagonal entries in the matrix's graph, over all processes in the matrix's communicator...
virtual Teuchos::RCP< RowMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node > > add(const Scalar &alpha, const RowMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node > &A, const Scalar &beta, const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &domainMap=Teuchos::null, const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &rangeMap=Teuchos::null, const Teuchos::RCP< Teuchos::ParameterList > ¶ms=Teuchos::null) const
Return a new RowMatrix which is the result of beta*this + alpha*A.
Sets up and executes a communication plan for a Tpetra DistObject.
virtual void getGlobalRowCopy(GlobalOrdinal GlobalRow, const Teuchos::ArrayView< GlobalOrdinal > &Indices, const Teuchos::ArrayView< Scalar > &Values, size_t &NumEntries) const =0
Get a copy of the given global row's entries.
virtual GlobalOrdinal getIndexBase() const =0
The index base for global indices in this matrix.
virtual global_size_t getGlobalNumRows() const =0
The global number of rows of this matrix.
Abstract base class for objects that can be the source of an Import or Export operation.
virtual size_t getNodeNumCols() const =0
The number of columns needed to apply the forward operator on this node.
A read-only, row-oriented interface to a sparse matrix.
Forward declaration of Tpetra::Vector.
virtual size_t getNumEntriesInLocalRow(LocalOrdinal localRow) const =0
The current number of entries on the calling process in the specified local row.
::Kokkos::Compat::KokkosDeviceWrapperNode< execution_space > node_type
Default value of Node template parameter.
LocalOrdinal local_ordinal_type
The type of local indices.
virtual global_size_t getGlobalNumEntries() const =0
The global number of stored (structurally nonzero) entries.
virtual void getLocalDiagCopy(Vector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &diag) const =0
Get a copy of the diagonal entries, distributed by the row Map.
virtual Teuchos::RCP< const Teuchos::Comm< int > > getComm() const =0
The communicator over which this matrix is distributed.
virtual bool isLocallyIndexed() const =0
Whether matrix indices are locally indexed.
virtual size_t getNodeNumEntries() const =0
The local number of stored (structurally nonzero) entries.
virtual size_t getNumEntriesInGlobalRow(GlobalOrdinal globalRow) const =0
The current number of entries on the calling process in the specified global row. ...
Kokkos::Details::ArithTraits< impl_scalar_type >::mag_type mag_type
Type of a norm result.
Abstract interface for operators (e.g., matrices and preconditioners).
A parallel distribution of indices over processes.
Declaration of Tpetra::Packable.
virtual size_t TPETRA_DEPRECATED getNodeNumDiags() const =0
Number of diagonal entries in the matrix's graph, on the calling process.
virtual bool hasColMap() const =0
Whether this matrix has a well-defined column Map.
virtual bool TPETRA_DEPRECATED isLowerTriangular() const =0
Whether the matrix is locally lower triangular.
virtual void getLocalRowCopy(LocalOrdinal LocalRow, const Teuchos::ArrayView< LocalOrdinal > &Indices, const Teuchos::ArrayView< Scalar > &Values, size_t &NumEntries) const =0
Get a copy of the given local row's entries.
virtual Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > getColMap() const =0
The Map that describes the distribution of columns over processes.
GlobalOrdinal global_ordinal_type
The type of global indices.
Node node_type
The Kokkos Node type.
virtual global_size_t getGlobalNumCols() const =0
The global number of columns of this matrix.