Tpetra::CrsGraph< LocalOrdinal, GlobalOrdinal, Node > Class Template Reference

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

#include <Tpetra_CrsGraph_decl.hpp>

Inheritance diagram for Tpetra::CrsGraph< LocalOrdinal, GlobalOrdinal, Node >:
Inheritance graph
[legend]

List of all members.

Public Member Functions

Constructor/Destructor Methods

 CrsGraph (const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &rowMap, size_t maxNumEntriesPerRow, ProfileType pftype=DynamicProfile)
 Constructor with fixed number of indices per row.
 CrsGraph (const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &rowMap, const Teuchos::ArrayRCP< const size_t > &NumEntriesPerRowToAlloc, ProfileType pftype=DynamicProfile)
 Constructor with variable number of indices per row.
 CrsGraph (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 with fixed number of indices per row and specified column map.
 CrsGraph (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 with variable number of indices per row and specified column map.
virtual ~CrsGraph ()
Insertion/Removal Methods

void insertGlobalIndices (GlobalOrdinal row, const Teuchos::ArrayView< const GlobalOrdinal > &indices)
 Submit graph indices, using global IDs.
void insertLocalIndices (LocalOrdinal row, const Teuchos::ArrayView< const LocalOrdinal > &indices)
 Submit graph indices, using local IDs.
void removeLocalIndices (LocalOrdinal row)
 Remove graph indices from local row.
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 RowGraph.

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 graph.
const Teuchos::RCP< const Map
< LocalOrdinal, GlobalOrdinal,
Node > > & 
getColMap () const
 Returns the Map that describes the column distribution in this graph.
const Teuchos::RCP< const Map
< LocalOrdinal, GlobalOrdinal,
Node > > & 
getDomainMap () const
 Returns the Map associated with the domain of this graph.
const Teuchos::RCP< const Map
< LocalOrdinal, GlobalOrdinal,
Node > > & 
getRangeMap () const
 Returns the Map associated with the domain of this graph.
Teuchos::RCP< const Import
< LocalOrdinal, GlobalOrdinal,
Node > > 
getImporter () const
 Returns the importer associated with this graph.
Teuchos::RCP< const Export
< LocalOrdinal, GlobalOrdinal,
Node > > 
getExporter () const
 Returns the exporter associated with this graph.
global_size_t getGlobalNumRows () const
 Returns the number of global rows in the graph.
global_size_t getGlobalNumCols () const
 Returns the number of global columns in the graph.
size_t getNodeNumRows () const
 Returns the number of rows owned on the calling node.
size_t getNodeNumCols () const
 Returns the number of columns connected to the locally owned rows of this graph.
GlobalOrdinal getIndexBase () const
 Returns the index base for global indices for this graph.
global_size_t getGlobalNumEntries () const
 Returns the global number of entries in the graph.
size_t getNodeNumEntries () const
 Returns the local number of entries in the graph.
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.
size_t getNodeAllocationSize () const
 Returns the total number of indices allocated for the graph, across all rows on this node.
size_t getNumAllocatedEntriesInGlobalRow (GlobalOrdinal globalRow) const
 Returns the current number of allocated entries for this node in the specified global row .
size_t getNumAllocatedEntriesInLocalRow (LocalOrdinal localRow) const
 Returns the current number of allocated 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 the matrix has a well-defined column map.
bool isLowerTriangular () const
 Indicates whether the graph is lower triangular.
bool isUpperTriangular () const
 Indicates whether the graph is upper triangular.
bool isLocallyIndexed () const
 If graph indices are in the local range, this function returns true. Otherwise, this function returns false. */.
bool isGloballyIndexed () const
 If graph 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, size_t &NumIndices) const
 Extract a list of elements in a specified global row of the graph. Put into pre-allocated storage.
void getLocalRowCopy (LocalOrdinal LocalRow, const Teuchos::ArrayView< LocalOrdinal > &indices, size_t &NumIndices) const
 Extract a list of elements in a specified local row of the graph. Put into storage allocated by calling routine.
Teuchos::ArrayRCP< const
GlobalOrdinal > 
getGlobalRowView (GlobalOrdinal GlobalRow) const
 Get a persisting const view of the elements in a specified global row of the graph.
Teuchos::ArrayRCP< const
LocalOrdinal > 
getLocalRowView (LocalOrdinal LocalRow) const
 Get a persisting const view of the elements in a specified local row of the graph.
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.
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< GlobalOrdinal, LocalOrdinal, GlobalOrdinal, Node > &source)
 Allows the source and target (this) objects to be compared for compatibility.
