Tpetra::CrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node, LocalMatVec, LocalMatSolve > Class Template Reference

A class for constructing and using sparse compressed matrices with row access. More...

#include <Tpetra_CrsMatrix.hpp>

Inheritance diagram for Tpetra::CrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node, LocalMatVec, LocalMatSolve >:

Inheritance graph
[legend]
List of all members.

Public Member Functions

Constructor/Destructor Methods
 CrsMatrix (const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &rowMap, size_t maxNumEntriesPerRow, ProfileType pftype=DynamicProfile)
 Constructor specifying the number of non-zeros for all rows.
 CrsMatrix (const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &rowMap, const Teuchos::ArrayRCP< const size_t > &NumEntriesPerRowToAlloc, ProfileType pftype=DynamicProfile)
 Constructor specifying the number of non-zeros for each row.
 CrsMatrix (const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &rowMap, const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &colMap, size_t maxNumEntriesPerRow, ProfileType pftype=DynamicProfile)
 Constructor specifying a column map and the number of non-zeros for all rows.
 CrsMatrix (const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &rowMap, const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &colMap, const Teuchos::ArrayRCP< const size_t > &NumEntriesPerRowToAlloc, ProfileType pftype=DynamicProfile)
 Constructor specifying a column map and the number of non-zeros for each row.
 CrsMatrix (const Teuchos::RCP< CrsGraph< LocalOrdinal, GlobalOrdinal, Node > > &graph)
 Constructor specifying a pre-constructed graph.
Insertion/Removal Methods
void insertGlobalValues (GlobalOrdinal globalRow, const Teuchos::ArrayView< const GlobalOrdinal > &cols, const Teuchos::ArrayView< const Scalar > &vals)
 Submit matrix entries, using global IDs.
void insertLocalValues (LocalOrdinal localRow, const Teuchos::ArrayView< const LocalOrdinal > &cols, const Teuchos::ArrayView< const Scalar > &vals)
 Submit matrix entries, using local IDs.
void replaceGlobalValues (GlobalOrdinal globalRow, const Teuchos::ArrayView< const GlobalOrdinal > &cols, const Teuchos::ArrayView< const Scalar > &vals)
 Replace matrix entries, using global IDs.
void sumIntoGlobalValues (GlobalOrdinal globalRow, const Teuchos::ArrayView< const GlobalOrdinal > &cols, const Teuchos::ArrayView< const Scalar > &vals)
 Sum into multiple entries, using global IDs.
void setAllToScalar (const Scalar &alpha)
 Set all matrix entries equal to scalarThis.
void scale (const Scalar &alpha)
 Scale the current values of a matrix, this = alpha*this.
Transformational Methods
void globalAssemble ()
 Communicate non-local contributions to other nodes.
void fillComplete (const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &domainMap, const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &rangeMap, OptimizeOption os=DoOptimizeStorage)
 Signal that data entry is complete, specifying domain and range maps. Off-node entries are distributed, repeated entries are summed, and global indices are transformed to local indices. If OptimizeStorage is true, then optimizeStorage() is called as well.
void fillComplete (OptimizeOption os=DoOptimizeStorage)
 Signal that data entry is complete. Off-node entries are distributed, repeated entries are summed, and global indices are transformed to local indices. If OptimizeStorage is true, then optimizeStorage() is called as well.
void optimizeStorage ()
 Re-allocate the data into contiguous storage.
Methods implementing RowMatrix
const Teuchos::RCP< const
Teuchos::Comm< int > > & 
getComm () const
 Returns the communicator.
Teuchos::RCP< Node > getNode () const
 Returns the underlying node.
const Teuchos::RCP< const
Map< LocalOrdinal, GlobalOrdinal,
Node > > & 
getRowMap () const
 Returns the Map that describes the row distribution in this matrix.
const Teuchos::RCP< const
Map< LocalOrdinal, GlobalOrdinal,
Node > > & 
getColMap () const
 Returns the Map that describes the column distribution in this matrix.
Teuchos::RCP< const RowGraph<
LocalOrdinal, GlobalOrdinal,
Node > > 
getGraph () const
 Returns the RowGraph associated with this matrix.
Teuchos::RCP< const CrsGraph<
LocalOrdinal, GlobalOrdinal > > 
getCrsGraph () const
 Returns the CrsGraph associated with this matrix.
global_size_t getGlobalNumRows () const
 Returns the number of global rows in this matrix.
global_size_t getGlobalNumCols () const
 Returns the number of global columns in this matrix.
size_t getNodeNumRows () const
 Returns the number of matrix rows owned by the calling image.
size_t getNodeNumCols () const
 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.
GlobalOrdinal getIndexBase () const
 Returns the index base for global indices for this matrix.
global_size_t getGlobalNumEntries () const
 Returns the global number of entries in this matrix.
size_t getNodeNumEntries () const
 Returns the local number of entries in this matrix.
