Tpetra Matrix/Vector Services  Version of the Day
Protected Member Functions | Protected Attributes | Related Functions | List of all members
Tpetra::CrsGraph< LocalOrdinal, GlobalOrdinal, Node, LocalMatOps > Class Template Referenceabstract

A distributed graph accessed by rows (adjacency lists) and stored sparsely. More...

#include <Tpetra_CrsGraph_decl.hpp>

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

Public Types

Typedefs
typedef GlobalOrdinal packet_type
 The type of each datum being sent or received in an Import or Export. More...
 

Public Member Functions

Constructor/Destructor Methods
 CrsGraph (const RCP< const map_type > &rowMap, size_t maxNumEntriesPerRow, ProfileType pftype=DynamicProfile, const RCP< ParameterList > &params=null)
 Constructor specifying fixed number of entries for each row. More...
 
 CrsGraph (const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &rowMap, const ArrayRCP< const size_t > &NumEntriesPerRowToAlloc, ProfileType pftype=DynamicProfile, const RCP< ParameterList > &params=null)
 Constructor specifying (possibly different) number of entries in each row. More...
 
 CrsGraph (const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &rowMap, const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &colMap, size_t maxNumEntriesPerRow, ProfileType pftype=DynamicProfile, const RCP< ParameterList > &params=null)
 Constructor specifying column Map and fixed number of entries for each row. More...
 
 CrsGraph (const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &rowMap, const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &colMap, const ArrayRCP< const size_t > &NumEntriesPerRowToAlloc, ProfileType pftype=DynamicProfile, const RCP< ParameterList > &params=null)
 Constructor specifying column Map and number of entries in each row. More...
 
 CrsGraph (const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &rowMap, const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &colMap, const ArrayRCP< size_t > &rowPointers, const ArrayRCP< LocalOrdinal > &columnIndices, const RCP< ParameterList > &params=null)
 Constructor specifying column Map and arrays containing the graph in sorted, local ids. More...
 
template<class Node2 >
RCP< CrsGraph< LocalOrdinal, GlobalOrdinal, Node2, typename Kokkos::DefaultKernels< void, LocalOrdinal, Node2 >::SparseOps > > clone (const Teuchos::RCP< Node2 > &node2, const Teuchos::RCP< Teuchos::ParameterList > &params=null) const
 Create a cloned CrsGraph for a different Node type. More...
 
virtual ~CrsGraph ()
 Destructor. More...
 
Implementation of Teuchos::ParameterListAcceptor
void setParameterList (const RCP< ParameterList > &params)
 Set the given list of parameters (must be nonnull). More...
 
RCP< const ParameterList > getValidParameters () const
 Default parameter list suitable for validation. More...
 
Insertion/Removal Methods
void insertGlobalIndices (GlobalOrdinal globalRow, const ArrayView< const GlobalOrdinal > &indices)
 Insert global indices into the graph. More...
 
void insertLocalIndices (const LocalOrdinal localRow, const ArrayView< const LocalOrdinal > &indices)
 Insert local indices into the graph. More...
 
void removeLocalIndices (LocalOrdinal localRow)
 Remove all graph indices from the specified local row. More...
 
Transformational Methods
void globalAssemble ()
 Communicate non-local contributions to other processes. More...
 
void resumeFill (const RCP< ParameterList > &params=null)
 
void fillComplete (const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &domainMap, const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &rangeMap, const RCP< ParameterList > &params=null)
 Signal that data entry is complete, specifying domain and range maps. More...
 
void fillComplete (const RCP< ParameterList > &params=null)
 Signal that data entry is complete. More...
 
void expertStaticFillComplete (const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &domainMap, const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &rangeMap, const RCP< const Import< LocalOrdinal, GlobalOrdinal, Node > > &importer=Teuchos::null, const RCP< const Export< LocalOrdinal, GlobalOrdinal, Node > > &exporter=Teuchos::null, const RCP< ParameterList > &params=Teuchos::null)
 Perform a fillComplete on a graph that already has data, via setAllIndices(). More...
 
Methods implementing RowGraph.
const RCP< const Comm< int > > & getComm () const
 Returns the communicator. More...
 
RCP< Node > getNode () const
 Returns the underlying node. More...
 
const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > & getRowMap () const
 Returns the Map that describes the row distribution in this graph. More...
 
const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > & getColMap () const
 Returns the Map that describes the column distribution in this graph. More...
 
const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > & getDomainMap () const
 Returns the Map associated with the domain of this graph. More...
 
const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > & getRangeMap () const
 Returns the Map associated with the domain of this graph. More...
 
RCP< const Import< LocalOrdinal, GlobalOrdinal, Node > > getImporter () const
 Returns the importer associated with this graph. More...
 
RCP< const Export< LocalOrdinal, GlobalOrdinal, Node > > getExporter () const
 Returns the exporter associated with this graph. More...
 
global_size_t getGlobalNumRows () const
 Returns the number of global rows in the graph. More...
 
global_size_t getGlobalNumCols () const
 Returns the number of global columns in the graph. More...
 
size_t getNodeNumRows () const
 Returns the number of graph rows owned on the calling node. More...
 
size_t getNodeNumCols () const
 Returns the number of columns connected to the locally owned rows of this graph. More...
 
GlobalOrdinal getIndexBase () const
 Returns the index base for global indices for this graph. More...
 
global_size_t getGlobalNumEntries () const
 Returns the global number of entries in the graph. More...
 
size_t getNodeNumEntries () const
 Returns the local number of entries in the graph. More...
 
size_t getNumEntriesInGlobalRow (GlobalOrdinal globalRow) const
 Returns the current number of entries on this node in the specified global row. More...
 
size_t getNumEntriesInLocalRow (LocalOrdinal localRow) const
 Returns the current number of entries on this node in the specified local row. More...
 
size_t getNodeAllocationSize () const
 Returns the total number of indices allocated for the graph, across all rows on this node. More...
 
size_t getNumAllocatedEntriesInGlobalRow (GlobalOrdinal globalRow) const
 Returns the current number of allocated entries for this node in the specified global row . More...
 
size_t getNumAllocatedEntriesInLocalRow (LocalOrdinal localRow) const
 Returns the current number of allocated entries on this node in the specified local row. More...
 
global_size_t getGlobalNumDiags () const
 Returns the number of global diagonal entries, based on global row/column index comparisons. More...
 
size_t getNodeNumDiags () const
 Returns the number of local diagonal entries, based on global row/column index comparisons. More...
 
size_t getGlobalMaxNumRowEntries () const
 Maximum number of entries in all rows over all processes. More...
 
size_t getNodeMaxNumRowEntries () const
 Maximum number of entries in all rows owned by the calling process. More...
 
bool hasColMap () const
 Whether the graph has a column Map. More...
 
bool isLowerTriangular () const
 Whether the graph is locally lower triangular. More...
 
bool isUpperTriangular () const
 Whether the graph is locally upper triangular. More...
 
bool isLocallyIndexed () const
 If graph indices are in the local range, this function returns true. Otherwise, this function returns false. */. More...
 
bool isGloballyIndexed () const
 If graph indices are in the global range, this function returns true. Otherwise, this function returns false. */. More...
 
bool isFillComplete () const
 Returns true if fillComplete() has been called and the graph is in compute mode. More...
 
bool isFillActive () const
 Returns true if resumeFill() has been called and the graph is in edit mode. More...
 
bool isSorted () const
 Indicates whether the graph indices in all rows are known to be sorted. More...
 
bool isStorageOptimized () const
 Returns true if storage has been optimized. More...
 
ProfileType getProfileType () const
 Returns true if the graph was allocated with static data structures. More...
 