void copyAndPermute (const DistObject< GlobalOrdinal, 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< GlobalOrdinal, LocalOrdinal, GlobalOrdinal, Node > &source, const Teuchos::ArrayView< const LocalOrdinal > &exportLIDs, Teuchos::Array< GlobalOrdinal > &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 GlobalOrdinal > &imports, const Teuchos::ArrayView< size_t > &numPacketsPerLID, size_t constantNumPackets, Distributor &distor, CombineMode CM)
 Perform any unpacking and combining after communication.

Protected Member Functions

RowInfo getRowInfo (size_t myRow) const
 Get the sizes associated with the allocated rows.
RowInfo getFullLocalView (size_t myRow, Teuchos::ArrayRCP< const LocalOrdinal > &indices) const
 Get a persisting const view of the elements in a specified local row of the graph, along with other details.
RowInfo getFullLocalViewNonConst (size_t myRow, Teuchos::ArrayRCP< LocalOrdinal > &indices)
 Get a persisting non-const view of the elements in a specified local row of the graph, along with other details.
RowInfo getFullGlobalView (size_t myRow, Teuchos::ArrayRCP< const GlobalOrdinal > &indices) const
 Get a persisting const view of the elements in a specified global row of the graph, along with other details.
RowInfo getFullGlobalViewNonConst (size_t myRow, Teuchos::ArrayRCP< GlobalOrdinal > &indices)
 Get a persisting non-const view of the elements in a specified local row of the graph, along with other details.

Detailed Description

template<class LocalOrdinal, class GlobalOrdinal = LocalOrdinal, class Node = Kokkos::DefaultNode::DefaultNodeType>
class Tpetra::CrsGraph< LocalOrdinal, GlobalOrdinal, Node >

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

This class is templated on LocalOrdinal and GlobalOrdinal. If the GlobalOrdinal is not specified, then it takes the same type as the LocalOrdinal.

Definition at line 67 of file Tpetra_CrsGraph_decl.hpp.


Constructor & Destructor Documentation

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

Constructor with fixed number of indices per row.

Definition at line 42 of file Tpetra_CrsGraph_def.hpp.

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

Constructor with variable number of indices per row.

Definition at line 101 of file Tpetra_CrsGraph_def.hpp.