size_t getNumEntriesInGlobalRow (GlobalOrdinal globalRow) const
 Returns the current number of entries on this node in the specified global row.
size_t getNumEntriesInLocalRow (LocalOrdinal localRow) const
 Returns the current number of entries on this node in the specified local row.
global_size_t getGlobalNumDiags () const
 Returns the number of global diagonal entries, based on global row/column index comparisons.
size_t getNodeNumDiags () const
 Returns the number of local diagonal entries, based on global row/column index comparisons.
size_t getGlobalMaxNumRowEntries () const
 Returns the maximum number of entries across all rows/columns on all nodes.
size_t getNodeMaxNumRowEntries () const
 Returns the maximum number of entries across all rows/columns on this node.
bool hasColMap () const
 Indicates whether this matrix has a well-defined column map.
bool isLowerTriangular () const
 Indicates whether this matrix is lower triangular.
bool isUpperTriangular () const
 Indicates whether this matrix is upper triangular.
bool isLocallyIndexed () const
 If matrix indices are in the local range, this function returns true. Otherwise, this function returns false. */.
bool isGloballyIndexed () const
 If matrix indices are in the global range, this function returns true. Otherwise, this function returns false. */.
bool isFillComplete () const
 Returns true if fillComplete() has been called.
void getGlobalRowCopy (GlobalOrdinal GlobalRow, const Teuchos::ArrayView< GlobalOrdinal > &Indices, const Teuchos::ArrayView< Scalar > &Values, size_t &NumEntries) const
 Extract a list of entries in a specified global row of this matrix. Put into pre-allocated storage.
void getLocalRowCopy (LocalOrdinal LocalRow, const Teuchos::ArrayView< LocalOrdinal > &Indices, const Teuchos::ArrayView< Scalar > &Values, size_t &NumEntries) const
 Extract a list of entries in a specified local row of the graph. Put into storage allocated by calling routine.
void getGlobalRowView (GlobalOrdinal GlobalRow, Teuchos::ArrayRCP< const GlobalOrdinal > &indices, Teuchos::ArrayRCP< const Scalar > &values) const
 Get a persisting const view of the entries in a specified global row of this matrix.
void getLocalRowView (LocalOrdinal LocalRow, Teuchos::ArrayRCP< const LocalOrdinal > &indices, Teuchos::ArrayRCP< const Scalar > &values) const
 Get a persisting const view of the entries in a specified local row of this matrix.
void getLocalDiagCopy (Vector< Scalar, LocalOrdinal, GlobalOrdinal > &diag) const
 Get a copy of the diagonal entries owned by this node, with local row idices.
Matrix-vector multiplication and solve methods
template<class DomainScalar, class RangeScalar>
void multiply (const MultiVector< DomainScalar, LocalOrdinal, GlobalOrdinal, Node > &X, MultiVector< RangeScalar, LocalOrdinal, GlobalOrdinal, Node > &Y, Teuchos::ETransp trans) const
 Multiplies this matrix by a MultiVector.
template<class DomainScalar, class RangeScalar>
void solve (const MultiVector< RangeScalar, LocalOrdinal, GlobalOrdinal, Node > &Y, MultiVector< DomainScalar, LocalOrdinal, GlobalOrdinal, Node > &X, Teuchos::ETransp trans) const
 Solves a linear system when the underlying matrix is triangular.
Methods implementing Operator
const Teuchos::RCP< const
Map< LocalOrdinal, GlobalOrdinal,
Node > > & 
getDomainMap () const
 Returns the Map associated with the domain of this operator. This will be Teuchos::null until fillComplete() is called.
const Teuchos::RCP< const
Map< LocalOrdinal, GlobalOrdinal,
Node > > & 
getRangeMap () const
void apply (const MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &X, MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &Y, Teuchos::ETransp mode=Teuchos::NO_TRANS) const
 Computes this matrix-vector multilication y = A x.
bool hasTransposeApply () const
 Indicates whether this operator supports applying the adjoint operator.
Methods implementing InverseOperator
void applyInverse (const MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &X, MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &Y, Teuchos::ETransp mode=Teuchos::NO_TRANS) const
 Computes this matrix-vector multilication y = A x.
bool hasTransposeApplyInverse () const
 Indicates whether this operator supports inverting the adjoint operator.
Miscellaneous Query Methods
bool isStorageOptimized () const
 Returns true if optimizeStorage() has been called.
ProfileType getProfileType () const
 Returns true if the graph data was allocated in static data structures.
bool isStaticGraph () const
 Indicates that the graph is static, so that new entries cannot be added to this matrix. */.
Overridden from Teuchos::Describable
std::string description () const
 Return a simple one-line description of this object.
void describe (Teuchos::FancyOStream &out, const Teuchos::EVerbosityLevel verbLevel=Teuchos::Describable::verbLevel_default) const
 Print the object with some verbosity level to an FancyOStream object.