void getGlobalRowCopy (GlobalOrdinal GlobalRow, const 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. More...
 
void getLocalRowCopy (LocalOrdinal LocalRow, const 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. More...
 
void getGlobalRowView (GlobalOrdinal GlobalRow, ArrayView< const GlobalOrdinal > &Indices) const
 Extract a const, non-persisting view of global indices in a specified row of the graph. More...
 
void getLocalRowView (LocalOrdinal LocalRow, ArrayView< const LocalOrdinal > &indices) const
 Extract a const, non-persisting view of local indices in a specified row of the graph. More...
 
Overridden from Teuchos::Describable
std::string description () const
 Return a simple one-line description of this object. More...
 
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. More...
 
Implementation of DistObject
virtual bool checkSizes (const SrcDistObject &source)
 Compare the source and target (this) objects for compatibility. More...
 
virtual void copyAndPermute (const SrcDistObject &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 process. More...
 
virtual void packAndPrepare (const SrcDistObject &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. More...
 
virtual 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. More...
 
Advanced methods, at increased risk of deprecation.
void setAllIndices (const ArrayRCP< size_t > &rowPointers, const ArrayRCP< LocalOrdinal > &columnIndices)
 Set the graph's data directly, using 1-D storage. More...
 
ArrayRCP< const size_t > getNodeRowPtrs () const
 Get an ArrayRCP of the row-offsets. More...
 
ArrayRCP< const LocalOrdinal > getNodePackedIndices () const
 Get an ArrayRCP of the packed column-indices. More...
 
void replaceDomainMapAndImporter (const Teuchos::RCP< const map_type > &newDomainMap, Teuchos::RCP< const Tpetra::Import< LocalOrdinal, GlobalOrdinal, Node > > &newImporter)
 Replace the current domain Map and Import with the given parameters. More...
 
virtual void removeEmptyProcessesInPlace (const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &newMap)
 Remove processes owning zero rows from the Maps and their communicator. More...
 
Public methods for redistributing data
void doImport (const SrcDistObject &source, const Import< LocalOrdinal, GlobalOrdinal, Node > &importer, CombineMode CM)
 Import data into this object using an Import object ("forward mode"). More...
 
void doImport (const SrcDistObject &source, const Export< LocalOrdinal, GlobalOrdinal, Node > &exporter, CombineMode CM)
 Import data into this object using an Export object ("reverse mode"). More...
 
void doExport (const SrcDistObject &source, const Export< LocalOrdinal, GlobalOrdinal, Node > &exporter, CombineMode CM)
 Export data into this object using an Export object ("forward mode"). More...
 
void doExport (const SrcDistObject &source, const Import< LocalOrdinal, GlobalOrdinal, Node > &importer, CombineMode CM)
 Export data into this object using an Import object ("reverse mode"). More...
 
Attribute accessor methods
bool isDistributed () const
 Whether this is a globally distributed object. More...
 
const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > & getMap () const
 The Map describing the parallel distribution of this object. More...
 
I/O methods
void print (std::ostream &os) const
 Print this object to the given output stream. More...
 

Protected Member Functions

void setDomainRangeMaps (const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &domainMap, const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &rangeMap)
 
size_t findLocalIndex (RowInfo rowinfo, LocalOrdinal ind, size_t hint=0) const
 Find the column offset corresponding to the given (local) column index. More...
 
size_t findLocalIndex (RowInfo rowinfo, LocalOrdinal ind, ArrayView< const LocalOrdinal > colInds, size_t hint=0) const
 
size_t findGlobalIndex (RowInfo rowinfo, GlobalOrdinal ind, size_t hint=0) const
 Find the column offset corresponding to the given (global) column index. More...
 
virtual size_t constantNumberOfPackets () const
 Whether the implementation's instance promises always to have a constant number of packets per LID, and if so, how many packets per LID there are. More...
 
virtual void doTransfer (const SrcDistObject &src, CombineMode CM, size_t numSameIDs, const Teuchos::ArrayView< const LocalOrdinal > &permuteToLIDs, const Teuchos::ArrayView< const LocalOrdinal > &permuteFromLIDs, const Teuchos::ArrayView< const LocalOrdinal > &remoteLIDs, const Teuchos::ArrayView< const LocalOrdinal > &exportLIDs, Distributor &distor, ReverseOption revOp)
 Redistribute data across memory images. More...
 
virtual void createViews () const
 Hook for creating a const view. More...
 
virtual void createViewsNonConst (Kokkos::ReadWriteOption rwo)
 Hook for creating a nonconst view. More...
 
virtual void releaseViews () const
 Hook for releasing views. More...
 
Methods governing changes between global and local indices
void computeIndexState ()
 Set collectively whether the graph uses global or local indices. More...
 
void makeColMap ()
 Make the column Map. More...
 
void makeIndicesLocal ()
 
void makeImportExport ()
 
Methods for inserting indices or transforming values
template<ELocalGlobal lg>
size_t filterIndices (const SLocalGlobalNCViews &inds) const
 
template<class T >
size_t filterGlobalIndicesAndValues (const ArrayView< GlobalOrdinal > &ginds, const ArrayView< T > &vals) const
 
template<class T >
size_t filterLocalIndicesAndValues (const ArrayView< LocalOrdinal > &linds, const ArrayView< T > &vals) const
 
size_t insertIndices (const RowInfo &rowInfo, const SLocalGlobalViews &newInds, const ELocalGlobal lg, const ELocalGlobal I)
 Insert indices into the given row. More...
 
template<class Scalar >
void insertIndicesAndValues (const RowInfo &rowInfo, const SLocalGlobalViews &newInds, const ArrayView< Scalar > &oldRowVals, const ArrayView< const Scalar > &newRowVals, const ELocalGlobal lg, const ELocalGlobal I)
 Insert indices and their values into the given row. More...
 
void insertGlobalIndicesImpl (const LocalOrdinal myRow, const ArrayView< const GlobalOrdinal > &indices)
 
void insertLocalIndicesImpl (const LocalOrdinal myRow, const ArrayView< const LocalOrdinal > &indices)
 
void insertLocalIndicesFiltered (const LocalOrdinal localRow, const ArrayView< const LocalOrdinal > &indices)
 Like insertLocalIndices(), but with column Map filtering. More...
 
void insertGlobalIndicesFiltered (const GlobalOrdinal localRow, const ArrayView< const GlobalOrdinal > &indices)
 Like insertGlobalIndices(), but with column Map filtering. More...
 
template<class Scalar , class BinaryFunction >
void transformLocalValues (RowInfo rowInfo, const Teuchos::ArrayView< Scalar > &rowVals, const Teuchos::ArrayView< const LocalOrdinal > &inds, const Teuchos::ArrayView< const Scalar > &newVals, BinaryFunction f) const
 Transform the given values using local indices. More...
 
template<class Scalar , class BinaryFunction >
void transformGlobalValues (RowInfo rowInfo, const Teuchos::ArrayView< Scalar > &rowVals, const Teuchos::ArrayView< const GlobalOrdinal > &inds, const Teuchos::ArrayView< const Scalar > &newVals, BinaryFunction f) const
 Transform the given values using global indices. More...
 
Methods for sorting and merging column indices.
bool isMerged () const
 Whether duplicate column indices in each row have been merged. More...
 
void setLocallyModified ()
 Report that we made a local modification to its structure. More...
 
void sortAllIndices ()
 Sort the column indices in all the rows. More...
 
void sortRowIndices (RowInfo rowinfo)
 Sort the column indices in the given row. More...
 
template<class Scalar >
void sortRowIndicesAndValues (RowInfo rowinfo, ArrayView< Scalar > values)
 Sort the column indices and their values in the given row. More...
 
void mergeAllIndices ()
 Merge duplicate row indices in all of the rows. More...
 
void mergeRowIndices (RowInfo rowinfo)
 Merge duplicate row indices in the given row. More...
 
template<class Scalar >
void mergeRowIndicesAndValues (RowInfo rowinfo, const Teuchos::ArrayView< Scalar > &rowValues)
 Merge duplicate row indices in the given row, along with their corresponding values. More...
 

Protected Attributes

RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > rowMap_
 The Map describing the distribution of rows of the graph. More...
 
RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > colMap_
 The Map describing the distribution of columns of the graph. More...
 
RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > rangeMap_
 The Map describing the range of the (matrix corresponding to the) graph. More...
 
RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > domainMap_
 The Map describing the domain of the (matrix corresponding to the) graph. More...
 
RCP< const Import< LocalOrdinal, GlobalOrdinal, Node > > importer_
 The Import from the domain Map to the column Map. More...
 
RCP< const Export< LocalOrdinal, GlobalOrdinal, Node > > exporter_
 The Export from the row Map to the range Map. More...
 
ProfileType pftype_
 Whether the graph was allocated with static or dynamic profile. More...
 
ArrayRCP< const size_t > numAllocPerRow_
 The maximum number of entries to allow in each locally owned row, per row. More...
 
size_t numAllocForAllRows_
 The maximum number of entries to allow in each locally owned row. More...
 
ArrayRCP< LocalOrdinal > lclInds1D_
 lclInds1D_ are the indices for all rows More...
 
ArrayRCP< GlobalOrdinal > gblInds1D_
 gblInds1D_ are the indices for all rows More...
 
ArrayRCP< Array< LocalOrdinal > > lclInds2D_
 lclInds2D_[r] are the indices for row r. More...
 
ArrayRCP< Array< GlobalOrdinal > > gblInds2D_
 gblInds2D_[r] are the indices for row r. More...
 
ArrayRCP< size_t > numRowEntries_
 The number of local entries in each locally owned row. More...
 
bool lowerTriangular_
 Whether the graph is locally lower triangular. More...
 
bool upperTriangular_
 Whether the graph is locally upper triangular. More...
 
bool indicesAreSorted_
 Whether the graph's indices are sorted in each row, on this process. More...
 
bool noRedundancies_
 Whether the graph's indices are non-redundant (merged) in each row, on this process. More...
 
bool haveLocalConstants_
 Whether this process has computed local constants. More...
 
bool haveGlobalConstants_
 Whether all processes have computed global constants. More...
 
std::map< GlobalOrdinal, std::deque< GlobalOrdinal > > nonlocals_
 Nonlocal data given to insertGlobalValues or sumIntoGlobalValues. More...
 
Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > map_
 The Map over which this object is distributed. More...
 

Related Functions

(Note that these are not member functions.)

template<class LocalOrdinal , class GlobalOrdinal , class Node >
Teuchos::RCP< CrsGraph< LocalOrdinal, GlobalOrdinal, Node > > createCrsGraph (const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &map, size_t maxNumEntriesPerRow=0, const Teuchos::RCP< Teuchos::ParameterList > &params=Teuchos::null)
 Non-member function to create an empty CrsGraph given a row map and a non-zero profile. More...
 

Detailed Description

template<class LocalOrdinal, class GlobalOrdinal = LocalOrdinal, class Node = Kokkos::DefaultNode::DefaultNodeType, class LocalMatOps = typename Kokkos::DefaultKernels<void,LocalOrdinal,Node>::SparseOps>
class Tpetra::CrsGraph< LocalOrdinal, GlobalOrdinal, Node, LocalMatOps >

A distributed graph accessed by rows (adjacency lists) and stored sparsely.

Template Parameters
LocalOrdinalThe type of local indices. Same as the LocalOrdinal template parameter of Map objects used by this graph. (In Epetra, this is just int.) The default type is int, which should suffice for most users. This type must be big enough to store the local (per process) number of rows or columns.
GlobalOrdinalThe type of global indices. Same as the GlobalOrdinal template parameter of Map objects used by this graph. (In Epetra, this is just int. One advantage of Tpetra over Epetra is that you can use a 64-bit integer type here if you want to solve big problems.) The default type is LocalOrdinal. This type must be big enough to store the global (over all processes in the communicator) number of rows or columns.
NodeA class implementing on-node shared-memory parallel operations. It must implement the Kokkos Node API. The default Node type should suffice for most users. The actual default type depends on your Trilinos build options.
LocalMatOpsType implementing local sparse graph-(multi)vector multiply and local sparse triangular solve. It must implement the Kokkos CRS Ops API. The default LocalMatOps type should suffice for most users. The actual default type depends on your Trilinos build options.

This class implements a distributed-memory parallel sparse graph. It provides access by rows to the elements of the graph, as if the local data were stored in compressed sparse row format (adjacency lists, in graph terms). (Implementations are not required to store the data in this way internally.) This class has an interface like that of Epetra_CrsGraph, but also allows insertion of data into nonowned rows, much like Epetra_FECrsGraph.

Prerequisites

Before reading the rest of this documentation, it helps to know something about the Teuchos memory management classes, in particular Teuchos::RCP, Teuchos::ArrayRCP, and Teuchos::ArrayView. You should also know a little bit about MPI (the Message Passing Interface for distributed-memory programming). You won't have to use MPI directly to use CrsGraph, but it helps to be familiar with the general idea of distributed storage of data over a communicator. Finally, you should read the documentation of Map.

Local vs. global indices and nonlocal insertion

Graph entries can be added using either local or global coordinates for the indices. The accessors isGloballyIndexed() and isLocallyIndexed() indicate whether the indices are currently stored as global or local indices. Many of the class methods are divided into global and local versions, which differ only in whether they accept/return indices in the global or local coordinate space. Some of these methods may only be used if the graph coordinates are in the appropriate coordinates. For example, getGlobalRowView() returns a View to the indices in global coordinates; if the indices are not in global coordinates, then no such View can be created.

The global/local distinction does distinguish between operation on the global/local graph. Almost all methods operate on the local graph, i.e., the rows of the graph associated with the local node, per the distribution specified by the row map. Access to non-local rows requires performing an explicit communication via the import/export capabilities of the CrsGraph object; see DistObject. However, the method insertGlobalIndices() is an exception to this rule, as non-local rows are allowed to be added via the local graph. These rows are stored in the local graph and communicated to the appropriate node on the next call to globalAssemble() or fillComplete() (the latter calls the former).

Definition at line 167 of file Tpetra_CrsGraph_decl.hpp.

Member Typedef Documentation

typedef GlobalOrdinal Tpetra::DistObject< GlobalOrdinal , LocalOrdinal, GlobalOrdinal, Node >::packet_type
inherited

The type of each datum being sent or received in an Import or Export.

Note that this type does not always correspond to the Scalar template parameter of subclasses.

Definition at line 183 of file Tpetra_DistObject_decl.hpp.

Member Enumeration Documentation

enum Tpetra::DistObject::ReverseOption
protectedinherited

Whether the data transfer should be performed in forward or reverse mode.

"Reverse mode" means calling doExport() with an Import object, or calling doImport() with an Export object. "Forward mode" means calling doExport() with an Export object, or calling doImport() with an Import object.

Definition at line 418 of file Tpetra_DistObject_decl.hpp.

Constructor & Destructor Documentation

template<class LocalOrdinal , class GlobalOrdinal , class Node , class LocalMatOps >
Tpetra::CrsGraph< LocalOrdinal, GlobalOrdinal, Node, LocalMatOps >::CrsGraph ( const RCP< const map_type > &  rowMap,
size_t  maxNumEntriesPerRow,
ProfileType  pftype = DynamicProfile,
const RCP< ParameterList > &  params = null 
)

Constructor specifying fixed number of entries for each row.

Parameters
rowMap[in] Distribution of rows of the graph.
maxNumEntriesPerRow[in] Maximum number of graph entries per row. If pftype==DynamicProfile, this is only a hint, and you can set this to zero without affecting correctness. If pftype==StaticProfile, this sets the amount of storage allocated, and you cannot exceed this number of entries in any row.
pftype[in] Whether to allocate storage dynamically (DynamicProfile) or statically (StaticProfile).
params[in/out] Optional list of parameters. If not null, any missing parameters will be filled in with their default values.

Definition at line 68 of file Tpetra_CrsGraph_def.hpp.

template<class LocalOrdinal , class GlobalOrdinal , class Node , class LocalMatOps >
Tpetra::CrsGraph< LocalOrdinal, GlobalOrdinal, Node, LocalMatOps >::CrsGraph ( const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &  rowMap,
const ArrayRCP< const size_t > &  NumEntriesPerRowToAlloc,
ProfileType  pftype = DynamicProfile,
const RCP< ParameterList > &  params = null 
)

Constructor specifying (possibly different) number of entries in each row.

Parameters
rowMap[in] Distribution of rows of the graph.
NumEntriesPerRowToAlloc[in] Maximum number of graph entries to allocate for each row. If pftype==DynamicProfile, this is only a hint. If pftype==StaticProfile, this sets the amount of storage allocated, and you cannot exceed the allocated number of entries for any row.
pftype[in] Whether to allocate storage dynamically (DynamicProfile) or statically (StaticProfile).
params[in/out] Optional list of parameters. If not null, any missing parameters will be filled in with their default values.

Definition at line 138 of file Tpetra_CrsGraph_def.hpp.

template<class LocalOrdinal , class GlobalOrdinal , class Node , class LocalMatOps >
Tpetra::CrsGraph< LocalOrdinal, GlobalOrdinal, Node, LocalMatOps >::CrsGraph ( const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &  rowMap,
const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &  colMap,
size_t  maxNumEntriesPerRow,
ProfileType  pftype = DynamicProfile,
const RCP< ParameterList > &  params = null 
)

Constructor specifying column Map and fixed number of entries for each row.

Parameters
rowMap[in] Distribution of rows of the graph.
colMap[in] Distribution of columns of the graph.
maxNumEntriesPerRow[in] Maximum number of graph entries per row. If pftype==DynamicProfile, this is only a hint, and you can set this to zero without affecting correctness. If pftype==StaticProfile, this sets the amount of storage allocated, and you cannot exceed this number of entries in any row.
pftype[in] Whether to allocate storage dynamically (DynamicProfile) or statically (StaticProfile).
params[in/out] Optional list of parameters. If not null, any missing parameters will be filled in with their default values.

Definition at line 102 of file Tpetra_CrsGraph_def.hpp.

template<class LocalOrdinal , class GlobalOrdinal , class Node , class LocalMatOps >
Tpetra::CrsGraph< LocalOrdinal, GlobalOrdinal, Node, LocalMatOps >::CrsGraph ( const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &  rowMap,
const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &  colMap,
const ArrayRCP< const size_t > &  NumEntriesPerRowToAlloc,
ProfileType  pftype = DynamicProfile,
const RCP< ParameterList > &  params = null 
)

Constructor specifying column Map and number of entries in each row.

Parameters
rowMap[in] Distribution of rows of the graph.
colMap[in] Distribution of columns of the graph.
NumEntriesPerRowToAlloc[in] Maximum number of graph entries to allocate for each row. If pftype==DynamicProfile, this is only a hint. If pftype==StaticProfile, this sets the amount of storage allocated, and you cannot exceed the allocated number of entries for any row.
pftype[in] Whether to allocate storage dynamically (DynamicProfile) or statically (StaticProfile).
params[in/out] Optional list of parameters. If not null, any missing parameters will be filled in with their default values.

Definition at line 180 of file Tpetra_CrsGraph_def.hpp.

template<class LocalOrdinal , class GlobalOrdinal , class Node , class LocalMatOps >
Tpetra::CrsGraph< LocalOrdinal, GlobalOrdinal, Node, LocalMatOps >::CrsGraph ( const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &  rowMap,
const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &  colMap,
const ArrayRCP< size_t > &  rowPointers,
const ArrayRCP< LocalOrdinal > &  columnIndices,
const RCP< ParameterList > &  params = null 
)

Constructor specifying column Map and arrays containing the graph in sorted, local ids.

Parameters
rowMap[in] Distribution of rows of the graph.
colMap[in] Distribution of columns of the graph.
rowPointers[in] The beginning of each row in the graph, as in a CSR "rowptr" array. The length of this vector should be equal to the number of rows in the graph, plus one. This last entry should store the nunber of nonzeros in the graph.
columnIndices[in] The local indices of the columns, as in a CSR "colind" array. The length of this vector should be equal to the number of unknowns in the graph.
params[in/out] Optional list of parameters. If not null, any missing parameters will be filled in with their default values.

Definition at line 224 of file Tpetra_CrsGraph_def.hpp.

template<class LocalOrdinal , class GlobalOrdinal , class Node , class LocalMatOps >
Tpetra::CrsGraph< LocalOrdinal, GlobalOrdinal, Node, LocalMatOps >::~CrsGraph ( )
virtual

Destructor.

Definition at line 255 of file Tpetra_CrsGraph_def.hpp.

Member Function Documentation

template<class LocalOrdinal, class GlobalOrdinal = LocalOrdinal, class Node = Kokkos::DefaultNode::DefaultNodeType, class LocalMatOps = typename Kokkos::DefaultKernels<void,LocalOrdinal,Node>::SparseOps>
template<class Node2 >
RCP<CrsGraph<LocalOrdinal, GlobalOrdinal, Node2, typename Kokkos::DefaultKernels<void, LocalOrdinal, Node2>::SparseOps> > Tpetra::CrsGraph< LocalOrdinal, GlobalOrdinal, Node, LocalMatOps >::clone ( const Teuchos::RCP< Node2 > &  node2,
const Teuchos::RCP< Teuchos::ParameterList > &  params = null 
) const
inline

Create a cloned CrsGraph for a different Node type.

This method creates a new CrsGraph on a specified Kokkos Node type, with all of the entries of this CrsGraph object.

Parameters
node2[in] Kokkos Node instance for constructing the clone CrsGraph and its constituent objects.
params[in/out] Optional list of parameters. If not null, any missing parameters will be filled in with their default values. See the list below for valid options.

Parameters accepted by this method:

  • "Static profile clone" [bool, default: true] If true, creates the clone with a static allocation profile. If false, a dynamic allocation profile is used.
  • "Locally indexed clone" [bool] If true, fills clone using this graph's column map and local indices (requires that this graph have a column map.) If false, fills clone using global indices and does not provide a column map. By default, will use local indices only if this graph is using local indices.
  • "fillComplete clone" [boolean, default: true] If true, calls fillComplete() on the cloned CrsGraph object, with parameters from params sublist "CrsGraph". The domain map and range maps passed to fillComplete() are those of the map being cloned, if they exist. Otherwise, the row map is used.

Definition at line 336 of file Tpetra_CrsGraph_decl.hpp.

template<class LocalOrdinal , class GlobalOrdinal , class Node , class LocalMatOps >
void Tpetra::CrsGraph< LocalOrdinal, GlobalOrdinal, Node, LocalMatOps >::setParameterList ( const RCP< ParameterList > &  params)

Set the given list of parameters (must be nonnull).

Definition at line 293 of file Tpetra_CrsGraph_def.hpp.

template<class LocalOrdinal , class GlobalOrdinal , class Node , class LocalMatOps >
RCP< const ParameterList > Tpetra::CrsGraph< LocalOrdinal, GlobalOrdinal, Node, LocalMatOps >::getValidParameters ( ) const
virtual

Default parameter list suitable for validation.

Reimplemented from Teuchos::ParameterListAcceptor.

Definition at line 261 of file Tpetra_CrsGraph_def.hpp.

template<class LocalOrdinal , class GlobalOrdinal , class Node , class LocalMatOps >
void Tpetra::CrsGraph< LocalOrdinal, GlobalOrdinal, Node, LocalMatOps >::insertGlobalIndices ( GlobalOrdinal  globalRow,
const ArrayView< const GlobalOrdinal > &  indices 
)

Insert global indices into the graph.

Precondition
globalRow is a valid index in the row Map. It need not be owned by the calling process.
isLocallyIndexed() == false
isStorageOptimized() == false
Postcondition
indicesAreAllocated() == true
isGloballyIndexed() == true

If globalRow does not belong to the graph on this process, then it will be communicated to the appropriate process when globalAssemble() is called. (That method will be called automatically during the next call to fillComplete().) Otherwise, the entries will be inserted into the part of the graph owned by the calling process.

If the graph row already contains entries at the indices corresponding to values in indices, then the redundant indices will be eliminated. This may happen either at insertion or during the next call to fillComplete().

Definition at line 1966 of file Tpetra_CrsGraph_def.hpp.

template<class LocalOrdinal , class GlobalOrdinal , class Node , class LocalMatOps >
void Tpetra::CrsGraph< LocalOrdinal, GlobalOrdinal, Node, LocalMatOps >::insertLocalIndices ( const LocalOrdinal  localRow,
const ArrayView< const LocalOrdinal > &  indices 
)

Insert local indices into the graph.

Precondition
localRow is a local row belonging to the graph on this process.
isGloballyIndexed() == false
isStorageOptimized() == false
hasColMap() == true
Postcondition
indicesAreAllocated() == true
isLocallyIndexed() == true
Note
If the graph row already contains entries at the indices corresponding to values in indices, then the redundant indices will be eliminated; this may happen at insertion or during the next call to fillComplete().

Definition at line 1837 of file Tpetra_CrsGraph_def.hpp.

template<class LocalOrdinal , class GlobalOrdinal , class Node , class LocalMatOps >
void Tpetra::CrsGraph< LocalOrdinal, GlobalOrdinal, Node, LocalMatOps >::removeLocalIndices ( LocalOrdinal  localRow)

Remove all graph indices from the specified local row.

Precondition
localRow is a local row of this graph.
isGloballyIndexed() == false
isStorageOptimized() == false
Postcondition
getNumEntriesInLocalRow(localRow) == 0
indicesAreAllocated() == true
isLocallyIndexed() == true

Definition at line 2109 of file Tpetra_CrsGraph_def.hpp.

template<class LocalOrdinal , class GlobalOrdinal , class Node , class LocalMatOps >
void Tpetra::CrsGraph< LocalOrdinal, GlobalOrdinal, Node, LocalMatOps >::globalAssemble ( )

Communicate non-local contributions to other processes.

Each of the methods in this group is a global collective. It is necessary to call these mehtods on all nodes participating in the communicator associated with this graph.This method is called automatically by fillComplete(). Most users do not need to call this themselves, though we do permit this.

Definition at line 2156 of file Tpetra_CrsGraph_def.hpp.

template<class LocalOrdinal , class GlobalOrdinal , class Node , class LocalMatOps >
void Tpetra::CrsGraph< LocalOrdinal, GlobalOrdinal, Node, LocalMatOps >::resumeFill ( const RCP< ParameterList > &  params = null)

Resume fill operations. After calling fillComplete(), resumeFill() must be called before initiating any changes to the graph.

resumeFill() may be called repeatedly.

Postcondition
isFillActive() == true
isFillComplete() == false

Definition at line 2443 of file Tpetra_CrsGraph_def.hpp.

template<class LocalOrdinal , class GlobalOrdinal , class Node , class LocalMatOps >
void Tpetra::CrsGraph< LocalOrdinal, GlobalOrdinal, Node, LocalMatOps >::fillComplete ( const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &  domainMap,
const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &  rangeMap,
const RCP< ParameterList > &  params = null 
)

Signal that data entry is complete, specifying domain and range maps.

Off-process indices are distributed (via globalAssemble()), indices are sorted, redundant indices are eliminated, and global indices are transformed to local indices.

Precondition
isFillActive() == true
isFillComplete()() == false
Postcondition
isFillActive() == false
isFillComplete() == true

Parameters:

Definition at line 2486 of file Tpetra_CrsGraph_def.hpp.

template<class LocalOrdinal , class GlobalOrdinal , class Node , class LocalMatOps >
void Tpetra::CrsGraph< LocalOrdinal, GlobalOrdinal, Node, LocalMatOps >::fillComplete ( const RCP< ParameterList > &  params = null)

Signal that data entry is complete.

Off-node entries are distributed (via globalAssemble()), repeated entries are summed, and global indices are transformed to local indices.

Note
This method calls fillComplete( getRowMap(), getRowMap(), os ). See parameter options there.

Definition at line 2475 of file Tpetra_CrsGraph_def.hpp.

template<class LocalOrdinal , class GlobalOrdinal , class Node , class LocalMatOps >
void Tpetra::CrsGraph< LocalOrdinal, GlobalOrdinal, Node, LocalMatOps >::expertStaticFillComplete ( const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &  domainMap,
const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &  rangeMap,
const RCP< const Import< LocalOrdinal, GlobalOrdinal, Node > > &  importer = Teuchos::null,
const RCP< const Export< LocalOrdinal, GlobalOrdinal, Node > > &  exporter = Teuchos::null,
const RCP< ParameterList > &  params = Teuchos::null 
)

Perform a fillComplete on a graph that already has data, via setAllIndices().

The graph must already have filled local 1-D storage (lclInds1D_ and rowPtrs_). If the graph has been constructed in any other way, this method will throw an exception. This routine is needed to support other Trilinos packages and should not be called by ordinary users.

Warning
This method is intended for expert developer use only, and should never be called by user code.

Definition at line 2560 of file Tpetra_CrsGraph_def.hpp.

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

Returns the communicator.

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

Definition at line 487 of file Tpetra_CrsGraph_def.hpp.

template<class LocalOrdinal , class GlobalOrdinal , class Node , class LocalMatOps >
RCP< Node > Tpetra::CrsGraph< LocalOrdinal, GlobalOrdinal, Node, LocalMatOps >::getNode ( ) const
virtual

Returns the underlying node.

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

Definition at line 348 of file Tpetra_CrsGraph_def.hpp.

template<class LocalOrdinal , class GlobalOrdinal , class Node , class LocalMatOps >
const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > & Tpetra::CrsGraph< LocalOrdinal, GlobalOrdinal, Node, LocalMatOps >::getRowMap ( ) const
virtual

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

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

Definition at line 355 of file Tpetra_CrsGraph_def.hpp.

template<class LocalOrdinal , class GlobalOrdinal , class Node , class LocalMatOps >
const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > & Tpetra::CrsGraph< LocalOrdinal, GlobalOrdinal, Node, LocalMatOps >::getColMap ( ) const
virtual

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

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

Definition at line 362 of file Tpetra_CrsGraph_def.hpp.

template<class LocalOrdinal , class GlobalOrdinal , class Node , class LocalMatOps >
const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > & Tpetra::CrsGraph< LocalOrdinal, GlobalOrdinal, Node, LocalMatOps >::getDomainMap ( ) const
virtual

Returns the Map associated with the domain of this graph.

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

Definition at line 369 of file Tpetra_CrsGraph_def.hpp.

template<class LocalOrdinal , class GlobalOrdinal , class Node , class LocalMatOps >
const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > & Tpetra::CrsGraph< LocalOrdinal, GlobalOrdinal, Node, LocalMatOps >::getRangeMap ( ) const
virtual

Returns the Map associated with the domain of this graph.

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

Definition at line 376 of file Tpetra_CrsGraph_def.hpp.

template<class LocalOrdinal , class GlobalOrdinal , class Node , class LocalMatOps >
RCP< const Import< LocalOrdinal, GlobalOrdinal, Node > > Tpetra::CrsGraph< LocalOrdinal, GlobalOrdinal, Node, LocalMatOps >::getImporter ( ) const
virtual

Returns the importer associated with this graph.

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

Definition at line 383 of file Tpetra_CrsGraph_def.hpp.

template<class LocalOrdinal , class GlobalOrdinal , class Node , class LocalMatOps >
RCP< const Export< LocalOrdinal, GlobalOrdinal, Node > > Tpetra::CrsGraph< LocalOrdinal, GlobalOrdinal, Node, LocalMatOps >::getExporter ( ) const
virtual

Returns the exporter associated with this graph.

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

Definition at line 390 of file Tpetra_CrsGraph_def.hpp.

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

Returns the number of global rows in the graph.

Undefined if isFillActive().

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

Definition at line 301 of file Tpetra_CrsGraph_def.hpp.

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

Returns the number of global columns in the graph.

Returns the number of entries in the domain map of the matrix. Undefined if isFillActive().

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

Definition at line 307 of file Tpetra_CrsGraph_def.hpp.

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

Returns the number of graph rows owned on the calling node.

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

Definition at line 318 of file Tpetra_CrsGraph_def.hpp.

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

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

Throws std::runtime_error if hasColMap() == false

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

Definition at line 324 of file Tpetra_CrsGraph_def.hpp.

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

Returns the index base for global indices for this graph.

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

Definition at line 493 of file Tpetra_CrsGraph_def.hpp.

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

Returns the global number of entries in the graph.

Undefined if isFillActive().

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

Definition at line 420 of file Tpetra_CrsGraph_def.hpp.

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

Returns the local number of entries in the graph.

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

Definition at line 426 of file Tpetra_CrsGraph_def.hpp.

template<class LocalOrdinal , class GlobalOrdinal , class Node , class LocalMatOps >
size_t Tpetra::CrsGraph< LocalOrdinal, GlobalOrdinal, Node, LocalMatOps >::getNumEntriesInGlobalRow ( GlobalOrdinal  globalRow) const
virtual

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

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

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

Definition at line 1622 of file Tpetra_CrsGraph_def.hpp.

template<class LocalOrdinal , class GlobalOrdinal , class Node , class LocalMatOps >
size_t Tpetra::CrsGraph< LocalOrdinal, GlobalOrdinal, Node, LocalMatOps >::getNumEntriesInLocalRow ( LocalOrdinal  localRow) const
virtual

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

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

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

Definition at line 1638 of file Tpetra_CrsGraph_def.hpp.

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

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 OrdinalTraits<size_t>::invalid().

Definition at line 480 of file Tpetra_CrsGraph_def.hpp.

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

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 1652 of file Tpetra_CrsGraph_def.hpp.

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

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 1668 of file Tpetra_CrsGraph_def.hpp.

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

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

Undefined if isFillActive().

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

Definition at line 341 of file Tpetra_CrsGraph_def.hpp.

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

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

Undefined if isFillActive().

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

Definition at line 335 of file Tpetra_CrsGraph_def.hpp.

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

Maximum number of entries in all rows over all processes.

Note
Undefined if isFillActive().
This is the same as the result of a global maximum of getNodeMaxNumRowEntries() over all processes. That may not necessarily mean what you think it does if some rows of the matrix are owned by multiple processes. In particular, some processes might only own some of the entries in a particular row. This method only counts the number of entries in each row that a process owns, not the total number of entries in the row over all processes.

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

Definition at line 432 of file Tpetra_CrsGraph_def.hpp.

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

Maximum number of entries in all rows owned by the calling process.

Undefined if isFillActive().

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

Definition at line 438 of file Tpetra_CrsGraph_def.hpp.

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

Whether the graph has a column Map.

A CrsGraph has a column Map either because it was given to its constructor, or because it was constructed in fillComplete(). Calling fillComplete() always makes a column Map if the graph does not already have one.

A column Map lets the graph

  • use local indices for storing entries in each row, and
  • compute an Import from the domain Map to the column Map.

The latter is mainly useful for a graph associated with a CrsMatrix.

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

Definition at line 396 of file Tpetra_CrsGraph_def.hpp.

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

Whether the graph is locally lower triangular.

Precondition
! isFillActive(). If fill is active, this method's behavior is undefined.
Note
This is entirely a local property. That means this method may return different results on different processes.

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

Definition at line 462 of file Tpetra_CrsGraph_def.hpp.

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

Whether the graph is locally upper triangular.

Precondition
! isFillActive(). If fill is active, this method's behavior is undefined.
Note
This is entirely a local property. That means this method may return different results on different processes.

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

Definition at line 456 of file Tpetra_CrsGraph_def.hpp.

template<class LocalOrdinal , class GlobalOrdinal , class Node , class LocalMatOps >
bool Tpetra::CrsGraph< LocalOrdinal, GlobalOrdinal, Node, LocalMatOps >::isLocallyIndexed ( ) const
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 468 of file Tpetra_CrsGraph_def.hpp.

template<class LocalOrdinal , class GlobalOrdinal , class Node , class LocalMatOps >
bool Tpetra::CrsGraph< LocalOrdinal, GlobalOrdinal, Node, LocalMatOps >::isGloballyIndexed ( ) const
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 474 of file Tpetra_CrsGraph_def.hpp.

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

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

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

Definition at line 444 of file Tpetra_CrsGraph_def.hpp.

template<class LocalOrdinal , class GlobalOrdinal , class Node , class LocalMatOps >
bool Tpetra::CrsGraph< LocalOrdinal, GlobalOrdinal, Node, LocalMatOps >::isFillActive ( ) const

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

Definition at line 450 of file Tpetra_CrsGraph_def.hpp.

template<class LocalOrdinal , class GlobalOrdinal , class Node , class LocalMatOps >
bool Tpetra::CrsGraph< LocalOrdinal, GlobalOrdinal, Node, LocalMatOps >::isSorted ( ) const

Indicates whether the graph indices in all rows are known to be sorted.

A fill-complete graph is always sorted, as is a newly constructed graph. A graph is sorted immediately after calling resumeFill(), but any changes to the graph may result in the sorting status becoming unknown (and therefore, presumed unsorted.)

Definition at line 517 of file Tpetra_CrsGraph_def.hpp.

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

Returns true if storage has been optimized.

Optimized storage means that the allocation of each row is equal to the number of entries. The effect is that a pass through the matrix, i.e., during a mat-vec, requires minimal memory traffic. One limitation of optimized storage is that no new indices can be added to the graph.

Definition at line 402 of file Tpetra_CrsGraph_def.hpp.

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

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

Definition at line 414 of file Tpetra_CrsGraph_def.hpp.

template<class LocalOrdinal , class GlobalOrdinal , class Node , class LocalMatOps >
void Tpetra::CrsGraph< LocalOrdinal, GlobalOrdinal, Node, LocalMatOps >::getGlobalRowCopy ( GlobalOrdinal  GlobalRow,
const ArrayView< GlobalOrdinal > &  Indices,
size_t &  NumIndices 
) const
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 OrdinalTraits<size_t>::invalid().

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

Definition at line 1741 of file Tpetra_CrsGraph_def.hpp.

template<class LocalOrdinal , class GlobalOrdinal , class Node , class LocalMatOps >
void Tpetra::CrsGraph< LocalOrdinal, GlobalOrdinal, Node, LocalMatOps >::getLocalRowCopy ( LocalOrdinal  LocalRow,
const ArrayView< LocalOrdinal > &  indices,
size_t &  NumIndices 
) const
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 OrdinalTraits<size_t>::invalid().

Precondition
isLocallyIndexed()==true or hasColMap() == true

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

Definition at line 1700 of file Tpetra_CrsGraph_def.hpp.

template<class LocalOrdinal , class GlobalOrdinal , class Node , class LocalMatOps >
void Tpetra::CrsGraph< LocalOrdinal, GlobalOrdinal, Node, LocalMatOps >::getGlobalRowView ( GlobalOrdinal  GlobalRow,
ArrayView< const GlobalOrdinal > &  Indices 
) const

Extract a const, non-persisting view of global indices in a specified row of the graph.

Parameters
GlobalRow- (In) Global row number for which indices are desired.
Indices- (Out) Global column indices corresponding to values.
Precondition
isLocallyIndexed() == false
Postcondition
indices.size() == getNumEntriesInGlobalRow(GlobalRow)

Note: If GlobalRow does not belong to this node, then indices is set to null.

Definition at line 1794 of file Tpetra_CrsGraph_def.hpp.

template<class LocalOrdinal , class GlobalOrdinal , class Node , class LocalMatOps >
void Tpetra::CrsGraph< LocalOrdinal, GlobalOrdinal, Node, LocalMatOps >::getLocalRowView ( LocalOrdinal  LocalRow,
ArrayView< const LocalOrdinal > &  indices 
) const

Extract a const, non-persisting view of local indices in a specified row of the graph.

Parameters
LocalRow- (In) Local row number for which indices are desired.
Indices- (Out) Global column indices corresponding to values.
Precondition
isGloballyIndexed() == false
Postcondition
indices.size() == getNumEntriesInLocalRow(LocalRow)

Note: If LocalRow does not belong to this node, then indices is set to null.

Definition at line 1771 of file Tpetra_CrsGraph_def.hpp.

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

Return a simple one-line description of this object.

Reimplemented from Tpetra::DistObject< GlobalOrdinal, LocalOrdinal, GlobalOrdinal, Node >.

Definition at line 3394 of file Tpetra_CrsGraph_def.hpp.

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

Definition at line 3417 of file Tpetra_CrsGraph_def.hpp.

template<class LocalOrdinal , class GlobalOrdinal , class Node , class LocalMatOps >
bool Tpetra::CrsGraph< LocalOrdinal, GlobalOrdinal, Node, LocalMatOps >::checkSizes ( const SrcDistObject &  source)
virtual

Compare the source and target (this) objects for compatibility.

Returns
True if they are compatible, else false.

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

Definition at line 3534 of file Tpetra_CrsGraph_def.hpp.

template<class LocalOrdinal , class GlobalOrdinal , class Node , class LocalMatOps >
void Tpetra::CrsGraph< LocalOrdinal, GlobalOrdinal, Node, LocalMatOps >::copyAndPermute ( const SrcDistObject &  source,
size_t  numSameIDs,
const Teuchos::ArrayView< const LocalOrdinal > &  permuteToLIDs,
const Teuchos::ArrayView< const LocalOrdinal > &  permuteFromLIDs 
)
virtual

Perform copies and permutations that are local to this process.

Parameters
source[in] On entry, the source object, from which we are distributing. We distribute to the destination object, which is *this object.
numSameIDs[in] The umber of elements that are the same on the source and destination (this) objects. These elements are owned by the same process in both the source and destination objects. No permutation occurs.
numPermuteIDs[in] The number of elements that are locally permuted between the source and destination objects.
permuteToLIDs[in] List of the elements that are permuted. They are listed by their LID in the destination object.
permuteFromLIDs[in] List of the elements that are permuted. They are listed by their LID in the source object.

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

Definition at line 3548 of file Tpetra_CrsGraph_def.hpp.

template<class LocalOrdinal , class GlobalOrdinal , class Node , class LocalMatOps >
void Tpetra::CrsGraph< LocalOrdinal, GlobalOrdinal, Node, LocalMatOps >::packAndPrepare ( const SrcDistObject &  source,
const Teuchos::ArrayView< const LocalOrdinal > &  exportLIDs,
Teuchos::Array< GlobalOrdinal > &  exports,
const Teuchos::ArrayView< size_t > &  numPacketsPerLID,
size_t &  constantNumPackets,
Distributor &  distor 
)
virtual

Perform any packing or preparation required for communication.

Parameters
source[in] Source object for the redistribution.
exportLIDs[in] List of the entries (as local IDs in the source object) we will be sending to other images.
exports[out] On exit, the buffer for data to send.
numPacketsPerLID[out] On exit, the implementation of this method must do one of two things: set numPacketsPerLID[i] to contain the number of packets to be exported for exportLIDs[i] and set constantNumPackets to zero, or set constantNumPackets to a nonzero value. If the latter, the implementation need not fill numPacketsPerLID.
constantNumPackets[out] On exit, 0 if numPacketsPerLID has variable contents (different size for each LID). If nonzero, then it is expected that the number of packets per LID is constant, and that constantNumPackets is that value.
distor[in] The Distributor object we are using.

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

Definition at line 3607 of file Tpetra_CrsGraph_def.hpp.

template<class LocalOrdinal , class GlobalOrdinal , class Node , class LocalMatOps >
void Tpetra::CrsGraph< LocalOrdinal, GlobalOrdinal, Node, LocalMatOps >::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 
)
virtual

Perform any unpacking and combining after communication.

Parameters
importLIDs[in] List of the entries (as LIDs in the destination object) we received from other images.
imports[in] Buffer containing data we received.
numPacketsPerLID[in] If constantNumPackets is zero, then 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. If zero, then numPacketsPerLID[i] is the number of packets imported for importLIDs[i].
distor[in] The Distributor object we are using.
CM[in] The combine mode to use when combining the imported entries with existing entries.

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

Definition at line 3664 of file Tpetra_CrsGraph_def.hpp.

template<class LocalOrdinal , class GlobalOrdinal , class Node , class LocalMatOps >
void Tpetra::CrsGraph< LocalOrdinal, GlobalOrdinal, Node, LocalMatOps >::setAllIndices ( const ArrayRCP< size_t > &  rowPointers,
const ArrayRCP< LocalOrdinal > &  columnIndices 
)

Set the graph's data directly, using 1-D storage.

Precondition
hasColMap() == true
rowPointers.size() != getNodeNumRows()+1
No insert routines have been called.
Warning
This method is intended for expert developer use only, and should never be called by user code.

Definition at line 2135 of file Tpetra_CrsGraph_def.hpp.

template<class LocalOrdinal , class GlobalOrdinal , class Node , class LocalMatOps >
ArrayRCP< const size_t > Tpetra::CrsGraph< LocalOrdinal, GlobalOrdinal, Node, LocalMatOps >::getNodeRowPtrs ( ) const

Get an ArrayRCP of the row-offsets.

The returned buffer exists in host-memory. This method may return Teuchos::null if "Delete Row Pointers" was true on fillComplete().

Definition at line 1682 of file Tpetra_CrsGraph_def.hpp.

template<class LocalOrdinal , class GlobalOrdinal , class Node , class LocalMatOps >
ArrayRCP< const LocalOrdinal > Tpetra::CrsGraph< LocalOrdinal, GlobalOrdinal, Node, LocalMatOps >::getNodePackedIndices ( ) const

Get an ArrayRCP of the packed column-indices.

The returned buffer exists in host-memory.

Definition at line 1691 of file Tpetra_CrsGraph_def.hpp.

template<class LocalOrdinal , class GlobalOrdinal , class Node , class LocalMatOps >
void Tpetra::CrsGraph< LocalOrdinal, GlobalOrdinal, Node, LocalMatOps >::replaceDomainMapAndImporter ( const Teuchos::RCP< const map_type > &  newDomainMap,
Teuchos::RCP< const Tpetra::Import< LocalOrdinal, GlobalOrdinal, Node > > &  newImporter 
)

Replace the current domain Map and Import with the given parameters.

Warning
This method is ONLY for use by experts.
We make NO promises of backwards compatibility. This method may change or disappear at any time.
Precondition
isFillComplete() == true
isFillActive() == false
Either the given Import object is null, or the target Map of the given Import is the same as this graph's column Map.
Either the given Import object is null, or the source Map of the given Import is the same as this graph's domain Map.

Definition at line 2699 of file Tpetra_CrsGraph_def.hpp.

template<class LocalOrdinal , class GlobalOrdinal , class Node , class LocalMatOps >
void Tpetra::CrsGraph< LocalOrdinal, GlobalOrdinal, Node, LocalMatOps >::removeEmptyProcessesInPlace ( const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &  newMap)
virtual

Remove processes owning zero rows from the Maps and their communicator.

Warning
This method is ONLY for use by experts. We highly recommend using the nonmember function of the same name defined in Tpetra_DistObject_decl.hpp.
We make NO promises of backwards compatibility. This method may change or disappear at any time.
Parameters
newMap[in] This must be the result of calling the removeEmptyProcesses() method on the row Map. If it is not, this method's behavior is undefined. This pointer will be null on excluded processes.

This method satisfies the strong exception guarantee, as long the destructors of Export, Import, and Map do not throw exceptions. This means that either the method returns normally (without throwing an exception), or there are no externally visible side effects. However, this does not guarantee no deadlock when the graph's original communicator contains more than one process. In order to prevent deadlock, you must still wrap this call in a try/catch block and do an all-reduce over all processes in the original communicator to test whether the call succeeded. This safety measure should usually be unnecessary, since the method call should only fail on user error or failure to allocate memory.

Reimplemented from Tpetra::DistObject< GlobalOrdinal, LocalOrdinal, GlobalOrdinal, Node >.

Definition at line 3714 of file Tpetra_CrsGraph_def.hpp.

template<class LocalOrdinal , class GlobalOrdinal , class Node , class LocalMatOps >
void Tpetra::CrsGraph< LocalOrdinal, GlobalOrdinal, Node, LocalMatOps >::computeIndexState ( )
protected

Set collectively whether the graph uses global or local indices.

If at least one process has set local indices, set all the processes to use local indices. Likewise, if at least one process has set global indices, set all the processes to use global indices.

Note
To developers: See this method's internal comments.

Definition at line 2948 of file Tpetra_CrsGraph_def.hpp.

template<class LocalOrdinal , class GlobalOrdinal , class Node , class LocalMatOps >
void Tpetra::CrsGraph< LocalOrdinal, GlobalOrdinal, Node, LocalMatOps >::makeColMap ( )
protected

Make the column Map.

Definition at line 3056 of file Tpetra_CrsGraph_def.hpp.

template<class LocalOrdinal , class GlobalOrdinal , class Node , class LocalMatOps >
size_t Tpetra::CrsGraph< LocalOrdinal, GlobalOrdinal, Node, LocalMatOps >::insertIndices ( const RowInfo &  rowInfo,
const SLocalGlobalViews &  newInds,
const ELocalGlobal  lg,
const ELocalGlobal  I 
)
protected

Insert indices into the given row.

Precondition
! (lg == LocalIndices && I == GlobalIndices). It does not make sense to give this method local column indices (meaning that the graph has a column Map), yet to ask it to store global indices.
Parameters
rowInfo[in] Result of CrsGraph's getRowInfo() or updateAllocAndValues() methods, for the locally owned row (whose local index is rowInfo.localRow) for which you want to insert indices.
newInds[in] View of the column indices to insert. If lg == GlobalIndices, then newInds.ginds, a Teuchos::ArrayView<const GlobalOrdinal>, contains the (global) column indices to insert. Otherwise, if lg == LocalIndices, then newInds.linds, a Teuchos::ArrayView<const LocalOrdinal>, contains the (local) column indices to insert.
lgIf lg == GlobalIndices, then the input indices (in newInds) are global indices. Otherwise, if lg == LocalIndices, the input indices are local indices.
IIf lg == GlobalIndices, then this method will store the input indices as global indices. Otherwise, if I == LocalIndices, this method will store the input indices as local indices.

Definition at line 1041 of file Tpetra_CrsGraph_def.hpp.

template<class LocalOrdinal , class GlobalOrdinal , class Node , class LocalMatOps >
template<class Scalar >
void Tpetra::CrsGraph< LocalOrdinal, GlobalOrdinal, Node, LocalMatOps >::insertIndicesAndValues ( const RowInfo &  rowInfo,
const SLocalGlobalViews &  newInds,
const ArrayView< Scalar > &  oldRowVals,
const ArrayView< const Scalar > &  newRowVals,
const ELocalGlobal  lg,
const ELocalGlobal  I 
)
protected

Insert indices and their values into the given row.

Template Parameters
ScalarThe type of a single value. When this method is called by CrsMatrix, Scalar corresponds to the first template parameter of CrsMatrix.
Precondition
! (lg == LocalIndices && I == GlobalIndices). It does not make sense to give this method local column indices (meaning that the graph has a column Map), yet to ask it to store global indices.
Parameters
rowInfo[in] Result of CrsGraph's getRowInfo() or updateAllocAndValues() methods, for the locally owned row (whose local index is rowInfo.localRow) for which you want to insert indices.
newInds[in] View of the column indices to insert. If lg == GlobalIndices, then newInds.ginds, a Teuchos::ArrayView<const GlobalOrdinal>, contains the (global) column indices to insert. Otherwise, if lg == LocalIndices, then newInds.linds, a Teuchos::ArrayView<const LocalOrdinal>, contains the (local) column indices to insert.
oldRowVals[out] View of the current values. They will be overwritten with the new values.
newRowVals[in] View of the new values. They will be copied over the old values.
lgIf lg == GlobalIndices, then the input indices (in newInds) are global indices. Otherwise, if lg == LocalIndices, the input indices are local indices.
IIf lg == GlobalIndices, then this method will store the input indices as global indices. Otherwise, if I == LocalIndices, this method will store the input indices as local indices.

Definition at line 1188 of file Tpetra_CrsGraph_def.hpp.

template<class LocalOrdinal , class GlobalOrdinal , class Node , class LocalMatOps >
void Tpetra::CrsGraph< LocalOrdinal, GlobalOrdinal, Node, LocalMatOps >::insertLocalIndicesFiltered ( const LocalOrdinal  localRow,
const ArrayView< const LocalOrdinal > &  indices 
)
protected

Like insertLocalIndices(), but with column Map filtering.

Definition at line 1913 of file Tpetra_CrsGraph_def.hpp.

template<class LocalOrdinal , class GlobalOrdinal , class Node , class LocalMatOps >
void Tpetra::CrsGraph< LocalOrdinal, GlobalOrdinal, Node, LocalMatOps >::insertGlobalIndicesFiltered ( const GlobalOrdinal  localRow,
const ArrayView< const GlobalOrdinal > &  indices 
)
protected

Like insertGlobalIndices(), but with column Map filtering.

Definition at line 2049 of file Tpetra_CrsGraph_def.hpp.

template<class LocalOrdinal , class GlobalOrdinal , class Node , class LocalMatOps >
template<class Scalar , class BinaryFunction >
void Tpetra::CrsGraph< LocalOrdinal, GlobalOrdinal, Node, LocalMatOps >::transformLocalValues ( RowInfo  rowInfo,
const Teuchos::ArrayView< Scalar > &  rowVals,
const Teuchos::ArrayView< const LocalOrdinal > &  inds,
const Teuchos::ArrayView< const Scalar > &  newVals,
BinaryFunction  f 
) const
protected

Transform the given values using local indices.

Parameters
rowInfo[in] Information about a given row of the graph.
rowVals[in/out] The values to be transformed. They correspond to the row indicated by rowInfo.
inds[in] The (local) indices in the row, for which to transform the corresponding values in rowVals.
newVals[in] Values to use for transforming rowVals. It's probably OK for these to alias rowVals.
f[in] A binary function used to transform rowVals.

This method transforms the values using the expression

newVals[k] = f( rowVals[k], newVals[j] );

where k is the local index corresponding to inds[j]. It ignores elements of inds that are not owned by the calling process.

Definition at line 1208 of file Tpetra_CrsGraph_def.hpp.

template<class LocalOrdinal , class GlobalOrdinal , class Node , class LocalMatOps >
template<class Scalar , class BinaryFunction >
void Tpetra::CrsGraph< LocalOrdinal, GlobalOrdinal, Node, LocalMatOps >::transformGlobalValues ( RowInfo  rowInfo,
const Teuchos::ArrayView< Scalar > &  rowVals,
const Teuchos::ArrayView< const GlobalOrdinal > &  inds,
const Teuchos::ArrayView< const Scalar > &  newVals,
BinaryFunction  f 
) const
protected

Transform the given values using global indices.

Parameters
rowInfo[in] Information about a given row of the graph.
rowVals[in/out] The values to be transformed. They correspond to the row indicated by rowInfo.
inds[in] The (global) indices in the row, for which to transform the corresponding values in rowVals.
newVals[in] Values to use for transforming rowVals. It's probably OK for these to alias rowVals.
f[in] A binary function used to transform rowVals.

Definition at line 1238 of file Tpetra_CrsGraph_def.hpp.

template<class LocalOrdinal , class GlobalOrdinal , class Node , class LocalMatOps >
bool Tpetra::CrsGraph< LocalOrdinal, GlobalOrdinal, Node, LocalMatOps >::isMerged ( ) const
protected

Whether duplicate column indices in each row have been merged.

Definition at line 526 of file Tpetra_CrsGraph_def.hpp.

template<class LocalOrdinal , class GlobalOrdinal , class Node , class LocalMatOps >
void Tpetra::CrsGraph< LocalOrdinal, GlobalOrdinal, Node, LocalMatOps >::setLocallyModified ( )
protected

Report that we made a local modification to its structure.

Call this after making a local change to the graph's structure. Changing the structure locally invalidates the "is sorted" and "is merged" states.

Definition at line 534 of file Tpetra_CrsGraph_def.hpp.

template<class LocalOrdinal , class GlobalOrdinal , class Node , class LocalMatOps >
void Tpetra::CrsGraph< LocalOrdinal, GlobalOrdinal, Node, LocalMatOps >::sortAllIndices ( )
protected

Sort the column indices in all the rows.

Definition at line 3039 of file Tpetra_CrsGraph_def.hpp.

template<class LocalOrdinal , class GlobalOrdinal , class Node , class LocalMatOps >
void Tpetra::CrsGraph< LocalOrdinal, GlobalOrdinal, Node, LocalMatOps >::sortRowIndices ( RowInfo  rowinfo)
protected

Sort the column indices in the given row.

Definition at line 1262 of file Tpetra_CrsGraph_def.hpp.

template<class LocalOrdinal , class GlobalOrdinal , class Node , class LocalMatOps >
template<class Scalar >
void Tpetra::CrsGraph< LocalOrdinal, GlobalOrdinal, Node, LocalMatOps >::sortRowIndicesAndValues ( RowInfo  rowinfo,
ArrayView< Scalar >  values 
)
protected

Sort the column indices and their values in the given row.

Template Parameters
ScalarThe type of the values. When calling this method from CrsMatrix, this should be the same as the Scalar template parameter of CrsMatrix.
Parameters
rowinfo[in] Result of getRowInfo() for the row.
values[in/out] On input: values for the given row. If indices is an array of the column indices in the row, then values and indices should have the same number of entries, and indices[k] should be the column index corresponding to values[k]. On output: the same values, but sorted in the same order as the (now sorted) column indices in the row.

Definition at line 1276 of file Tpetra_CrsGraph_def.hpp.

template<class LocalOrdinal , class GlobalOrdinal , class Node , class LocalMatOps >
void Tpetra::CrsGraph< LocalOrdinal, GlobalOrdinal, Node, LocalMatOps >::mergeAllIndices ( )
protected

Merge duplicate row indices in all of the rows.

Precondition
The graph is locally indexed: isGloballyIndexed() == false.
The graph has not already been merged: isMerged() == false. That is, this function would normally only be called after calling sortIndices().

Definition at line 3329 of file Tpetra_CrsGraph_def.hpp.

template<class LocalOrdinal , class GlobalOrdinal , class Node , class LocalMatOps >
void Tpetra::CrsGraph< LocalOrdinal, GlobalOrdinal, Node, LocalMatOps >::mergeRowIndices ( RowInfo  rowinfo)
protected

Merge duplicate row indices in the given row.

Precondition
The graph is not already storage optimized: isStorageOptimized() == false

Definition at line 1288 of file Tpetra_CrsGraph_def.hpp.

template<class LocalOrdinal , class GlobalOrdinal , class Node , class LocalMatOps >
template<class Scalar >
void Tpetra::CrsGraph< LocalOrdinal, GlobalOrdinal, Node, LocalMatOps >::mergeRowIndicesAndValues ( RowInfo  rowinfo,
const Teuchos::ArrayView< Scalar > &  rowValues 
)
protected

Merge duplicate row indices in the given row, along with their corresponding values.

This method is only called by CrsMatrix, for a CrsMatrix whose graph is this CrsGraph instance. It is only called when the matrix owns the graph, not when the matrix was constructed with a const graph.

Precondition
The graph is not already storage optimized: isStorageOptimized() == false

Definition at line 1316 of file Tpetra_CrsGraph_def.hpp.

template<class LocalOrdinal , class GlobalOrdinal , class Node , class LocalMatOps >
void Tpetra::CrsGraph< LocalOrdinal, GlobalOrdinal, Node, LocalMatOps >::setDomainRangeMaps ( const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &  domainMap,
const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &  rangeMap 
)
protected

Set the domain and range Maps, and invalidate the Import and/or Export objects if necessary.

If the domain Map has changed, invalidate the Import object (if there is one). Likewise, if the range Map has changed, invalidate the Export object (if there is one).

Parameters
domainMap[in] The new domain Map
rangeMap[in] The new range Map

Definition at line 1375 of file Tpetra_CrsGraph_def.hpp.

template<class LocalOrdinal , class GlobalOrdinal , class Node , class LocalMatOps >
size_t Tpetra::CrsGraph< LocalOrdinal, GlobalOrdinal, Node, LocalMatOps >::findLocalIndex ( RowInfo  rowinfo,
LocalOrdinal  ind,
size_t  hint = 0 
) const
protected

Find the column offset corresponding to the given (local) column index.

The name of this method is a bit misleading. It does not actually find the column index. Instead, it takes a local column index ind, and returns the corresponding offset into the raw array of column indices (whether that be 1-D or 2-D storage).

Parameters
rowinfo[in] Result of getRowInfo() for the given row.
ind[in] (Local) column index for which to find the offset.
hint[in] Hint for where to find ind in the column indices for the given row. If colInds is the ArrayView of the (local) column indices for the given row, and if colInds[hint] == ind, then the hint is correct. The hint is ignored if it is out of range (that is, greater than or equal to the number of entries in the given row).

The hint optimizes for the case of calling this method several times with the same row (as it would be in transformLocalValues) when several index inputs occur in consecutive sequence. This may occur (for example) when there are multiple degrees of freedom per mesh point, and users are handling the assignment of degrees of freedom to global indices manually (rather than letting BlockMap take care of it). In that case, users might choose to assign the degrees of freedom for a mesh point to consecutive global indices. Epetra implements the hint for this reason.

The hint only costs two comparisons (one to check range, and the other to see if the hint was correct), and it can save searching for the indices (which may take a lot more than two comparisons).

Definition at line 1395 of file Tpetra_CrsGraph_def.hpp.

template<class LocalOrdinal , class GlobalOrdinal , class Node , class LocalMatOps >
size_t Tpetra::CrsGraph< LocalOrdinal, GlobalOrdinal, Node, LocalMatOps >::findLocalIndex ( RowInfo  rowinfo,
LocalOrdinal  ind,
ArrayView< const LocalOrdinal >  colInds,
size_t  hint = 0 
) const
protected

Find the column offset corresponding to the given (local) column index, given a view of the (local) column indices.

The name of this method is a bit misleading. It does not actually find the column index. Instead, it takes a local column index ind, and returns the corresponding offset into the raw array of column indices (whether that be 1-D or 2-D storage).

It is best to use this method if you plan to call it several times for the same row, like in transformLocalValues(). In that case, it amortizes the overhead of calling getLocalView().

Parameters
rowinfo[in] Result of getRowInfo() for the given row.
ind[in] (Local) column index for which to find the offset.
colInds[in] View of all the (local) column indices for the given row.
hint[in] Hint for where to find ind in the column indices for the given row. If colInds is the ArrayView of the (local) column indices for the given row, and if colInds[hint] == ind, then the hint is correct. The hint is ignored if it is out of range (that is, greater than or equal to the number of entries in the given row).

See the documentation of the three-argument version of this method for an explanation and justification of the hint.

Definition at line 1410 of file Tpetra_CrsGraph_def.hpp.

template<class LocalOrdinal , class GlobalOrdinal , class Node , class LocalMatOps >
size_t Tpetra::CrsGraph< LocalOrdinal, GlobalOrdinal, Node, LocalMatOps >::findGlobalIndex ( RowInfo  rowinfo,
GlobalOrdinal  ind,
size_t  hint = 0 
) const
protected

Find the column offset corresponding to the given (global) column index.

The name of this method is a bit misleading. It does not actually find the column index. Instead, it takes a global column index ind, and returns the corresponding offset into the raw array of column indices (whether that be 1-D or 2-D storage).

Definition at line 1463 of file Tpetra_CrsGraph_def.hpp.

void Tpetra::DistObject< GlobalOrdinal , LocalOrdinal, GlobalOrdinal, Node >::doImport ( const SrcDistObject< GlobalOrdinal, LocalOrdinal, GlobalOrdinal, Node > &  source,
const Import< LocalOrdinal, GlobalOrdinal, Node > &  importer,
CombineMode  CM 
)
inherited

Import data into this object using an Import object ("forward mode").

The input DistObject is always the source of the data redistribution operation, and the *this object is always the target.

If you don't know the difference between forward and reverse mode, then you probably want forward mode. Use this method with your precomputed Import object if you want to do an Import, else use doExport() with a precomputed Export object.

Parameters
source[in] The "source" object for redistribution.
importer[in] Precomputed data redistribution plan. Its source Map must be the same as the input DistObject's Map, and its target Map must be the same as this->getMap().
CM[in] How to combine incoming data with the same global index.
void Tpetra::DistObject< GlobalOrdinal , LocalOrdinal, GlobalOrdinal, Node >::doImport ( const SrcDistObject< GlobalOrdinal, LocalOrdinal, GlobalOrdinal, Node > &  source,
const Export< LocalOrdinal, GlobalOrdinal, Node > &  exporter,
CombineMode  CM 
)
inherited

Import data into this object using an Export object ("reverse mode").

The input DistObject is always the source of the data redistribution operation, and the *this object is always the target.

If you don't know the difference between forward and reverse mode, then you probably want forward mode. Use the version of doImport() that takes a precomputed Import object in that case.

Parameters
source[in] The "source" object for redistribution.
exporter[in] Precomputed data redistribution plan. Its target Map must be the same as the input DistObject's Map, and its source Map must be the same as this->getMap(). (Note the difference from forward mode.)
CM[in] How to combine incoming data with the same global index.
void Tpetra::DistObject< GlobalOrdinal , LocalOrdinal, GlobalOrdinal, Node >::doExport ( const SrcDistObject< GlobalOrdinal, LocalOrdinal, GlobalOrdinal, Node > &  source,
const Export< LocalOrdinal, GlobalOrdinal, Node > &  exporter,
CombineMode  CM 
)
inherited

Export data into this object using an Export object ("forward mode").

The input DistObject is always the source of the data redistribution operation, and the *this object is always the target.

If you don't know the difference between forward and reverse mode, then you probably want forward mode. Use this method with your precomputed Export object if you want to do an Export, else use doImport() with a precomputed Import object.

Parameters
source[in] The "source" object for redistribution.
exporter[in] Precomputed data redistribution plan. Its source Map must be the same as the input DistObject's Map, and its target Map must be the same as this->getMap().
CM[in] How to combine incoming data with the same global index.
void Tpetra::DistObject< GlobalOrdinal , LocalOrdinal, GlobalOrdinal, Node >::doExport ( const SrcDistObject< GlobalOrdinal, LocalOrdinal, GlobalOrdinal, Node > &  source,
const Import< LocalOrdinal, GlobalOrdinal, Node > &  importer,
CombineMode  CM 
)
inherited

Export data into this object using an Import object ("reverse mode").

The input DistObject is always the source of the data redistribution operation, and the *this object is always the target.

If you don't know the difference between forward and reverse mode, then you probably want forward mode. Use the version of doExport() that takes a precomputed Export object in that case.

Parameters
source[in] The "source" object for redistribution.
importer[in] Precomputed data redistribution plan. Its target Map must be the same as the input DistObject's Map, and its source Map must be the same as this->getMap(). (Note the difference from forward mode.)
CM[in] How to combine incoming data with the same global index.
bool Tpetra::DistObject< GlobalOrdinal , LocalOrdinal, GlobalOrdinal, Node >::isDistributed ( ) const
inherited

Whether this is a globally distributed object.

For a definition of "globally distributed" (and its opposite, "locally replicated"), see the documentation of Map's isDistributed() method.

const Teuchos::RCP<const Map<LocalOrdinal,GlobalOrdinal,Node> >& Tpetra::DistObject< GlobalOrdinal , LocalOrdinal, GlobalOrdinal, Node >::getMap ( ) const
inlineinherited

The Map describing the parallel distribution of this object.

Note that some Tpetra objects might be distributed using multiple Map objects. For example, CrsMatrix has both a row Map and a column Map. It is up to the subclass to decide which Map to use when invoking the DistObject constructor. (CrsMatrix uses the row Map.)

Definition at line 317 of file Tpetra_DistObject_decl.hpp.

void Tpetra::DistObject< GlobalOrdinal , LocalOrdinal, GlobalOrdinal, Node >::print ( std::ostream &  os) const
inherited

Print this object to the given output stream.

We generally assume that all MPI processes can print to the given stream.

virtual size_t Tpetra::DistObject< GlobalOrdinal , LocalOrdinal, GlobalOrdinal, Node >::constantNumberOfPackets ( ) const
protectedvirtualinherited

Whether the implementation's instance promises always to have a constant number of packets per LID, and if so, how many packets per LID there are.

If this method returns zero, the instance says that it might possibly have a different number of packets for each LID to send or receive. If it returns nonzero, the instance promises that the number of packets is the same for all LIDs, and that the return value is this number of packets per LID.

The default implementation of this method returns zero. This does not affect the behavior of doTransfer() in any way. If a nondefault implementation returns nonzero, doTransfer() will use this information to avoid unnecessary allocation and / or resizing of arrays.

virtual void Tpetra::DistObject< GlobalOrdinal , LocalOrdinal, GlobalOrdinal, Node >::doTransfer ( const SrcDistObject< GlobalOrdinal, LocalOrdinal, GlobalOrdinal, Node > &  src,
CombineMode  CM,
size_t  numSameIDs,
const Teuchos::ArrayView< const LocalOrdinal > &  permuteToLIDs,
const Teuchos::ArrayView< const LocalOrdinal > &  permuteFromLIDs,
const Teuchos::ArrayView< const LocalOrdinal > &  remoteLIDs,
const Teuchos::ArrayView< const LocalOrdinal > &  exportLIDs,
Distributor &  distor,
ReverseOption  revOp 
)
protectedvirtualinherited

Redistribute data across memory images.

Parameters
src[in] The source object, to redistribute into the target object, which is *this object.
CM[in] The combine mode that describes how to combine values that map to the same global ID on the same process.
permuteToLIDs[in] See copyAndPermute().
permuteFromLIDs[in] See copyAndPermute().
remoteLIDs[in] List of entries (as local IDs) in the destination object to receive from other processes.
exportLIDs[in] See packAndPrepare().
distor[in/out] The Distributor object that knows how to redistribute data.
revOp[in] Whether to do a forward or reverse mode redistribution.
virtual void Tpetra::DistObject< GlobalOrdinal , LocalOrdinal, GlobalOrdinal, Node >::createViews ( ) const
protectedvirtualinherited

Hook for creating a const view.

doTransfer() calls this on the source object. By default, it does nothing, but the source object can use this as a hint to fetch data from a compute buffer on an off-CPU device (such as a GPU) into host memory.

virtual void Tpetra::DistObject< GlobalOrdinal , LocalOrdinal, GlobalOrdinal, Node >::createViewsNonConst ( Kokkos::ReadWriteOption  rwo)
protectedvirtualinherited

Hook for creating a nonconst view.

doTransfer() calls this on the destination (*this) object. By default, it does nothing, but the destination object can use this as a hint to fetch data from a compute buffer on an off-CPU device (such as a GPU) into host memory.

Parameters
rwo[in] Whether to create a write-only or a read-and-write view. For Kokkos Node types where compute buffers live in a separate memory space (e.g., in the device memory of a discrete accelerator like a GPU), a write-only view only requires copying from host memory to the compute buffer, whereas a read-and-write view requires copying both ways (once to read, from the compute buffer to host memory, and once to write, back to the compute buffer).
virtual void Tpetra::DistObject< GlobalOrdinal , LocalOrdinal, GlobalOrdinal, Node >::releaseViews ( ) const
protectedvirtualinherited

Hook for releasing views.

doTransfer() calls this on both the source and destination objects, once it no longer needs to access that object's data. By default, this method does nothing. Implementations may use this as a hint to free host memory which is a view of a compute buffer, once the host memory view is no longer needed. Some implementations may prefer to mirror compute buffers in host memory; for these implementations, releaseViews() may do nothing.

Friends And Related Function Documentation

template<class LocalOrdinal , class GlobalOrdinal , class Node >
Teuchos::RCP< CrsGraph< LocalOrdinal, GlobalOrdinal, Node > > createCrsGraph ( const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &  map,
size_t  maxNumEntriesPerRow = 0,
const Teuchos::RCP< Teuchos::ParameterList > &  params = Teuchos::null 
)
related

Non-member function to create an empty CrsGraph given a row map and a non-zero profile.

Returns
A dynamically allocated (DynamicProfile) graph with specified number of nonzeros per row (defaults to zero).

Definition at line 1540 of file Tpetra_CrsGraph_decl.hpp.

Member Data Documentation

template<class LocalOrdinal, class GlobalOrdinal = LocalOrdinal, class Node = Kokkos::DefaultNode::DefaultNodeType, class LocalMatOps = typename Kokkos::DefaultKernels<void,LocalOrdinal,Node>::SparseOps>
RCP<const Map<LocalOrdinal,GlobalOrdinal,Node> > Tpetra::CrsGraph< LocalOrdinal, GlobalOrdinal, Node, LocalMatOps >::rowMap_
protected

The Map describing the distribution of rows of the graph.

Definition at line 1402 of file Tpetra_CrsGraph_decl.hpp.

template<class LocalOrdinal, class GlobalOrdinal = LocalOrdinal, class Node = Kokkos::DefaultNode::DefaultNodeType, class LocalMatOps = typename Kokkos::DefaultKernels<void,LocalOrdinal,Node>::SparseOps>
RCP<const Map<LocalOrdinal,GlobalOrdinal,Node> > Tpetra::CrsGraph< LocalOrdinal, GlobalOrdinal, Node, LocalMatOps >::colMap_
protected

The Map describing the distribution of columns of the graph.

Definition at line 1404 of file Tpetra_CrsGraph_decl.hpp.

template<class LocalOrdinal, class GlobalOrdinal = LocalOrdinal, class Node = Kokkos::DefaultNode::DefaultNodeType, class LocalMatOps = typename Kokkos::DefaultKernels<void,LocalOrdinal,Node>::SparseOps>
RCP<const Map<LocalOrdinal,GlobalOrdinal,Node> > Tpetra::CrsGraph< LocalOrdinal, GlobalOrdinal, Node, LocalMatOps >::rangeMap_
protected

The Map describing the range of the (matrix corresponding to the) graph.

Definition at line 1406 of file Tpetra_CrsGraph_decl.hpp.

template<class LocalOrdinal, class GlobalOrdinal = LocalOrdinal, class Node = Kokkos::DefaultNode::DefaultNodeType, class LocalMatOps = typename Kokkos::DefaultKernels<void,LocalOrdinal,Node>::SparseOps>
RCP<const Map<LocalOrdinal,GlobalOrdinal,Node> > Tpetra::CrsGraph< LocalOrdinal, GlobalOrdinal, Node, LocalMatOps >::domainMap_
protected

The Map describing the domain of the (matrix corresponding to the) graph.

Definition at line 1408 of file Tpetra_CrsGraph_decl.hpp.

template<class LocalOrdinal, class GlobalOrdinal = LocalOrdinal, class Node = Kokkos::DefaultNode::DefaultNodeType, class LocalMatOps = typename Kokkos::DefaultKernels<void,LocalOrdinal,Node>::SparseOps>
RCP<const Import<LocalOrdinal,GlobalOrdinal,Node> > Tpetra::CrsGraph< LocalOrdinal, GlobalOrdinal, Node, LocalMatOps >::importer_
protected

The Import from the domain Map to the column Map.

This gets constructed by fillComplete. It may be null if the domain Map and the column Map are the same, since no Import is necessary in that case for sparse matrix-vector multiply.

Definition at line 1416 of file Tpetra_CrsGraph_decl.hpp.

template<class LocalOrdinal, class GlobalOrdinal = LocalOrdinal, class Node = Kokkos::DefaultNode::DefaultNodeType, class LocalMatOps = typename Kokkos::DefaultKernels<void,LocalOrdinal,Node>::SparseOps>
RCP<const Export<LocalOrdinal,GlobalOrdinal,Node> > Tpetra::CrsGraph< LocalOrdinal, GlobalOrdinal, Node, LocalMatOps >::exporter_
protected

The Export from the row Map to the range Map.

This gets constructed by fillComplete. It may be null if the row Map and the range Map are the same, since no Export is necessary in that case for sparse matrix-vector multiply.

Definition at line 1423 of file Tpetra_CrsGraph_decl.hpp.

template<class LocalOrdinal, class GlobalOrdinal = LocalOrdinal, class Node = Kokkos::DefaultNode::DefaultNodeType, class LocalMatOps = typename Kokkos::DefaultKernels<void,LocalOrdinal,Node>::SparseOps>
ProfileType Tpetra::CrsGraph< LocalOrdinal, GlobalOrdinal, Node, LocalMatOps >::pftype_
protected

Whether the graph was allocated with static or dynamic profile.

Definition at line 1435 of file Tpetra_CrsGraph_decl.hpp.

template<class LocalOrdinal, class GlobalOrdinal = LocalOrdinal, class Node = Kokkos::DefaultNode::DefaultNodeType, class LocalMatOps = typename Kokkos::DefaultKernels<void,LocalOrdinal,Node>::SparseOps>
ArrayRCP<const size_t> Tpetra::CrsGraph< LocalOrdinal, GlobalOrdinal, Node, LocalMatOps >::numAllocPerRow_
protected

The maximum number of entries to allow in each locally owned row, per row.

This is an argument to some of the graph's constructors. Either this or numAllocForAllRows_ is used, but not both.

If this is not set in the constructor, it is allocated temporarily, if necessary, in allocateIndices(). In that same method, it is used to allocate the row offsets array, then discarded (set to null) unconditionally.

Definition at line 1446 of file Tpetra_CrsGraph_decl.hpp.

template<class LocalOrdinal, class GlobalOrdinal = LocalOrdinal, class Node = Kokkos::DefaultNode::DefaultNodeType, class LocalMatOps = typename Kokkos::DefaultKernels<void,LocalOrdinal,Node>::SparseOps>
size_t Tpetra::CrsGraph< LocalOrdinal, GlobalOrdinal, Node, LocalMatOps >::numAllocForAllRows_
protected

The maximum number of entries to allow in each locally owned row.

This is an argument to some of the graph's constructors. Either this or numAllocPerRow_ is used, but not both.

Definition at line 1452 of file Tpetra_CrsGraph_decl.hpp.

template<class LocalOrdinal, class GlobalOrdinal = LocalOrdinal, class Node = Kokkos::DefaultNode::DefaultNodeType, class LocalMatOps = typename Kokkos::DefaultKernels<void,LocalOrdinal,Node>::SparseOps>
ArrayRCP< LocalOrdinal> Tpetra::CrsGraph< LocalOrdinal, GlobalOrdinal, Node, LocalMatOps >::lclInds1D_
protected

lclInds1D_ are the indices for all rows

Definition at line 1466 of file Tpetra_CrsGraph_decl.hpp.

template<class LocalOrdinal, class GlobalOrdinal = LocalOrdinal, class Node = Kokkos::DefaultNode::DefaultNodeType, class LocalMatOps = typename Kokkos::DefaultKernels<void,LocalOrdinal,Node>::SparseOps>
ArrayRCP<GlobalOrdinal> Tpetra::CrsGraph< LocalOrdinal, GlobalOrdinal, Node, LocalMatOps >::gblInds1D_
protected

gblInds1D_ are the indices for all rows

Definition at line 1468 of file Tpetra_CrsGraph_decl.hpp.

template<class LocalOrdinal, class GlobalOrdinal = LocalOrdinal, class Node = Kokkos::DefaultNode::DefaultNodeType, class LocalMatOps = typename Kokkos::DefaultKernels<void,LocalOrdinal,Node>::SparseOps>
ArrayRCP<Array< LocalOrdinal> > Tpetra::CrsGraph< LocalOrdinal, GlobalOrdinal, Node, LocalMatOps >::lclInds2D_
protected

lclInds2D_[r] are the indices for row r.

Definition at line 1484 of file Tpetra_CrsGraph_decl.hpp.

template<class LocalOrdinal, class GlobalOrdinal = LocalOrdinal, class Node = Kokkos::DefaultNode::DefaultNodeType, class LocalMatOps = typename Kokkos::DefaultKernels<void,LocalOrdinal,Node>::SparseOps>
ArrayRCP<Array<GlobalOrdinal> > Tpetra::CrsGraph< LocalOrdinal, GlobalOrdinal, Node, LocalMatOps >::gblInds2D_
protected

gblInds2D_[r] are the indices for row r.

Definition at line 1487 of file Tpetra_CrsGraph_decl.hpp.

template<class LocalOrdinal, class GlobalOrdinal = LocalOrdinal, class Node = Kokkos::DefaultNode::DefaultNodeType, class LocalMatOps = typename Kokkos::DefaultKernels<void,LocalOrdinal,Node>::SparseOps>
ArrayRCP<size_t> Tpetra::CrsGraph< LocalOrdinal, GlobalOrdinal, Node, LocalMatOps >::numRowEntries_
protected

The number of local entries in each locally owned row.

This is deallocated in fillComplete() if fillComplete()'s "Optimize Storage" parameter is set to true.

Definition at line 1493 of file Tpetra_CrsGraph_decl.hpp.

template<class LocalOrdinal, class GlobalOrdinal = LocalOrdinal, class Node = Kokkos::DefaultNode::DefaultNodeType, class LocalMatOps = typename Kokkos::DefaultKernels<void,LocalOrdinal,Node>::SparseOps>
bool Tpetra::CrsGraph< LocalOrdinal, GlobalOrdinal, Node, LocalMatOps >::lowerTriangular_
protected

Whether the graph is locally lower triangular.

Definition at line 1500 of file Tpetra_CrsGraph_decl.hpp.

template<class LocalOrdinal, class GlobalOrdinal = LocalOrdinal, class Node = Kokkos::DefaultNode::DefaultNodeType, class LocalMatOps = typename Kokkos::DefaultKernels<void,LocalOrdinal,Node>::SparseOps>
bool Tpetra::CrsGraph< LocalOrdinal, GlobalOrdinal, Node, LocalMatOps >::upperTriangular_
protected

Whether the graph is locally upper triangular.

Definition at line 1502 of file Tpetra_CrsGraph_decl.hpp.

template<class LocalOrdinal, class GlobalOrdinal = LocalOrdinal, class Node = Kokkos::DefaultNode::DefaultNodeType, class LocalMatOps = typename Kokkos::DefaultKernels<void,LocalOrdinal,Node>::SparseOps>
bool Tpetra::CrsGraph< LocalOrdinal, GlobalOrdinal, Node, LocalMatOps >::indicesAreSorted_
protected

Whether the graph's indices are sorted in each row, on this process.

Definition at line 1504 of file Tpetra_CrsGraph_decl.hpp.

template<class LocalOrdinal, class GlobalOrdinal = LocalOrdinal, class Node = Kokkos::DefaultNode::DefaultNodeType, class LocalMatOps = typename Kokkos::DefaultKernels<void,LocalOrdinal,Node>::SparseOps>
bool Tpetra::CrsGraph< LocalOrdinal, GlobalOrdinal, Node, LocalMatOps >::noRedundancies_
protected

Whether the graph's indices are non-redundant (merged) in each row, on this process.

Definition at line 1507 of file Tpetra_CrsGraph_decl.hpp.

template<class LocalOrdinal, class GlobalOrdinal = LocalOrdinal, class Node = Kokkos::DefaultNode::DefaultNodeType, class LocalMatOps = typename Kokkos::DefaultKernels<void,LocalOrdinal,Node>::SparseOps>
bool Tpetra::CrsGraph< LocalOrdinal, GlobalOrdinal, Node, LocalMatOps >::haveLocalConstants_
protected

Whether this process has computed local constants.

Definition at line 1509 of file Tpetra_CrsGraph_decl.hpp.

template<class LocalOrdinal, class GlobalOrdinal = LocalOrdinal, class Node = Kokkos::DefaultNode::DefaultNodeType, class LocalMatOps = typename Kokkos::DefaultKernels<void,LocalOrdinal,Node>::SparseOps>
bool Tpetra::CrsGraph< LocalOrdinal, GlobalOrdinal, Node, LocalMatOps >::haveGlobalConstants_
protected

Whether all processes have computed global constants.

Definition at line 1511 of file Tpetra_CrsGraph_decl.hpp.

template<class LocalOrdinal, class GlobalOrdinal = LocalOrdinal, class Node = Kokkos::DefaultNode::DefaultNodeType, class LocalMatOps = typename Kokkos::DefaultKernels<void,LocalOrdinal,Node>::SparseOps>
std::map<GlobalOrdinal, std::deque<GlobalOrdinal> > Tpetra::CrsGraph< LocalOrdinal, GlobalOrdinal, Node, LocalMatOps >::nonlocals_
protected

Nonlocal data given to insertGlobalValues or sumIntoGlobalValues.

Definition at line 1514 of file Tpetra_CrsGraph_decl.hpp.

Teuchos::RCP<const Map<LocalOrdinal,GlobalOrdinal,Node> > Tpetra::DistObject< GlobalOrdinal , LocalOrdinal, GlobalOrdinal, Node >::map_
protectedinherited

The Map over which this object is distributed.

Definition at line 612 of file Tpetra_DistObject_decl.hpp.


The documentation for this class was generated from the following files: