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

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

#include <Tpetra_CrsMatrix_decl.hpp>

Inheritance diagram for Tpetra::CrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node, LocalMatOps >:
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< const CrsGraph< LocalOrdinal, GlobalOrdinal, Node > > &graph)
 Constructor specifying a pre-constructed graph.
virtual ~CrsMatrix ()
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 replaceLocalValues (LocalOrdinal localRow, const Teuchos::ArrayView< const LocalOrdinal > &cols, const Teuchos::ArrayView< const Scalar > &vals)
 Replace matrix entries, using local 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.
void resumeFill ()
 Return the matrix to pre-fill-complete status, allowing new entries to be added.
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,
Node > > 
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 and the matrix is in compute mode.
bool isFillResumed () const
 Returns true if resumeFill() has been called and the matrix is in edit mode.
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, Node > &diag) const
 Get a copy of the diagonal entries owned by this node, with local row idices.
Advanced 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, RangeScalar alpha, RangeScalar beta) 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

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
 Computes the sparse matrix-multivector multiplication.
bool hasTransposeApply () const
 Indicates whether this operator supports applying the adjoint 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
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.
Methods implementing Tpetra::DistObject

bool checkSizes (const DistObject< char, LocalOrdinal, GlobalOrdinal, Node > &source)
 Allows the source and target (this) objects to be compared for compatibility.
void copyAndPermute (const DistObject< char, LocalOrdinal, GlobalOrdinal, Node > &source, size_t numSameIDs, const Teuchos::ArrayView< const LocalOrdinal > &permuteToLIDs, const Teuchos::ArrayView< const LocalOrdinal > &permuteFromLIDs)
 Perform copies and permutations that are local to this image.
void packAndPrepare (const DistObject< char, LocalOrdinal, GlobalOrdinal, Node > &source, const Teuchos::ArrayView< const LocalOrdinal > &exportLIDs, Teuchos::Array< char > &exports, const Teuchos::ArrayView< size_t > &numPacketsPerLID, size_t &constantNumPackets, Distributor &distor)
 Perform any packing or preparation required for communication.
void unpackAndCombine (const Teuchos::ArrayView< const LocalOrdinal > &importLIDs, const Teuchos::ArrayView< const char > &imports, const Teuchos::ArrayView< size_t > &numPacketsPerLID, size_t constantNumPackets, Distributor &distor, CombineMode CM)
 Perform any unpacking and combining after communication.
void createViews () const
void createViewsNonConst (Kokkos::ReadWriteOption rwo)
void releaseViews () const

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 LocalMatOps = typename Kokkos::DefaultKernels<Scalar,LocalOrdinal,Node>::SparseOps>
class Tpetra::CrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node, LocalMatOps >

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.

Definition at line 75 of file Tpetra_CrsMatrix_decl.hpp.


Constructor & Destructor Documentation

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

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

Definition at line 62 of file Tpetra_CrsMatrix_def.hpp.

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

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

Definition at line 89 of file Tpetra_CrsMatrix_def.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node , class LocalMatOps >
Tpetra::CrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node, LocalMatOps >::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 
) [inline]

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

Definition at line 116 of file Tpetra_CrsMatrix_def.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node , class LocalMatOps >
Tpetra::CrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node, LocalMatOps >::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 
) [inline]

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

Definition at line 144 of file Tpetra_CrsMatrix_def.hpp.

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

Constructor specifying a pre-constructed graph.

Definition at line 172 of file Tpetra_CrsMatrix_def.hpp.


Member Function Documentation

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node , class LocalMatOps >
void Tpetra::CrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node, LocalMatOps >::insertGlobalValues ( GlobalOrdinal  globalRow,
const Teuchos::ArrayView< const GlobalOrdinal > &  cols,
const Teuchos::ArrayView< const Scalar > &  vals 
) [inline]

Submit matrix entries, using global IDs.

Definition at line 782 of file Tpetra_CrsMatrix_def.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node , class LocalMatOps >
void Tpetra::CrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node, LocalMatOps >::insertLocalValues ( LocalOrdinal  localRow,
const Teuchos::ArrayView< const LocalOrdinal > &  cols,
const Teuchos::ArrayView< const Scalar > &  vals 
) [inline]

Submit matrix entries, using local IDs.