Protected Member Functions

Teuchos::ArrayRCP< const Scalar > getFullView (size_t myRow, RowInfo sizeInfo) const
 Get a persisting const view of the elements in a specified local row of the matrix.
Teuchos::ArrayRCP< Scalar > getFullViewNonConst (size_t myRow, RowInfo sizeInfo)
 Get a persisting non-const view of the elements in a specified local row of the matrix.

Detailed Description

template<class Scalar, class LocalOrdinal = int, class GlobalOrdinal = LocalOrdinal, class Node = Kokkos::DefaultNode::DefaultNodeType, class LocalMatVec = Kokkos::DefaultSparseMultiply<Scalar,LocalOrdinal,Node>, class LocalMatSolve = Kokkos::DefaultSparseSolve<Scalar,LocalOrdinal,Node>>
class Tpetra::CrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node, LocalMatVec, LocalMatSolve >

A class for constructing and using sparse compressed matrices with row access.

This class allows the construction of sparse matrices with row-access. Method insertGlobalValues() can be used to set both locally owned and non-local elements; the shipping of data is done with hardcoded MPI calls when fillComplete() is called.

The nonzero elements of locally owned row can be accessed by method getLocalRowCopy() or getGlobalRowCopy(). The former returns the column indices using local numbering, the latter using global numbering.

This class is templated on Scalar, LocalOrdinal and GlobalOrdinal. The LocalOrdinal type, if omitted, defaults to int. The GlobalOrdinal type, if omitted, defaults to the LocalOrdinal type. The class utilizes CrsGraph object which has the same local and global ordinal types.


Constructor & Destructor Documentation

template<class Scalar, class LocalOrdinal, class GlobalOrdinal, class Node, class LocalMatVec, class LocalMatSolve>
Tpetra::CrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node, LocalMatVec, LocalMatSolve >::CrsMatrix ( const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &  rowMap,
size_t  maxNumEntriesPerRow,
ProfileType  pftype = DynamicProfile 
)

Constructor specifying the number of non-zeros for all rows.

template<class Scalar, class LocalOrdinal, class GlobalOrdinal, class Node, class LocalMatVec, class LocalMatSolve>
Tpetra::CrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node, LocalMatVec, LocalMatSolve >::CrsMatrix ( const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &  rowMap,
const Teuchos::ArrayRCP< const size_t > &  NumEntriesPerRowToAlloc,
ProfileType  pftype = DynamicProfile 
)

Constructor specifying the number of non-zeros for each row.

template<class Scalar, class LocalOrdinal, class GlobalOrdinal, class Node, class LocalMatVec, class LocalMatSolve>
Tpetra::CrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node, LocalMatVec, LocalMatSolve >::CrsMatrix ( const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &  rowMap,
const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &  colMap,
size_t  maxNumEntriesPerRow,
ProfileType  pftype = DynamicProfile 
)

Constructor specifying a column map and the number of non-zeros for all rows.

template<class Scalar, class LocalOrdinal, class GlobalOrdinal, class Node, class LocalMatVec, class LocalMatSolve>
Tpetra::CrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node, LocalMatVec, LocalMatSolve >::CrsMatrix ( const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &  rowMap,
const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &  colMap,
const Teuchos::ArrayRCP< const size_t > &  NumEntriesPerRowToAlloc,
ProfileType  pftype = DynamicProfile 
)

Constructor specifying a column map and the number of non-zeros for each row.

template<class Scalar, class LocalOrdinal, class GlobalOrdinal, class Node, class LocalMatVec, class LocalMatSolve>
Tpetra::CrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node, LocalMatVec, LocalMatSolve >::CrsMatrix ( const Teuchos::RCP< CrsGraph< LocalOrdinal, GlobalOrdinal, Node > > &  graph  )  [explicit]

Constructor specifying a pre-constructed graph.


Member Function Documentation

template<class Scalar, class LocalOrdinal, class GlobalOrdinal, class Node, class LocalMatVec, class LocalMatSolve>
void Tpetra::CrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node, LocalMatVec, LocalMatSolve >::insertGlobalValues ( GlobalOrdinal  globalRow,
const Teuchos::ArrayView< const GlobalOrdinal > &  cols,
const Teuchos::ArrayView< const Scalar > &  vals 
)

Submit matrix entries, using global IDs.

template<class Scalar, class LocalOrdinal, class GlobalOrdinal, class Node, class LocalMatVec, class LocalMatSolve>
void Tpetra::CrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node, LocalMatVec, LocalMatSolve >::insertLocalValues ( LocalOrdinal  localRow,
const Teuchos::ArrayView< const LocalOrdinal > &  cols,
const Teuchos::ArrayView< const Scalar > &  vals 
)

Submit matrix entries, using local IDs.