template<class LocalOrdinal , class GlobalOrdinal , class Node >
Tpetra::CrsGraph< LocalOrdinal, GlobalOrdinal, Node >::CrsGraph ( 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 with fixed number of indices per row and specified column map.

Definition at line 70 of file Tpetra_CrsGraph_def.hpp.

template<class LocalOrdinal , class GlobalOrdinal , class Node >
Tpetra::CrsGraph< LocalOrdinal, GlobalOrdinal, Node >::CrsGraph ( 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 with variable number of indices per row and specified column map.

Definition at line 139 of file Tpetra_CrsGraph_def.hpp.


Member Function Documentation

template<class LocalOrdinal , class GlobalOrdinal , class Node >
void Tpetra::CrsGraph< LocalOrdinal, GlobalOrdinal, Node >::insertGlobalIndices ( GlobalOrdinal  row,
const Teuchos::ArrayView< const GlobalOrdinal > &  indices 
) [inline]

Submit graph indices, using global IDs.

Definition at line 1493 of file Tpetra_CrsGraph_def.hpp.

template<class LocalOrdinal , class GlobalOrdinal , class Node >
void Tpetra::CrsGraph< LocalOrdinal, GlobalOrdinal, Node >::insertLocalIndices ( LocalOrdinal  row,
const Teuchos::ArrayView< const LocalOrdinal > &  indices 
) [inline]

Submit graph indices, using local IDs.

Definition at line 1411 of file Tpetra_CrsGraph_def.hpp.

template<class LocalOrdinal , class GlobalOrdinal , class Node >
void Tpetra::CrsGraph< LocalOrdinal, GlobalOrdinal, Node >::removeLocalIndices ( LocalOrdinal  row  )  [inline]

Remove graph indices from local row.

Definition at line 1466 of file Tpetra_CrsGraph_def.hpp.

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

Communicate non-local contributions to other nodes.

Definition at line 1559 of file Tpetra_CrsGraph_def.hpp.

template<class LocalOrdinal , class GlobalOrdinal , class Node >
void Tpetra::CrsGraph< LocalOrdinal, GlobalOrdinal, Node >::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 1787 of file Tpetra_CrsGraph_def.hpp.

template<class LocalOrdinal , class GlobalOrdinal , class Node >
void Tpetra::CrsGraph< LocalOrdinal, GlobalOrdinal, Node >::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(), OptimizeStorage ).

Definition at line 1779 of file Tpetra_CrsGraph_def.hpp.

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

Re-allocate the data into contiguous storage.

Definition at line 2216 of file Tpetra_CrsGraph_def.hpp.

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

Returns the communicator.

Implements Tpetra::RowGraph< LocalOrdinal, GlobalOrdinal, Node >.

Definition at line 457 of file Tpetra_CrsGraph_def.hpp.

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

Returns the underlying node.

Implements Tpetra::RowGraph< LocalOrdinal, GlobalOrdinal, Node >.

Definition at line 330 of file Tpetra_CrsGraph_def.hpp.

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

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

Implements Tpetra::RowGraph< LocalOrdinal, GlobalOrdinal, Node >.

Definition at line 337 of file Tpetra_CrsGraph_def.hpp.

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

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

Implements Tpetra::RowGraph< LocalOrdinal, GlobalOrdinal, Node >.

Definition at line 344 of file Tpetra_CrsGraph_def.hpp.

template<class LocalOrdinal , class GlobalOrdinal , class Node >
const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > & Tpetra::CrsGraph< LocalOrdinal, GlobalOrdinal, Node >::getDomainMap (  )  const [inline, virtual]

Returns the Map associated with the domain of this graph.

Implements Tpetra::RowGraph< LocalOrdinal, GlobalOrdinal, Node >.

Definition at line 351 of file Tpetra_CrsGraph_def.hpp.

template<class LocalOrdinal , class GlobalOrdinal , class Node >
const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > & Tpetra::CrsGraph< LocalOrdinal, GlobalOrdinal, Node >::getRangeMap (  )  const [inline, virtual]

Returns the Map associated with the domain of this graph.

Implements Tpetra::RowGraph< LocalOrdinal, GlobalOrdinal, Node >.

Definition at line 358 of file Tpetra_CrsGraph_def.hpp.

template<class LocalOrdinal , class GlobalOrdinal , class Node >
Teuchos::RCP< const Import< LocalOrdinal, GlobalOrdinal, Node > > Tpetra::CrsGraph< LocalOrdinal, GlobalOrdinal, Node >::getImporter (  )  const [inline, virtual]

Returns the importer associated with this graph.

Implements Tpetra::RowGraph< LocalOrdinal, GlobalOrdinal, Node >.

Definition at line 365 of file Tpetra_CrsGraph_def.hpp.

template<class LocalOrdinal , class GlobalOrdinal , class Node >
Teuchos::RCP< const Export< LocalOrdinal, GlobalOrdinal, Node > > Tpetra::CrsGraph< LocalOrdinal, GlobalOrdinal, Node >::getExporter (  )  const [inline, virtual]

Returns the exporter associated with this graph.

Implements Tpetra::RowGraph< LocalOrdinal, GlobalOrdinal, Node >.

Definition at line 372 of file Tpetra_CrsGraph_def.hpp.

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

Returns the number of global rows in the graph.

Implements Tpetra::RowGraph< LocalOrdinal, GlobalOrdinal, Node >.

Definition at line 287 of file Tpetra_CrsGraph_def.hpp.

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

Returns the number of global columns in the graph.

Implements Tpetra::RowGraph< LocalOrdinal, GlobalOrdinal, Node >.

Definition at line 293 of file Tpetra_CrsGraph_def.hpp.

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

Returns the number of rows owned on the calling node.

Implements Tpetra::RowGraph< LocalOrdinal, GlobalOrdinal, Node >.

Definition at line 301 of file Tpetra_CrsGraph_def.hpp.

template<class LocalOrdinal , class GlobalOrdinal , class Node >
size_t Tpetra::CrsGraph< LocalOrdinal, GlobalOrdinal, Node >::getNodeNumCols (  )  const [inline, virtual]

Returns the number of columns connected to the locally owned rows of this graph.

Implements Tpetra::RowGraph< LocalOrdinal, GlobalOrdinal, Node >.

Definition at line 307 of file Tpetra_CrsGraph_def.hpp.

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

Returns the index base for global indices for this graph.

Implements Tpetra::RowGraph< LocalOrdinal, GlobalOrdinal, Node >.

Definition at line 462 of file Tpetra_CrsGraph_def.hpp.

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

Returns the global number of entries in the graph.

Implements Tpetra::RowGraph< LocalOrdinal, GlobalOrdinal, Node >.

Definition at line 396 of file Tpetra_CrsGraph_def.hpp.

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

Returns the local number of entries in the graph.

Implements Tpetra::RowGraph< LocalOrdinal, GlobalOrdinal, Node >.

Definition at line 402 of file Tpetra_CrsGraph_def.hpp.

template<class LocalOrdinal , class GlobalOrdinal , class Node >
size_t Tpetra::CrsGraph< LocalOrdinal, GlobalOrdinal, Node >::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::RowGraph< LocalOrdinal, GlobalOrdinal, Node >.

Definition at line 1225 of file Tpetra_CrsGraph_def.hpp.

template<class LocalOrdinal , class GlobalOrdinal , class Node >
size_t Tpetra::CrsGraph< LocalOrdinal, GlobalOrdinal, Node >::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::RowGraph< LocalOrdinal, GlobalOrdinal, Node >.

Definition at line 1242 of file Tpetra_CrsGraph_def.hpp.

template<class LocalOrdinal , class GlobalOrdinal , class Node >
size_t Tpetra::CrsGraph< LocalOrdinal, GlobalOrdinal, Node >::getNodeAllocationSize (  )  const [inline]

Returns the total number of indices allocated for the graph, across all rows on this node.

This is the allocation available to the user. Actual allocation may be larger, for example, after calling fillComplete(), and thus this does not necessarily reflect the memory consumption of the this graph.

This quantity is computed during the actual allocation. Therefore, if indicesAreAllocated() == false, this method returns Teuchos::OrdinalTraits<size_t>::invalid().

Definition at line 450 of file Tpetra_CrsGraph_def.hpp.

template<class LocalOrdinal , class GlobalOrdinal , class Node >
size_t Tpetra::CrsGraph< LocalOrdinal, GlobalOrdinal, Node >::getNumAllocatedEntriesInGlobalRow ( GlobalOrdinal  globalRow  )  const [inline]

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

Throws exception std::runtime_error if the specified global row does not belong to this node.

Definition at line 1258 of file Tpetra_CrsGraph_def.hpp.

template<class LocalOrdinal , class GlobalOrdinal , class Node >
size_t Tpetra::CrsGraph< LocalOrdinal, GlobalOrdinal, Node >::getNumAllocatedEntriesInLocalRow ( LocalOrdinal  localRow  )  const [inline]

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

Throws exception std::runtime_error if the specified local row is not valid for this node.

Definition at line 1275 of file Tpetra_CrsGraph_def.hpp.

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

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

Implements Tpetra::RowGraph< LocalOrdinal, GlobalOrdinal, Node >.

Definition at line 323 of file Tpetra_CrsGraph_def.hpp.

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

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

Implements Tpetra::RowGraph< LocalOrdinal, GlobalOrdinal, Node >.

Definition at line 315 of file Tpetra_CrsGraph_def.hpp.

template<class LocalOrdinal , class GlobalOrdinal , class Node >
global_size_t Tpetra::CrsGraph< LocalOrdinal, GlobalOrdinal, Node >::getGlobalMaxNumRowEntries (  )  const [inline, virtual]

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

Implements Tpetra::RowGraph< LocalOrdinal, GlobalOrdinal, Node >.

Definition at line 408 of file Tpetra_CrsGraph_def.hpp.

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

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

Implements Tpetra::RowGraph< LocalOrdinal, GlobalOrdinal, Node >.

Definition at line 414 of file Tpetra_CrsGraph_def.hpp.

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

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

Implements Tpetra::RowGraph< LocalOrdinal, GlobalOrdinal, Node >.

Definition at line 378 of file Tpetra_CrsGraph_def.hpp.

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

Indicates whether the graph is lower triangular.

Implements Tpetra::RowGraph< LocalOrdinal, GlobalOrdinal, Node >.

Definition at line 432 of file Tpetra_CrsGraph_def.hpp.

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

Indicates whether the graph is upper triangular.

Implements Tpetra::RowGraph< LocalOrdinal, GlobalOrdinal, Node >.

Definition at line 426 of file Tpetra_CrsGraph_def.hpp.

template<class LocalOrdinal , class GlobalOrdinal , class Node >
bool Tpetra::CrsGraph< LocalOrdinal, GlobalOrdinal, Node >::isLocallyIndexed (  )  const [inline, virtual]

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

Implements Tpetra::RowGraph< LocalOrdinal, GlobalOrdinal, Node >.

Definition at line 438 of file Tpetra_CrsGraph_def.hpp.

template<class LocalOrdinal , class GlobalOrdinal , class Node >
bool Tpetra::CrsGraph< LocalOrdinal, GlobalOrdinal, Node >::isGloballyIndexed (  )  const [inline, virtual]

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

Implements Tpetra::RowGraph< LocalOrdinal, GlobalOrdinal, Node >.

Definition at line 444 of file Tpetra_CrsGraph_def.hpp.

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

Returns true if fillComplete() has been called.

Implements Tpetra::RowGraph< LocalOrdinal, GlobalOrdinal, Node >.

Definition at line 420 of file Tpetra_CrsGraph_def.hpp.

template<class LocalOrdinal , class GlobalOrdinal , class Node >
void Tpetra::CrsGraph< LocalOrdinal, GlobalOrdinal, Node >::getGlobalRowCopy ( GlobalOrdinal  GlobalRow,
const Teuchos::ArrayView< GlobalOrdinal > &  Indices,
size_t &  NumIndices 
) const [inline, virtual]

Extract a list of elements in a specified global row of the graph. Put into pre-allocated storage.

Parameters:
LocalRow - (In) Global row number for which indices are desired.
Indices - (Out) Global column indices corresponding to values.
NumIndices - (Out) Number of indices.

Note: A std::runtime_error exception is thrown indices is not large enough to hold the column indices associated with row GlobalRow. If GlobalRow does not belong to this node, then indices is unchanged and NumIndices is returned as Teuchos::OrdinalTraits<size_t>::invalid().

Implements Tpetra::RowGraph< LocalOrdinal, GlobalOrdinal, Node >.

Definition at line 1375 of file Tpetra_CrsGraph_def.hpp.

template<class LocalOrdinal , class GlobalOrdinal , class Node >
void Tpetra::CrsGraph< LocalOrdinal, GlobalOrdinal, Node >::getLocalRowCopy ( LocalOrdinal  LocalRow,
const Teuchos::ArrayView< LocalOrdinal > &  indices,
size_t &  NumIndices 
) const [inline, virtual]

Extract a list of elements 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.
NumIndices - (Out) Number of indices.

Note: A std::runtime_error exception is thrown indices is not large enough to hold the column indices associated with row LocalRow. If LocalRow is not valid for this node, then indices is unchanged and NumIndices is returned as Teuchos::OrdinalTraits<size_t>::invalid().

Precondition:
isLocallyIndexed()==true

Implements Tpetra::RowGraph< LocalOrdinal, GlobalOrdinal, Node >.

Definition at line 1326 of file Tpetra_CrsGraph_def.hpp.

template<class LocalOrdinal , class GlobalOrdinal , class Node >
Teuchos::ArrayRCP< const GlobalOrdinal > Tpetra::CrsGraph< LocalOrdinal, GlobalOrdinal, Node >::getGlobalRowView ( GlobalOrdinal  GlobalRow  )  const [inline, virtual]

Get a persisting const view of the elements in a specified global row of the graph.

Parameters:
GlobalRow - (In) Global row number to get indices.

Note: If GlobalRow does not belong to this node, then returns Teuchos::null.

Precondition:
isGloballyIndexed()==true

Implements Tpetra::RowGraph< LocalOrdinal, GlobalOrdinal, Node >.

Definition at line 1308 of file Tpetra_CrsGraph_def.hpp.

template<class LocalOrdinal , class GlobalOrdinal , class Node >
Teuchos::ArrayRCP< const LocalOrdinal > Tpetra::CrsGraph< LocalOrdinal, GlobalOrdinal, Node >::getLocalRowView ( LocalOrdinal  LocalRow  )  const [inline, virtual]

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

Parameters:
LocalRow - (In) Local row number to get indices.

Note: If LocalRow is not valid for this node, then returns Teuchos::null.

Precondition:
isLocallyIndexed()==true

Implements Tpetra::RowGraph< LocalOrdinal, GlobalOrdinal, Node >.

Definition at line 1291 of file Tpetra_CrsGraph_def.hpp.

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

Returns true if optimizeStorage() has been called.

Definition at line 384 of file Tpetra_CrsGraph_def.hpp.

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

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

Definition at line 390 of file Tpetra_CrsGraph_def.hpp.

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

Return a simple one-line description of this object.

Reimplemented from Teuchos::Describable.

Definition at line 2334 of file Tpetra_CrsGraph_def.hpp.

template<class LocalOrdinal , class GlobalOrdinal , class Node >
void Tpetra::CrsGraph< LocalOrdinal, GlobalOrdinal, Node >::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 2356 of file Tpetra_CrsGraph_def.hpp.

template<class LocalOrdinal , class GlobalOrdinal , class Node >
bool Tpetra::CrsGraph< LocalOrdinal, GlobalOrdinal, Node >::checkSizes ( const DistObject< GlobalOrdinal, 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< GlobalOrdinal, LocalOrdinal, GlobalOrdinal, Node >.

Definition at line 2469 of file Tpetra_CrsGraph_def.hpp.

template<class LocalOrdinal , class GlobalOrdinal , class Node >
void Tpetra::CrsGraph< LocalOrdinal, GlobalOrdinal, Node >::copyAndPermute ( const DistObject< GlobalOrdinal, 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< GlobalOrdinal, LocalOrdinal, GlobalOrdinal, Node >.

Definition at line 2480 of file Tpetra_CrsGraph_def.hpp.

template<class LocalOrdinal , class GlobalOrdinal , class Node >
void Tpetra::CrsGraph< LocalOrdinal, GlobalOrdinal, Node >::packAndPrepare ( const DistObject< GlobalOrdinal, LocalOrdinal, GlobalOrdinal, Node > &  source,
const Teuchos::ArrayView< const LocalOrdinal > &  exportLIDs,
Teuchos::Array< GlobalOrdinal > &  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< GlobalOrdinal, LocalOrdinal, GlobalOrdinal, Node >.

Definition at line 2529 of file Tpetra_CrsGraph_def.hpp.

template<class LocalOrdinal , class GlobalOrdinal , class Node >
void Tpetra::CrsGraph< LocalOrdinal, GlobalOrdinal, Node >::unpackAndCombine ( const Teuchos::ArrayView< const LocalOrdinal > &  importLIDs,
const Teuchos::ArrayView< const GlobalOrdinal > &  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< GlobalOrdinal, LocalOrdinal, GlobalOrdinal, Node >.

Definition at line 2579 of file Tpetra_CrsGraph_def.hpp.

template<class LocalOrdinal , class GlobalOrdinal , class Node >
RowInfo Tpetra::CrsGraph< LocalOrdinal, GlobalOrdinal, Node >::getRowInfo ( size_t  myRow  )  const [inline, protected]

Get the sizes associated with the allocated rows.

This is used by the row view routines and others. It computes the size and offset information for a particular row. It is designed to do this with minimum overhead. No checking is done except in a debug build.

Parameters:
myRow - (In) size_t specifying the local row.
Returns:
RowInfo struct specifying the size of the allocation for the specified row, the number of entries, and the offset into 1D allocation, if getProfileType() == StaticProfile.

Definition at line 500 of file Tpetra_CrsGraph_def.hpp.

template<class LocalOrdinal , class GlobalOrdinal , class Node >
RowInfo Tpetra::CrsGraph< LocalOrdinal, GlobalOrdinal, Node >::getFullLocalView ( size_t  myRow,
Teuchos::ArrayRCP< const LocalOrdinal > &  indices 
) const [inline, protected]

Get a persisting const view of the elements in a specified local row of the graph, along with other details.

This protected method is used internally for almost all access to the graph elements. It is designed to provide the information needed by CrsGraph and CrsMatrix with as little overhead as possible. No checking is done except in a debug build.

Parameters:
myRow - (In) size_t specifying the local row.
indices - (Out) persisting, const view of the local indices. indices.size() specifies the size of the allocation.
Returns:
Returns row info; see getRowInfo().
Precondition:
isGloballyIndexed()==false

Definition at line 567 of file Tpetra_CrsGraph_def.hpp.

template<class LocalOrdinal , class GlobalOrdinal , class Node >
RowInfo Tpetra::CrsGraph< LocalOrdinal, GlobalOrdinal, Node >::getFullLocalViewNonConst ( size_t  myRow,
Teuchos::ArrayRCP< LocalOrdinal > &  indices 
) [inline, protected]

Get a persisting non-const view of the elements in a specified local row of the graph, along with other details.

This protected method is used internally for almost all access to the graph elements. It is designed to provide the information needed by CrsGraph and CrsMatrix with as little overhead as possible. No checking is done except in a debug build.

Parameters:
myRow - (In) size_t specifying the local row.
indices - (Out) persisting, non-const view of the local indices. indices.size() specifies the size of the allocation.
Returns:
Returns row info; see getRowInfo().
Precondition:
isGloballyIndexed()==false

Definition at line 609 of file Tpetra_CrsGraph_def.hpp.

template<class LocalOrdinal , class GlobalOrdinal , class Node >
RowInfo Tpetra::CrsGraph< LocalOrdinal, GlobalOrdinal, Node >::getFullGlobalView ( size_t  myRow,
Teuchos::ArrayRCP< const GlobalOrdinal > &  indices 
) const [inline, protected]

Get a persisting const view of the elements in a specified global row of the graph, along with other details.

This protected method is used internally for almost all access to the graph elements. It is designed to provide the information needed by CrsGraph and CrsMatrix with as little overhead as possible. No checking is done except in a debug build.

Parameters:
myRow - (In) size_t specifying the local row.
indices - (Out) persisting, const view of the local indices. indices.size() specifies the size of the allocation.
Returns:
Returns row info; see getRowInfo().
Precondition:
isLocallyIndexed()==false

Definition at line 653 of file Tpetra_CrsGraph_def.hpp.

template<class LocalOrdinal , class GlobalOrdinal , class Node >
RowInfo Tpetra::CrsGraph< LocalOrdinal, GlobalOrdinal, Node >::getFullGlobalViewNonConst ( size_t  myRow,
Teuchos::ArrayRCP< GlobalOrdinal > &  indices 
) [inline, protected]

Get a persisting non-const view of the elements in a specified local row of the graph, along with other details.

This protected method is used internally for almost all access to the graph elements. It is designed to provide the information needed by CrsGraph and CrsMatrix with as little overhead as possible. No checking is done except in a debug build.

Parameters:
myRow - (In) size_t specifying the local row.
indices - (Out) persisting, non-const view of the local indices. indices.size() specifies the size of the allocation.
Returns:
Returns row info; see getRowInfo().
Precondition:
isLocallyIndexed()==false

Definition at line 696 of file Tpetra_CrsGraph_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