Definition at line 710 of file Tpetra_CrsMatrix_def.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node , class LocalMatOps >
void Tpetra::CrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node, LocalMatOps >::replaceGlobalValues ( GlobalOrdinal  globalRow,
const Teuchos::ArrayView< const GlobalOrdinal > &  cols,
const Teuchos::ArrayView< const Scalar > &  vals 
) [inline]

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.

Definition at line 867 of file Tpetra_CrsMatrix_def.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node , class LocalMatOps >
void Tpetra::CrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node, LocalMatOps >::replaceLocalValues ( LocalOrdinal  localRow,
const Teuchos::ArrayView< const LocalOrdinal > &  cols,
const Teuchos::ArrayView< const Scalar > &  vals 
) [inline]

Replace matrix entries, using local IDs.

All index values must be in the local space.

Definition at line 926 of file Tpetra_CrsMatrix_def.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node , class LocalMatOps >
void Tpetra::CrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node, LocalMatOps >::sumIntoGlobalValues ( GlobalOrdinal  globalRow,
const Teuchos::ArrayView< const GlobalOrdinal > &  cols,
const Teuchos::ArrayView< const Scalar > &  vals 
) [inline]

Sum into multiple entries, using global IDs.

All index values must be in the global space.

Definition at line 987 of file Tpetra_CrsMatrix_def.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node , class LocalMatOps >
void Tpetra::CrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node, LocalMatOps >::setAllToScalar ( const Scalar &  alpha  )  [inline]

Set all matrix entries equal to scalarThis.

Definition at line 1261 of file Tpetra_CrsMatrix_def.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node , class LocalMatOps >
void Tpetra::CrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node, LocalMatOps >::scale ( const Scalar &  alpha  )  [inline]

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

Definition at line 1220 of file Tpetra_CrsMatrix_def.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node , class LocalMatOps >
void Tpetra::CrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node, LocalMatOps >::globalAssemble (  )  [inline]

Communicate non-local contributions to other nodes.

Definition at line 1351 of file Tpetra_CrsMatrix_def.hpp.

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

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.

Definition at line 1596 of file Tpetra_CrsMatrix_def.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node , class LocalMatOps >
void Tpetra::CrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node, LocalMatOps >::fillComplete ( OptimizeOption  os = DoOptimizeStorage  )  [inline]

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() ).

Definition at line 1588 of file Tpetra_CrsMatrix_def.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node , class LocalMatOps >
void Tpetra::CrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node, LocalMatOps >::optimizeStorage (  )  [inline]

Re-allocate the data into contiguous storage.

Definition at line 1730 of file Tpetra_CrsMatrix_def.hpp.

template<class Scalar, class LocalOrdinal = int, class GlobalOrdinal = LocalOrdinal, class Node = Kokkos::DefaultNode::DefaultNodeType, class LocalMatOps = typename Kokkos::DefaultKernels<Scalar,LocalOrdinal,Node>::SparseOps>
void Tpetra::CrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node, LocalMatOps >::resumeFill (  ) 

Return the matrix to pre-fill-complete status, allowing new entries to be added.

This places the matrix in edit mode.

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

Returns the communicator.

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

Definition at line 207 of file Tpetra_CrsMatrix_def.hpp.

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

Returns the underlying node.

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

Definition at line 214 of file Tpetra_CrsMatrix_def.hpp.

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

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

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

Definition at line 341 of file Tpetra_CrsMatrix_def.hpp.

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

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

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

Definition at line 348 of file Tpetra_CrsMatrix_def.hpp.

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

Returns the RowGraph associated with this matrix.

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

Definition at line 369 of file Tpetra_CrsMatrix_def.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node , class LocalMatOps >
Teuchos::RCP< const CrsGraph< LocalOrdinal, GlobalOrdinal, Node > > Tpetra::CrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node, LocalMatOps >::getCrsGraph (  )  const [inline]

Returns the CrsGraph associated with this matrix.

Definition at line 377 of file Tpetra_CrsMatrix_def.hpp.

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

Returns the number of global rows in this matrix.

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

Definition at line 274 of file Tpetra_CrsMatrix_def.hpp.

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

Returns the number of global columns in this matrix.

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

Definition at line 280 of file Tpetra_CrsMatrix_def.hpp.

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

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

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