template<class Scalar, class LocalOrdinal, class GlobalOrdinal, class Node, class LocalMatVec, class LocalMatSolve>
void Tpetra::CrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node, LocalMatVec, LocalMatSolve >::replaceGlobalValues ( GlobalOrdinal  globalRow,
const Teuchos::ArrayView< const GlobalOrdinal > &  cols,
const Teuchos::ArrayView< const Scalar > &  vals 
)

Replace matrix entries, using global IDs.

All index values must be in the global space. If (globalRow,cols[i]) corresponds to an entry that is duplicated in this matrix (likely because it was inserted more than once and fillComplete() has not been called), the behavior of this function is not defined.

template<class Scalar, class LocalOrdinal, class GlobalOrdinal, class Node, class LocalMatVec, class LocalMatSolve>
void Tpetra::CrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node, LocalMatVec, LocalMatSolve >::sumIntoGlobalValues ( GlobalOrdinal  globalRow,
const Teuchos::ArrayView< const GlobalOrdinal > &  cols,
const Teuchos::ArrayView< const Scalar > &  vals 
)

Sum into multiple entries, using global IDs.

All index values must be in the global space.

template<class Scalar, class LocalOrdinal, class GlobalOrdinal, class Node, class LocalMatVec, class LocalMatSolve>
void Tpetra::CrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node, LocalMatVec, LocalMatSolve >::setAllToScalar ( const Scalar &  alpha  ) 

Set all matrix entries equal to scalarThis.

template<class Scalar, class LocalOrdinal, class GlobalOrdinal, class Node, class LocalMatVec, class LocalMatSolve>
void Tpetra::CrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node, LocalMatVec, LocalMatSolve >::scale ( const Scalar &  alpha  ) 

Scale the current values of a matrix, this = alpha*this.

template<class Scalar, class LocalOrdinal, class GlobalOrdinal, class Node, class LocalMatVec, class LocalMatSolve>
void Tpetra::CrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node, LocalMatVec, LocalMatSolve >::globalAssemble (  ) 

Communicate non-local contributions to other nodes.

template<class Scalar, class LocalOrdinal, class GlobalOrdinal, class Node, class LocalMatVec, class LocalMatSolve>
void Tpetra::CrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node, LocalMatVec, LocalMatSolve >::fillComplete ( const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &  domainMap,
const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &  rangeMap,
OptimizeOption  os = DoOptimizeStorage 
)

Signal that data entry is complete, specifying domain and range maps. Off-node entries are distributed, repeated entries are summed, and global indices are transformed to local indices. If OptimizeStorage is true, then optimizeStorage() is called as well.

template<class Scalar, class LocalOrdinal, class GlobalOrdinal, class Node, class LocalMatVec, class LocalMatSolve>
void Tpetra::CrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node, LocalMatVec, LocalMatSolve >::fillComplete ( OptimizeOption  os = DoOptimizeStorage  ) 

Signal that data entry is complete. Off-node entries are distributed, repeated entries are summed, and global indices are transformed to local indices. If OptimizeStorage is true, then optimizeStorage() is called as well.

Note:
This method calls fillComplete( getRowMap(), getRowMap() ).

template<class Scalar, class LocalOrdinal, class GlobalOrdinal, class Node, class LocalMatVec, class LocalMatSolve>
void Tpetra::CrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node, LocalMatVec, LocalMatSolve >::optimizeStorage (  ) 

Re-allocate the data into contiguous storage.

template<class Scalar, class LocalOrdinal, class GlobalOrdinal, class Node, class LocalMatVec, class LocalMatSolve>
const Teuchos::RCP< const Teuchos::Comm< int > > & Tpetra::CrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node, LocalMatVec, LocalMatSolve >::getComm (  )  const [virtual]

Returns the communicator.

Implements Tpetra::RowMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >.

template<class Scalar, class LocalOrdinal, class GlobalOrdinal, class Node, class LocalMatVec, class LocalMatSolve>
Teuchos::RCP< Node > Tpetra::CrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node, LocalMatVec, LocalMatSolve >::getNode (  )  const [virtual]

Returns the underlying node.

Implements Tpetra::RowMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >.

template<class Scalar, class LocalOrdinal, class GlobalOrdinal, class Node, class LocalMatVec, class LocalMatSolve>
const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > & Tpetra::CrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node, LocalMatVec, LocalMatSolve >::getRowMap (  )  const [virtual]

Returns the Map that describes the row distribution in this matrix.

Implements Tpetra::RowMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >.

template<class Scalar, class LocalOrdinal, class GlobalOrdinal, class Node, class LocalMatVec, class LocalMatSolve>
const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > & Tpetra::CrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node, LocalMatVec, LocalMatSolve >::getColMap (  )  const [virtual]

Returns the Map that describes the column distribution in this matrix.

Implements Tpetra::RowMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >.

template<class Scalar, class LocalOrdinal, class GlobalOrdinal, class Node, class LocalMatVec, class LocalMatSolve>
Teuchos::RCP< const RowGraph< LocalOrdinal, GlobalOrdinal, Node > > Tpetra::CrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node, LocalMatVec, LocalMatSolve >::getGraph (  )  const [virtual]

Returns the RowGraph associated with this matrix.

Implements Tpetra::RowMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >.

template<class Scalar, class LocalOrdinal, class GlobalOrdinal, class Node, class LocalMatVec, class LocalMatSolve>
Teuchos::RCP< const CrsGraph< LocalOrdinal, GlobalOrdinal > > Tpetra::CrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node, LocalMatVec, LocalMatSolve >::getCrsGraph (  )  const

Returns the CrsGraph associated with this matrix.

template<class Scalar, class LocalOrdinal, class GlobalOrdinal, class Node, class LocalMatVec, class LocalMatSolve>
global_size_t Tpetra::CrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node, LocalMatVec, LocalMatSolve >::getGlobalNumRows (  )  const [virtual]

Returns the number of global rows in this matrix.

Implements Tpetra::RowMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >.

template<class Scalar, class LocalOrdinal, class GlobalOrdinal, class Node, class LocalMatVec, class LocalMatSolve>
global_size_t Tpetra::CrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node, LocalMatVec, LocalMatSolve >::getGlobalNumCols (  )  const [virtual]

Returns the number of global columns in this matrix.

Implements Tpetra::RowMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >.

template<class Scalar, class LocalOrdinal, class GlobalOrdinal, class Node, class LocalMatVec, class LocalMatSolve>
size_t Tpetra::CrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node, LocalMatVec, LocalMatSolve >::getNodeNumRows (  )  const [virtual]

Returns the number of matrix rows owned by the calling image.

Implements Tpetra::RowMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >.

template<class Scalar, class LocalOrdinal, class GlobalOrdinal, class Node, class LocalMatVec, class LocalMatSolve>
size_t Tpetra::CrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node, LocalMatVec, LocalMatSolve >::getNodeNumCols (  )  const [virtual]

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.

Implements Tpetra::RowMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >.

template<class Scalar, class LocalOrdinal, class GlobalOrdinal, class Node, class LocalMatVec, class LocalMatSolve>
GlobalOrdinal Tpetra::CrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node, LocalMatVec, LocalMatSolve >::getIndexBase (  )  const [virtual]

Returns the index base for global indices for this matrix.

Implements Tpetra::RowMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >.

template<class Scalar, class LocalOrdinal, class GlobalOrdinal, class Node, class LocalMatVec, class LocalMatSolve>
global_size_t Tpetra::CrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node, LocalMatVec, LocalMatSolve >::getGlobalNumEntries (  )  const [virtual]

Returns the global number of entries in this matrix.

Implements Tpetra::RowMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >.

template<class Scalar, class LocalOrdinal, class GlobalOrdinal, class Node, class LocalMatVec, class LocalMatSolve>
size_t Tpetra::CrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node, LocalMatVec, LocalMatSolve >::getNodeNumEntries (  )  const [virtual]

Returns the local number of entries in this matrix.

Implements Tpetra::RowMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >.

template<class Scalar, class LocalOrdinal, class GlobalOrdinal, class Node, class LocalMatVec, class LocalMatSolve>
size_t Tpetra::CrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node, LocalMatVec, LocalMatSolve >::getNumEntriesInGlobalRow ( GlobalOrdinal  globalRow  )  const [virtual]

Returns the current number of entries on this node in the specified global row.

Returns Teuchos::OrdinalTraits<size_t>::invalid() if the specified global row does not belong to this graph.

Implements Tpetra::RowMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >.

template<class Scalar, class LocalOrdinal, class GlobalOrdinal, class Node, class LocalMatVec, class LocalMatSolve>
size_t Tpetra::CrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node, LocalMatVec, LocalMatSolve >::getNumEntriesInLocalRow ( LocalOrdinal  localRow  )  const [virtual]

Returns the current number of entries on this node in the specified local row.

Returns Teuchos::OrdinalTraits<size_t>::invalid() if the specified local row is not valid for this graph.

Implements Tpetra::RowMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >.

template<class Scalar, class LocalOrdinal, class GlobalOrdinal, class Node, class LocalMatVec, class LocalMatSolve>
global_size_t Tpetra::CrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node, LocalMatVec, LocalMatSolve >::getGlobalNumDiags (  )  const [virtual]

Returns the number of global diagonal entries, based on global row/column index comparisons.

Implements Tpetra::RowMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >.

template<class Scalar, class LocalOrdinal, class GlobalOrdinal, class Node, class LocalMatVec, class LocalMatSolve>
size_t Tpetra::CrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node, LocalMatVec, LocalMatSolve >::getNodeNumDiags (  )  const [virtual]

Returns the number of local diagonal entries, based on global row/column index comparisons.