Definition at line 286 of file Tpetra_CrsMatrix_def.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node , class LocalMatOps >
size_t Tpetra::CrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node, LocalMatOps >::getNodeNumCols (  )  const [inline, 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 >.

Definition at line 292 of file Tpetra_CrsMatrix_def.hpp.

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

Returns the index base for global indices for this matrix.

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

Definition at line 334 of file Tpetra_CrsMatrix_def.hpp.

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

Returns the global number of entries in this matrix.

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

Definition at line 262 of file Tpetra_CrsMatrix_def.hpp.

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

Returns the local number of entries in this matrix.

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

Definition at line 268 of file Tpetra_CrsMatrix_def.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node , class LocalMatOps >
size_t Tpetra::CrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node, LocalMatOps >::getNumEntriesInGlobalRow ( GlobalOrdinal  globalRow  )  const [inline, 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 >.

Definition at line 310 of file Tpetra_CrsMatrix_def.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node , class LocalMatOps >
size_t Tpetra::CrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node, LocalMatOps >::getNumEntriesInLocalRow ( LocalOrdinal  localRow  )  const [inline, 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 >.

Definition at line 316 of file Tpetra_CrsMatrix_def.hpp.

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

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

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

Definition at line 298 of file Tpetra_CrsMatrix_def.hpp.

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

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

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

Definition at line 304 of file Tpetra_CrsMatrix_def.hpp.

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

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

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

Definition at line 322 of file Tpetra_CrsMatrix_def.hpp.

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

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

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

Definition at line 328 of file Tpetra_CrsMatrix_def.hpp.

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

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

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

Definition at line 256 of file Tpetra_CrsMatrix_def.hpp.

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

Indicates whether this matrix is lower triangular.

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

Definition at line 384 of file Tpetra_CrsMatrix_def.hpp.

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

Indicates whether this matrix is upper triangular.

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

Definition at line 390 of file Tpetra_CrsMatrix_def.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node , class LocalMatOps >
bool Tpetra::CrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node, LocalMatOps >::isLocallyIndexed (  )  const [inline, 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 >.

Definition at line 244 of file Tpetra_CrsMatrix_def.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node , class LocalMatOps >
bool Tpetra::CrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node, LocalMatOps >::isGloballyIndexed (  )  const [inline, 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 >.

Definition at line 250 of file Tpetra_CrsMatrix_def.hpp.

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

Returns true if fillComplete() has been called and the matrix is in compute mode.

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

Definition at line 226 of file Tpetra_CrsMatrix_def.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node , class LocalMatOps >
bool Tpetra::CrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node, LocalMatOps >::isFillResumed (  )  const [inline]

Returns true if resumeFill() has been called and the matrix is in edit mode.

Definition at line 232 of file Tpetra_CrsMatrix_def.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node , class LocalMatOps >
void Tpetra::CrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node, LocalMatOps >::getGlobalRowCopy ( GlobalOrdinal  GlobalRow,
const Teuchos::ArrayView< GlobalOrdinal > &  Indices,
const Teuchos::ArrayView< Scalar > &  Values,
size_t &  NumEntries 
) const [inline, 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 >.

Definition at line 1102 of file Tpetra_CrsMatrix_def.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node , class LocalMatOps >
void Tpetra::CrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node, LocalMatOps >::getLocalRowCopy ( LocalOrdinal  LocalRow,
const Teuchos::ArrayView< LocalOrdinal > &  Indices,
const Teuchos::ArrayView< Scalar > &  Values,
size_t &  NumEntries 
) const [inline, 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 >.

Definition at line 1045 of file Tpetra_CrsMatrix_def.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node , class LocalMatOps >
void Tpetra::CrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node, LocalMatOps >::getGlobalRowView ( GlobalOrdinal  GlobalRow,
Teuchos::ArrayRCP< const GlobalOrdinal > &  indices,
Teuchos::ArrayRCP< const Scalar > &  values 
) const [inline, 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 >.

Definition at line 1159 of file Tpetra_CrsMatrix_def.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node , class LocalMatOps >
void Tpetra::CrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node, LocalMatOps >::getLocalRowView ( LocalOrdinal  LocalRow,
Teuchos::ArrayRCP< const LocalOrdinal > &  indices,
Teuchos::ArrayRCP< const Scalar > &  values 
) const [inline, 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 >.

Definition at line 1190 of file Tpetra_CrsMatrix_def.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node , class LocalMatOps >
void Tpetra::CrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node, LocalMatOps >::getLocalDiagCopy ( Vector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &  diag  )  const [inline, 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 >.

Definition at line 1306 of file Tpetra_CrsMatrix_def.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node , class LocalMatOps >
template<class DomainScalar , class RangeScalar >
void Tpetra::CrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node, LocalMatOps >::multiply ( const MultiVector< DomainScalar, LocalOrdinal, GlobalOrdinal, Node > &  X,
MultiVector< RangeScalar, LocalOrdinal, GlobalOrdinal, Node > &  Y,
Teuchos::ETransp  trans,
RangeScalar  alpha,
RangeScalar  beta 
) const [inline]

Multiplies this matrix by a MultiVector.

X is required to be post-imported, i.e., described by the column map of the matrix. Y is required to be pre-exported, i.e., described by the row map of the matrix.

Both are required to have constant stride, and they are not permitted to ocupy overlapping space. No runtime checking will be performed in a non-debug build.

If beta is equal to zero, the operation will enjoy overwrite semantics (Y will be overwritten with the result of the multiplication). Otherwise, the result of the multiplication will be accumulated into Y.

Definition at line 1831 of file Tpetra_CrsMatrix_def.hpp.

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

Solves a linear system when the underlying matrix is triangular.

X is required to be post-imported, i.e., described by the column map of the matrix. Y is required to be pre-exported, i.e., described by the row map of the matrix.

Both are required to have constant stride. However, unlike multiply(), it is permissible for &X == &Y. No runtime checking will be performed in a non-debug build.

If beta is equal to zero, the operation will enjoy overwrite semantics (Y will be overwritten with the result of the multiplication). Otherwise, the result of the multiplication will be accumulated into Y.

Definition at line 1865 of file Tpetra_CrsMatrix_def.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node , class LocalMatOps >
void Tpetra::CrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node, LocalMatOps >::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 [inline, virtual]

Computes the sparse matrix-multivector multiplication.

Performs $Y = \alpha A^{\textrm{mode}} X + \beta Y$, with one special exceptions:

  • if beta == 0, apply() overwrites Y, so that any values in Y (including NaNs) are ignored.

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

Definition at line 1817 of file Tpetra_CrsMatrix_def.hpp.

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

Indicates whether this operator supports applying the adjoint operator.

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

Definition at line 402 of file Tpetra_CrsMatrix_def.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node , class LocalMatOps >
const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > & Tpetra::CrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node, LocalMatOps >::getDomainMap (  )  const [inline, 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 >.

Definition at line 355 of file Tpetra_CrsMatrix_def.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node , class LocalMatOps >
const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > & Tpetra::CrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node, LocalMatOps >::getRangeMap (  )  const [inline, 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 >.

Definition at line 362 of file Tpetra_CrsMatrix_def.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node , class LocalMatOps >
bool Tpetra::CrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node, LocalMatOps >::isStorageOptimized (  )  const [inline]

Returns true if optimizeStorage() has been called.

Definition at line 238 of file Tpetra_CrsMatrix_def.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node , class LocalMatOps >
ProfileType Tpetra::CrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node, LocalMatOps >::getProfileType (  )  const [inline]

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

Definition at line 220 of file Tpetra_CrsMatrix_def.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node , class LocalMatOps >
bool Tpetra::CrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node, LocalMatOps >::isStaticGraph (  )  const [inline]

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

Definition at line 396 of file Tpetra_CrsMatrix_def.hpp.

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

Return a simple one-line description of this object.

Reimplemented from Teuchos::Describable.

Definition at line 1908 of file Tpetra_CrsMatrix_def.hpp.

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

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

Reimplemented from Teuchos::Describable.

Definition at line 1930 of file Tpetra_CrsMatrix_def.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node , class LocalMatOps >
bool Tpetra::CrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node, LocalMatOps >::checkSizes ( const DistObject< char, LocalOrdinal, GlobalOrdinal, Node > &  source  )  [inline, virtual]

Allows the source and target (this) objects to be compared for compatibility.

Return true if they are compatible, return false if they aren't.

Implements Tpetra::DistObject< char, LocalOrdinal, GlobalOrdinal, Node >.

Definition at line 2081 of file Tpetra_CrsMatrix_def.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node , class LocalMatOps >
void Tpetra::CrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node, LocalMatOps >::copyAndPermute ( const DistObject< char, LocalOrdinal, GlobalOrdinal, Node > &  source,
size_t  numSameIDs,
const Teuchos::ArrayView< const LocalOrdinal > &  permuteToLIDs,
const Teuchos::ArrayView< const LocalOrdinal > &  permuteFromLIDs 
) [inline, virtual]

Perform copies and permutations that are local to this image.

Parameters:
source In On entry, the DistObject that we are importing from.
numSameIDs In On entry, the number of elements that are the same on the source and dest objects. (i.e. The element is owned by the same image in both source and dest, and no permutation occurs.)
numPermuteIDs In On entry, the number of elements that are locally permuted between source and dest objects.
permuteToLIDs In On entry, contains a list of the elements that are permuted. (Listed by their LID in the destination DistObject.)
permuteFromLIDs In On entry, contains a list of the elements that are permuted. (Listed by their LID in the source DistObject.)

Implements Tpetra::DistObject< char, LocalOrdinal, GlobalOrdinal, Node >.

Definition at line 2102 of file Tpetra_CrsMatrix_def.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node , class LocalMatOps >
void Tpetra::CrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node, LocalMatOps >::packAndPrepare ( const DistObject< char, LocalOrdinal, GlobalOrdinal, Node > &  source,
const Teuchos::ArrayView< const LocalOrdinal > &  exportLIDs,
Teuchos::Array< char > &  exports,
const Teuchos::ArrayView< size_t > &  numPacketsPerLID,
size_t &  constantNumPackets,
Distributor distor 
) [inline, virtual]

Perform any packing or preparation required for communication.

Parameters:
source In On entry, the DistObject that we are importing from.
exportLIDs In On entry, a list of the entries we will be sending to other images. (Listed by their LID in the source DistObject.)
exports Out On exit, buffer for data we will be sending out.
numPacketsPerLID Out On exit, numPacketsPerLID[i] contains the number of packets to be exported for exportLIDs[i].
constantNumPackets Out On exit, 0 if numPacketsPerLID has variable contents (different size for each LID). If nonzero, then it is expected that num-packets-per-LID is constant, and constantNumPackets holds that value.
distor In On entry, contains the Distributor object we are using.

Implements Tpetra::DistObject< char, LocalOrdinal, GlobalOrdinal, Node >.

Definition at line 2173 of file Tpetra_CrsMatrix_def.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node , class LocalMatOps >
void Tpetra::CrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node, LocalMatOps >::unpackAndCombine ( const Teuchos::ArrayView< const LocalOrdinal > &  importLIDs,
const Teuchos::ArrayView< const char > &  imports,
const Teuchos::ArrayView< size_t > &  numPacketsPerLID,
size_t  constantNumPackets,
Distributor distor,
CombineMode  CM 
) [inline, virtual]

Perform any unpacking and combining after communication.

Parameters:
importLIDs In On entry, a list of the entries we received from other images. (Listed by their LID in the target DistObject.)
imports In Buffer containing data we received.
numPacketsPerLID In numPacketsPerLID[i] contains the number of packets imported for importLIDs[i].
constantNumPackets In If nonzero, then numPacketsPerLID is constant (same value in all entries) and constantNumPackets is that value.
distor In The Distributor object we are using.
CM In The Tpetra::CombineMode to use when combining the imported entries with existing entries.

Implements Tpetra::DistObject< char, LocalOrdinal, GlobalOrdinal, Node >.

Definition at line 2270 of file Tpetra_CrsMatrix_def.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node , class LocalMatOps >
Teuchos::ArrayRCP< const Scalar > Tpetra::CrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node, LocalMatOps >::getFullView ( size_t  myRow,
RowInfo  sizeInfo 
) const [inline, 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.

Definition at line 563 of file Tpetra_CrsMatrix_def.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node , class LocalMatOps >
Teuchos::ArrayRCP< Scalar > Tpetra::CrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node, LocalMatOps >::getFullViewNonConst ( size_t  myRow,
RowInfo  sizeInfo 
) [inline, 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.

Definition at line 592 of file Tpetra_CrsMatrix_def.hpp.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Generated on Wed Apr 13 10:21:41 2011 for Tpetra Matrix/Vector Services by  doxygen 1.6.3