Implements Tpetra::RowMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >.

template<class Scalar, class LocalOrdinal, class GlobalOrdinal, class Node, class LocalMatVec, class LocalMatSolve>
size_t Tpetra::CrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node, LocalMatVec, LocalMatSolve >::getGlobalMaxNumRowEntries (  )  const [virtual]

Returns the maximum number of entries across all rows/columns on all nodes.

Implements Tpetra::RowMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >.

template<class Scalar, class LocalOrdinal, class GlobalOrdinal, class Node, class LocalMatVec, class LocalMatSolve>
size_t Tpetra::CrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node, LocalMatVec, LocalMatSolve >::getNodeMaxNumRowEntries (  )  const [virtual]

Returns the maximum number of entries across all rows/columns on this node.

Implements Tpetra::RowMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >.

template<class Scalar, class LocalOrdinal, class GlobalOrdinal, class Node, class LocalMatVec, class LocalMatSolve>
bool Tpetra::CrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node, LocalMatVec, LocalMatSolve >::hasColMap (  )  const [virtual]

Indicates whether this matrix has a well-defined column map.

Implements Tpetra::RowMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >.

template<class Scalar, class LocalOrdinal, class GlobalOrdinal, class Node, class LocalMatVec, class LocalMatSolve>
bool Tpetra::CrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node, LocalMatVec, LocalMatSolve >::isLowerTriangular (  )  const [virtual]

Indicates whether this matrix is lower triangular.

Implements Tpetra::RowMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >.

template<class Scalar, class LocalOrdinal, class GlobalOrdinal, class Node, class LocalMatVec, class LocalMatSolve>
bool Tpetra::CrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node, LocalMatVec, LocalMatSolve >::isUpperTriangular (  )  const [virtual]

Indicates whether this matrix is upper triangular.

Implements Tpetra::RowMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >.

template<class Scalar, class LocalOrdinal, class GlobalOrdinal, class Node, class LocalMatVec, class LocalMatSolve>
bool Tpetra::CrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node, LocalMatVec, LocalMatSolve >::isLocallyIndexed (  )  const [virtual]

If matrix indices are in the local range, this function returns true. Otherwise, this function returns false. */.

Implements Tpetra::RowMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >.

template<class Scalar, class LocalOrdinal, class GlobalOrdinal, class Node, class LocalMatVec, class LocalMatSolve>
bool Tpetra::CrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node, LocalMatVec, LocalMatSolve >::isGloballyIndexed (  )  const [virtual]

If matrix indices are in the global range, this function returns true. Otherwise, this function returns false. */.

Implements Tpetra::RowMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >.

template<class Scalar, class LocalOrdinal, class GlobalOrdinal, class Node, class LocalMatVec, class LocalMatSolve>
bool Tpetra::CrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node, LocalMatVec, LocalMatSolve >::isFillComplete (  )  const [virtual]

Returns true if fillComplete() has been called.

Implements Tpetra::RowMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >.

template<class Scalar, class LocalOrdinal, class GlobalOrdinal, class Node, class LocalMatVec, class LocalMatSolve>
void Tpetra::CrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node, LocalMatVec, LocalMatSolve >::getGlobalRowCopy ( GlobalOrdinal  GlobalRow,
const Teuchos::ArrayView< GlobalOrdinal > &  Indices,
const Teuchos::ArrayView< Scalar > &  Values,
size_t &  NumEntries 
) const [virtual]

Extract a list of entries in a specified global row of this matrix. Put into pre-allocated storage.

Parameters:
LocalRow - (In) Global row number for which indices are desired.
Indices - (Out) Global column indices corresponding to values.
Values - (Out) Matrix values.
NumEntries - (Out) Number of indices.
Note: A std::runtime_error exception is thrown if either Indices or Values is not large enough to hold the data associated with row GlobalRow. If GlobalRow does not belong to this node, then Indices and Values are unchanged and NumIndices is returned as Teuchos::OrdinalTraits<size_t>::invalid().

Implements Tpetra::RowMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >.

template<class Scalar, class LocalOrdinal, class GlobalOrdinal, class Node, class LocalMatVec, class LocalMatSolve>
void Tpetra::CrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node, LocalMatVec, LocalMatSolve >::getLocalRowCopy ( LocalOrdinal  LocalRow,
const Teuchos::ArrayView< LocalOrdinal > &  Indices,
const Teuchos::ArrayView< Scalar > &  Values,
size_t &  NumEntries 
) const [virtual]

Extract a list of entries in a specified local row of the graph. Put into storage allocated by calling routine.

Parameters:
LocalRow - (In) Local row number for which indices are desired.
Indices - (Out) Local column indices corresponding to values.
Values - (Out) Matrix values.
NumIndices - (Out) Number of indices.
Note: A std::runtime_error exception is thrown if either Indices or Values is not large enough to hold the data associated with row LocalRow. If LocalRow is not valid for this node, then Indices and Values are unchanged and NumIndices is returned as Teuchos::OrdinalTraits<size_t>::invalid().

Implements Tpetra::RowMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >.

template<class Scalar, class LocalOrdinal, class GlobalOrdinal, class Node, class LocalMatVec, class LocalMatSolve>
void Tpetra::CrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node, LocalMatVec, LocalMatSolve >::getGlobalRowView ( GlobalOrdinal  GlobalRow,
Teuchos::ArrayRCP< const GlobalOrdinal > &  indices,
Teuchos::ArrayRCP< const Scalar > &  values 
) const [virtual]

Get a persisting const view of the entries in a specified global row of this matrix.

Parameters:
GlobalRow - (In) Global row from which to retrieve matrix entries.
Indices - (Out) Indices for the global row.
Values - (Out) Values for the global row.
Note: If GlobalRow does not belong to this node, then Indices and Values are set to Teuchos::null</t>>.

Precondition:
isLocallyIndexed()==false

Implements Tpetra::RowMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >.

template<class Scalar, class LocalOrdinal, class GlobalOrdinal, class Node, class LocalMatVec, class LocalMatSolve>
void Tpetra::CrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node, LocalMatVec, LocalMatSolve >::getLocalRowView ( LocalOrdinal  LocalRow,
Teuchos::ArrayRCP< const LocalOrdinal > &  indices,
Teuchos::ArrayRCP< const Scalar > &  values 
) const [virtual]

Get a persisting const view of the entries in a specified local row of this matrix.

Parameters:
LocalRow - (In) Local row from which to retrieve matrix entries.
Indices - (Out) Indices for the local row.
Values - (Out) Values for the local row.
Note: If LocalRow is not valid for this node, then Indices and Values are set to Teuchos::null.

Precondition:
isGloballyIndexed()==false

Implements Tpetra::RowMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >.

template<class Scalar, class LocalOrdinal, class GlobalOrdinal, class Node, class LocalMatVec, class LocalMatSolve>
void Tpetra::CrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node, LocalMatVec, LocalMatSolve >::getLocalDiagCopy ( Vector< Scalar, LocalOrdinal, GlobalOrdinal > &  diag  )  const [virtual]

Get a copy of the diagonal entries owned by this node, with local row idices.

Returns a distributed Vector object partitioned according to this matrix's row map, containing the the zero and non-zero diagonals owned by this node.

Implements Tpetra::RowMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >.

template<class Scalar, class LocalOrdinal, class GlobalOrdinal, class Node, class LocalMatVec, class LocalMatSolve>
template<class DomainScalar, class RangeScalar>
void Tpetra::CrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node, LocalMatVec, LocalMatSolve >::multiply ( const MultiVector< DomainScalar, LocalOrdinal, GlobalOrdinal, Node > &  X,
MultiVector< RangeScalar, LocalOrdinal, GlobalOrdinal, Node > &  Y,
Teuchos::ETransp  trans 
) const

Multiplies this matrix by a MultiVector.

template<class Scalar, class LocalOrdinal, class GlobalOrdinal, class Node, class LocalMatVec, class LocalMatSolve>
template<class DomainScalar, class RangeScalar>
void Tpetra::CrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node, LocalMatVec, LocalMatSolve >::solve ( const MultiVector< RangeScalar, LocalOrdinal, GlobalOrdinal, Node > &  Y,
MultiVector< DomainScalar, LocalOrdinal, GlobalOrdinal, Node > &  X,
Teuchos::ETransp  trans 
) const

Solves a linear system when the underlying matrix is triangular.

template<class Scalar, class LocalOrdinal, class GlobalOrdinal, class Node, class LocalMatVec, class LocalMatSolve>
const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > & Tpetra::CrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node, LocalMatVec, LocalMatSolve >::getDomainMap (  )  const [virtual]

Returns the Map associated with the domain of this operator. This will be Teuchos::null until fillComplete() is called.

Implements Tpetra::Operator< Scalar, LocalOrdinal, GlobalOrdinal, Node >.

template<class Scalar, class LocalOrdinal, class GlobalOrdinal, class Node, class LocalMatVec, class LocalMatSolve>
const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > & Tpetra::CrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node, LocalMatVec, LocalMatSolve >::getRangeMap (  )  const [virtual]

Returns the Map associated with the domain of this operator. This will be Teuchos::null until fillComplete() is called.

Implements Tpetra::Operator< Scalar, LocalOrdinal, GlobalOrdinal, Node >.

template<class Scalar, class LocalOrdinal, class GlobalOrdinal, class Node, class LocalMatVec, class LocalMatSolve>
void Tpetra::CrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node, LocalMatVec, LocalMatSolve >::apply ( const MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &  X,
MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &  Y,
Teuchos::ETransp  mode = Teuchos::NO_TRANS 
) const [virtual]

Computes this matrix-vector multilication y = A x.

Implements Tpetra::Operator< Scalar, LocalOrdinal, GlobalOrdinal, Node >.

template<class Scalar, class LocalOrdinal, class GlobalOrdinal, class Node, class LocalMatVec, class LocalMatSolve>
bool Tpetra::CrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node, LocalMatVec, LocalMatSolve >::hasTransposeApply (  )  const [virtual]

Indicates whether this operator supports applying the adjoint operator.

Reimplemented from Tpetra::Operator< Scalar, LocalOrdinal, GlobalOrdinal, Node >.

template<class Scalar, class LocalOrdinal, class GlobalOrdinal, class Node, class LocalMatVec, class LocalMatSolve>
void Tpetra::CrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node, LocalMatVec, LocalMatSolve >::applyInverse ( const MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &  X,
MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &  Y,
Teuchos::ETransp  mode = Teuchos::NO_TRANS 
) const [virtual]

Computes this matrix-vector multilication y = A x.

Implements Tpetra::InverseOperator< Scalar, LocalOrdinal, GlobalOrdinal, Node >.

template<class Scalar, class LocalOrdinal, class GlobalOrdinal, class Node, class LocalMatVec, class LocalMatSolve>
bool Tpetra::CrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node, LocalMatVec, LocalMatSolve >::hasTransposeApplyInverse (  )  const [virtual]

Indicates whether this operator supports inverting the adjoint operator.

Reimplemented from Tpetra::InverseOperator< Scalar, LocalOrdinal, GlobalOrdinal, Node >.

template<class Scalar, class LocalOrdinal, class GlobalOrdinal, class Node, class LocalMatVec, class LocalMatSolve>
bool Tpetra::CrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node, LocalMatVec, LocalMatSolve >::isStorageOptimized (  )  const

Returns true if optimizeStorage() has been called.

template<class Scalar, class LocalOrdinal, class GlobalOrdinal, class Node, class LocalMatVec, class LocalMatSolve>
ProfileType Tpetra::CrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node, LocalMatVec, LocalMatSolve >::getProfileType (  )  const

Returns true if the graph data was allocated in static data structures.

template<class Scalar, class LocalOrdinal, class GlobalOrdinal, class Node, class LocalMatVec, class LocalMatSolve>
bool Tpetra::CrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node, LocalMatVec, LocalMatSolve >::isStaticGraph (  )  const

Indicates that the graph is static, so that new entries cannot be added to this matrix. */.

template<class Scalar, class LocalOrdinal, class GlobalOrdinal, class Node, class LocalMatVec, class LocalMatSolve>
std::string Tpetra::CrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node, LocalMatVec, LocalMatSolve >::description (  )  const [virtual]

Return a simple one-line description of this object.

Reimplemented from Teuchos::Describable.

template<class Scalar, class LocalOrdinal, class GlobalOrdinal, class Node, class LocalMatVec, class LocalMatSolve>
void Tpetra::CrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node, LocalMatVec, LocalMatSolve >::describe ( Teuchos::FancyOStream out,
const Teuchos::EVerbosityLevel  verbLevel = Teuchos::Describable::verbLevel_default 
) const [virtual]

Print the object with some verbosity level to an FancyOStream object.

Reimplemented from Teuchos::Describable.

template<class Scalar, class LocalOrdinal, class GlobalOrdinal, class Node, class LocalMatVec, class LocalMatSolve>
Teuchos::ArrayRCP< const Scalar > Tpetra::CrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node, LocalMatVec, LocalMatSolve >::getFullView ( size_t  myRow,
RowInfo  sizeInfo 
) const [protected]

Get a persisting const view of the elements in a specified local row of the matrix.

This protected method is used internally for almost all access to the matrix elements. No checking is done except in a debug build.

Parameters:
myRow - (In) size_t specifying the local row.
sizeInfo - (In) Size info from CrsGraph::getRowInfo()
Returns:
values - (Out) persisting, const view of the local values.

template<class Scalar, class LocalOrdinal, class GlobalOrdinal, class Node, class LocalMatVec, class LocalMatSolve>
Teuchos::ArrayRCP< Scalar > Tpetra::CrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node, LocalMatVec, LocalMatSolve >::getFullViewNonConst ( size_t  myRow,
RowInfo  sizeInfo 
) [protected]

Get a persisting non-const view of the elements in a specified local row of the matrix.

This protected method is used internally for almost all access to the matrix elements. No checking is done except in a debug build.

Parameters:
myRow - (In) size_t specifying the local row.
sizeInfo - (In) Size info from CrsGraph::getRowInfo()
Returns:
values - (Out) persisting, non-const view of the local values.


The documentation for this class was generated from the following file:
Generated on Wed May 12 21:40:14 2010 for Tpetra Matrix/Vector Services by  doxygen 1.4.7