Tpetra parallel linear algebra  Version of the Day
Public Types | Public Member Functions | Friends | List of all members
Tpetra::Classes::CrsGraph< LocalOrdinal, GlobalOrdinal, Node > Class Template Referenceabstract

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

#include <Tpetra_CrsGraph_decl.hpp>

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

Public Types

typedef LocalOrdinal local_ordinal_type
 This class' first template parameter; the type of local indices. More...
 
typedef GlobalOrdinal global_ordinal_type
 This class' second template parameter; the type of global indices. More...
 
typedef Node node_type
 This class' Kokkos Node type. More...
 
typedef Node::device_type device_type
 This class' Kokkos device type. More...
 
typedef device_type::execution_space execution_space
 This class' Kokkos execution space. More...
 
typedef Kokkos::StaticCrsGraph< LocalOrdinal, Kokkos::LayoutLeft, execution_spacelocal_graph_type
 The type of the part of the sparse graph on each MPI process. More...
 
typedef local_graph_type LocalStaticCrsGraphType TPETRA_DEPRECATED
 DEPRECATED; use local_graph_type (above) instead. More...
 
typedef local_graph_type::row_map_type t_RowPtrs TPETRA_DEPRECATED
 DEPRECATED; use local_graph_type::row_map_type instead. More...
 
typedef local_graph_type::row_map_type::non_const_type t_RowPtrsNC TPETRA_DEPRECATED
 DEPRECATED; use local_graph_type::row_map_type::non_const_type instead. More...
 
typedef local_graph_type::entries_type::non_const_type t_LocalOrdinal_1D TPETRA_DEPRECATED
 DEPRECATED; use local_graph_type::entries_type::non_const_type instead. More...
 
using map_type = ::Tpetra::Map< LocalOrdinal, GlobalOrdinal, Node >
 The Map specialization used by this class. More...
 
using import_type = ::Tpetra::Import< LocalOrdinal, GlobalOrdinal, Node >
 The Import specialization used by this class. More...
 
using export_type = ::Tpetra::Export< LocalOrdinal, GlobalOrdinal, Node >
 The Export specialization used by this class. More...
 
Typedefs
typedef ::Kokkos::Details::ArithTraits< ::Tpetra::Details::DefaultTypes::global_ordinal_type >::val_type packet_type
 The type of each datum being sent or received in an Import or Export. More...
 

Public Member Functions

virtual void pack (const Teuchos::ArrayView< const ::Tpetra::Details::DefaultTypes::local_ordinal_type > &exportLIDs, Teuchos::Array< ::Tpetra::Details::DefaultTypes::global_ordinal_type > &exports, const Teuchos::ArrayView< size_t > &numPacketsPerLID, size_t &constantNumPackets, Distributor &distor) const=0
 Pack the object's data for an Import or Export. More...
 
Constructor/Destructor Methods
 CrsGraph (const Teuchos::RCP< const map_type > &rowMap, size_t maxNumEntriesPerRow, ProfileType pftype=DynamicProfile, const Teuchos::RCP< Teuchos::ParameterList > &params=Teuchos::null)
 Constructor specifying a single upper bound for the number of entries in all rows on the calling process. More...
 
 CrsGraph (const Teuchos::RCP< const map_type > &rowMap, const Kokkos::DualView< const size_t *, execution_space > &numEntPerRow, const ProfileType pftype=DynamicProfile, const Teuchos::RCP< Teuchos::ParameterList > &params=Teuchos::null)
 Constructor specifying a (possibly different) upper bound for the number of entries in each row. More...
 
 CrsGraph (const Teuchos::RCP< const map_type > &rowMap, const Teuchos::ArrayRCP< const size_t > &numEntPerRow, const ProfileType pftype=DynamicProfile, const Teuchos::RCP< Teuchos::ParameterList > &params=Teuchos::null)
 Constructor specifying a (possibly different) upper bound for the number of entries in each row (legacy KokkosClassic version). More...
 
 CrsGraph (const Teuchos::RCP< const map_type > &rowMap, const Teuchos::RCP< const map_type > &colMap, const size_t maxNumEntriesPerRow, const ProfileType pftype=DynamicProfile, const Teuchos::RCP< Teuchos::ParameterList > &params=Teuchos::null)
 Constructor specifying column Map and a single upper bound for the number of entries in all rows on the calling process. More...
 
 CrsGraph (const Teuchos::RCP< const map_type > &rowMap, const Teuchos::RCP< const map_type > &colMap, const Kokkos::DualView< const size_t *, execution_space > &numEntPerRow, ProfileType pftype=DynamicProfile, const Teuchos::RCP< Teuchos::ParameterList > &params=Teuchos::null)
 Constructor specifying column Map and number of entries in each row. More...
 
 CrsGraph (const Teuchos::RCP< const map_type > &rowMap, const Teuchos::RCP< const map_type > &colMap, const Teuchos::ArrayRCP< const size_t > &numEntPerRow, ProfileType pftype=DynamicProfile, const Teuchos::RCP< Teuchos::ParameterList > &params=Teuchos::null)
 Constructor specifying column Map and number of entries in each row (legacy KokkosClassic version). More...
 
 CrsGraph (const Teuchos::RCP< const map_type > &rowMap, const Teuchos::RCP< const map_type > &colMap, const typename local_graph_type::row_map_type &rowPointers, const typename local_graph_type::entries_type::non_const_type &columnIndices, const Teuchos::RCP< Teuchos::ParameterList > &params=Teuchos::null)
 Constructor specifying column Map and arrays containing the graph in sorted, local ids. More...
 
 CrsGraph (const Teuchos::RCP< const map_type > &rowMap, const Teuchos::RCP< const map_type > &colMap, const Teuchos::ArrayRCP< size_t > &rowPointers, const Teuchos::ArrayRCP< LocalOrdinal > &columnIndices, const Teuchos::RCP< Teuchos::ParameterList > &params=Teuchos::null)
 Constructor specifying column Map and arrays containing the graph in sorted, local ids. More...
 
 CrsGraph (const Teuchos::RCP< const map_type > &rowMap, const Teuchos::RCP< const map_type > &colMap, const local_graph_type &lclGraph, const Teuchos::RCP< Teuchos::ParameterList > &params)
 Constructor specifying column Map and a local (sorted) graph, which the resulting CrsGraph views. More...
 
 CrsGraph (const local_graph_type &lclGraph, const Teuchos::RCP< const map_type > &rowMap, const Teuchos::RCP< const map_type > &colMap, const Teuchos::RCP< const map_type > &domainMap=Teuchos::null, const Teuchos::RCP< const map_type > &rangeMap=Teuchos::null, const Teuchos::RCP< Teuchos::ParameterList > &params=Teuchos::null)
 Constructor specifying column, domain and range maps, and a local (sorted) graph, which the resulting CrsGraph views. More...
 
template<class Node2 >
Teuchos::RCP< CrsGraph< LocalOrdinal, GlobalOrdinal, Node2 > > clone (const Teuchos::RCP< Node2 > &node2, const Teuchos::RCP< Teuchos::ParameterList > &params=Teuchos::null) const
 Create a cloned CrsGraph for a different Node type. More...
 
virtual ~CrsGraph ()
 Destructor. More...
 
Implementation of Teuchos::ParameterListAcceptor
void setParameterList (const Teuchos::RCP< Teuchos::ParameterList > &params) override
 Set the given list of parameters (must be nonnull). More...
 
Teuchos::RCP< const Teuchos::ParameterList > getValidParameters () const override
 Default parameter list suitable for validation. More...
 
Insertion/Removal Methods
void insertGlobalIndices (const GlobalOrdinal globalRow, const Teuchos::ArrayView< const GlobalOrdinal > &indices)
 Insert global indices into the graph. More...
 
void insertGlobalIndices (const GlobalOrdinal globalRow, const LocalOrdinal numEnt, const GlobalOrdinal inds[])
 Epetra compatibility version of insertGlobalIndices (see above) that takes input as a raw pointer, rather than Teuchos::ArrayView. More...
 
void insertLocalIndices (const LocalOrdinal localRow, const Teuchos::ArrayView< const LocalOrdinal > &indices)
 Insert local indices into the graph. More...
 
void insertLocalIndices (const LocalOrdinal localRow, const LocalOrdinal numEnt, const LocalOrdinal inds[])
 Epetra compatibility version of insertLocalIndices (see above) that takes input as a raw pointer, rather than Teuchos::ArrayView. More...
 
void removeLocalIndices (LocalOrdinal localRow)
 Remove all graph indices from the specified local row. More...
 
Collective methods for changing the graph's global state
void globalAssemble ()
 Communicate nonlocal contributions to other processes. More...
 
void resumeFill (const Teuchos::RCP< Teuchos::ParameterList > &params=Teuchos::null)
 Resume fill operations. More...
 
void fillComplete (const Teuchos::RCP< const map_type > &domainMap, const Teuchos::RCP< const map_type > &rangeMap, const Teuchos::RCP< Teuchos::ParameterList > &params=Teuchos::null)
 Tell the graph that you are done changing its structure. More...
 
void fillComplete (const Teuchos::RCP< Teuchos::ParameterList > &params=Teuchos::null)
 Tell the graph that you are done changing its structure; set default domain and range Maps. More...
 
void expertStaticFillComplete (const Teuchos::RCP< const map_type > &domainMap, const Teuchos::RCP< const map_type > &rangeMap, const Teuchos::RCP< const import_type > &importer=Teuchos::null, const Teuchos::RCP< const export_type > &exporter=Teuchos::null, const Teuchos::RCP< Teuchos::ParameterList > &params=Teuchos::null)
 Perform a fillComplete on a graph that already has data, via setAllIndices(). More...
 
Methods implementing RowGraph.
Teuchos::RCP< const Teuchos::Comm< int > > getComm () const override
 Returns the communicator. More...
 
Teuchos::RCP< node_typegetNode () const override
 Returns the underlying node. More...
 
Teuchos::RCP< const map_typegetRowMap () const override
 Returns the Map that describes the row distribution in this graph. More...
 
Teuchos::RCP< const map_typegetColMap () const override
 Returns the Map that describes the column distribution in this graph. More...
 
Teuchos::RCP< const map_typegetDomainMap () const override
 Returns the Map associated with the domain of this graph. More...
 
Teuchos::RCP< const map_typegetRangeMap () const override
 Returns the Map associated with the domain of this graph. More...
 
Teuchos::RCP< const import_typegetImporter () const override
 Returns the importer associated with this graph. More...
 
Teuchos::RCP< const export_typegetExporter () const override
 Returns the exporter associated with this graph. More...
 
global_size_t getGlobalNumRows () const override
 Returns the number of global rows in the graph. More...
 
global_size_t getGlobalNumCols () const override
 Returns the number of global columns in the graph. More...
 
size_t getNodeNumRows () const override
 Returns the number of graph rows owned on the calling node. More...
 
size_t getNodeNumCols () const override
 Returns the number of columns connected to the locally owned rows of this graph. More...
 
GlobalOrdinal getIndexBase () const override
 Returns the index base for global indices for this graph. More...
 
global_size_t getGlobalNumEntries () const override
 Returns the global number of entries in the graph. More...
 
size_t getNodeNumEntries () const override
 The local number of entries in the graph. More...
 
size_t getNumEntriesInGlobalRow (GlobalOrdinal globalRow) const override
 Returns the current number of entries on this node in the specified global row. More...
 
size_t getNumEntriesInLocalRow (LocalOrdinal localRow) const override
 Get the number of entries in the given row (local index). More...
 
size_t getNodeAllocationSize () const
 The local number of indices allocated for the graph, over all rows on the calling (MPI) process. More...
 
size_t getNumAllocatedEntriesInGlobalRow (GlobalOrdinal globalRow) const
 Current number of allocated entries in the given row on the calling (MPI) process, using a global row index. More...
 
size_t getNumAllocatedEntriesInLocalRow (LocalOrdinal localRow) const
 Current number of allocated entries in the given row on the calling (MPI) process, using a local row index. More...
 
global_size_t TPETRA_DEPRECATED getGlobalNumDiags () const override
 Number of diagonal entries over all processes in the graph's communicator. More...
 
global_size_t getGlobalNumDiagsImpl () const override
 DO NOT CALL THIS METHOD; THIS IS NOT FOR USERS. More...
 
size_t TPETRA_DEPRECATED getNodeNumDiags () const override
 Number of diagonal entries on the calling process. More...
 
size_t getNodeNumDiagsImpl () const override
 DO NOT CALL THIS METHOD; THIS IS NOT FOR USERS. More...
 
size_t getGlobalMaxNumRowEntries () const override
 Maximum number of entries in any row of the graph, over all processes in the graph's communicator. More...
 
size_t getNodeMaxNumRowEntries () const override
 Maximum number of entries in any row of the graph, on this process. More...
 
bool hasColMap () const override
 Whether the graph has a column Map. More...
 
bool isLowerTriangularImpl () const override
 DO NOT CALL THIS METHOD; THIS IS NOT FOR USERS. More...
 
bool TPETRA_DEPRECATED isLowerTriangular () const override
 Whether the graph is locally lower triangular. More...
 
bool isUpperTriangularImpl () const override
 DO NOT CALL THIS METHOD; THIS IS NOT FOR USERS. More...
 
bool TPETRA_DEPRECATED isUpperTriangular () const override
 Whether the graph is locally upper triangular. More...
 
bool isLocallyIndexed () const override
 If graph indices are in the local range, this function returns true. Otherwise, this function returns false. *‍/. More...
 
bool isGloballyIndexed () const override
 If graph indices are in the global range, this function returns true. Otherwise, this function returns false. *‍/. More...
 
bool isFillComplete () const override
 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
 Whether 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 Teuchos::ArrayView< GlobalOrdinal > &Indices, size_t &NumIndices) const override
 Get a copy of the given row, using global indices. More...
 
void getLocalRowCopy (LocalOrdinal LocalRow, const Teuchos::ArrayView< LocalOrdinal > &indices, size_t &NumIndices) const override
 Get a copy of the given row, using local indices. More...
 
void getGlobalRowView (const GlobalOrdinal gblRow, Teuchos::ArrayView< const GlobalOrdinal > &gblColInds) const override
 Get a const, non-persisting view of the given global row's global column indices, as a Teuchos::ArrayView. More...
 
bool supportsRowViews () const override
 Whether this class implements getLocalRowView() and getGlobalRowView() (it does). More...
 
void getLocalRowView (const LocalOrdinal lclRow, Teuchos::ArrayView< const LocalOrdinal > &lclColInds) const override
 Get a const, non-persisting view of the given local row's local column indices, as a Teuchos::ArrayView. More...
 
Overridden from Teuchos::Describable
std::string description () const override
 Return a one-line human-readable description of this object. More...
 
void describe (Teuchos::FancyOStream &out, const Teuchos::EVerbosityLevel verbLevel=Teuchos::Describable::verbLevel_default) const override
 Print this object to the given output stream with the given verbosity level. More...
 
Implementation of DistObject
virtual bool checkSizes (const SrcDistObject &source) override
 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) override
 
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) override
 
virtual void pack (const Teuchos::ArrayView< const LocalOrdinal > &exportLIDs, Teuchos::Array< GlobalOrdinal > &exports, const Teuchos::ArrayView< size_t > &numPacketsPerLID, size_t &constantNumPackets, Distributor &distor) const override
 Pack this object's data for Import or Export. 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) override
 
Graph query methods
virtual Teuchos::RCP< const Teuchos::Comm< int > > getComm () const=0
 The communicator over which this graph is distributed. More...
 
virtual Teuchos::RCP< ::Tpetra::Details::DefaultTypes::node_typegetNode () const=0
 The Kokkos Node instance with which this object was created. More...
 
virtual Teuchos::RCP< const Map< ::Tpetra::Details::DefaultTypes::local_ordinal_type, ::Tpetra::Details::DefaultTypes::global_ordinal_type, ::Tpetra::Details::DefaultTypes::node_type > > getRowMap () const=0
 The Map that describes this graph's distribution of rows over processes. More...
 
virtual Teuchos::RCP< const Map< ::Tpetra::Details::DefaultTypes::local_ordinal_type, ::Tpetra::Details::DefaultTypes::global_ordinal_type, ::Tpetra::Details::DefaultTypes::node_type > > getColMap () const=0
 The Map that describes this graph's distribution of columns over processes. More...
 
virtual Teuchos::RCP< const Map< ::Tpetra::Details::DefaultTypes::local_ordinal_type, ::Tpetra::Details::DefaultTypes::global_ordinal_type, ::Tpetra::Details::DefaultTypes::node_type > > getDomainMap () const=0
 The Map associated with the domain of this graph. More...
 
virtual Teuchos::RCP< const Map< ::Tpetra::Details::DefaultTypes::local_ordinal_type, ::Tpetra::Details::DefaultTypes::global_ordinal_type, ::Tpetra::Details::DefaultTypes::node_type > > getRangeMap () const=0
 The Map associated with the range of this graph. More...
 
virtual Teuchos::RCP< const Import< ::Tpetra::Details::DefaultTypes::local_ordinal_type, ::Tpetra::Details::DefaultTypes::global_ordinal_type, ::Tpetra::Details::DefaultTypes::node_type > > getImporter () const=0
 This graph's Import object. More...
 
virtual Teuchos::RCP< const Export< ::Tpetra::Details::DefaultTypes::local_ordinal_type, ::Tpetra::Details::DefaultTypes::global_ordinal_type, ::Tpetra::Details::DefaultTypes::node_type > > getExporter () const=0
 This graph's Export object. More...
 
virtual global_size_t getGlobalNumRows () const=0
 Returns the number of global rows in the graph. More...
 
virtual global_size_t getGlobalNumCols () const=0
 Returns the number of global columns in the graph. More...
 
virtual size_t getNodeNumRows () const=0
 Returns the number of rows owned on the calling node. More...
 
virtual size_t getNodeNumCols () const=0
 Returns the number of columns connected to the locally owned rows of this graph. More...
 
virtual ::Tpetra::Details::DefaultTypes::global_ordinal_type getIndexBase () const=0
 Returns the index base for global indices for this graph. More...
 
virtual global_size_t getGlobalNumEntries () const=0
 Returns the global number of entries in the graph. More...
 
virtual size_t getNodeNumEntries () const=0
 Returns the local number of entries in the graph. More...
 
virtual size_t getNumEntriesInGlobalRow (::Tpetra::Details::DefaultTypes::global_ordinal_type globalRow) const=0
 Returns the current number of entries on this node in the specified global row. More...
 
virtual size_t getNumEntriesInLocalRow (::Tpetra::Details::DefaultTypes::local_ordinal_type localRow) const=0
 Returns the current number of entries on this node in the specified local row. More...
 
virtual global_size_t TPETRA_DEPRECATED getGlobalNumDiags () const=0
 Number of diagonal entries over all processes in the graph's communicator. More...
 
virtual size_t TPETRA_DEPRECATED getNodeNumDiags () const=0
 Number of diagonal entries on the calling process. More...
 
virtual size_t getGlobalMaxNumRowEntries () const=0
 Returns the maximum number of entries across all rows/columns on all nodes. More...
 
virtual size_t getNodeMaxNumRowEntries () const=0
 Returns the maximum number of entries across all rows/columns on this node. More...
 
virtual bool hasColMap () const=0
 Whether the graph has a well-defined column Map. More...
 
virtual bool TPETRA_DEPRECATED isLowerTriangular () const=0
 Whether the graph is locally lower triangular. More...
 
virtual bool TPETRA_DEPRECATED isUpperTriangular () const=0
 Whether the graph is locally upper triangular. More...
 
virtual bool isLocallyIndexed () const=0
 If graph indices are in the local range, this function returns true. Otherwise, this function returns false. *‍/. More...
 
virtual bool isGloballyIndexed () const=0
 If graph indices are in the global range, this function returns true. Otherwise, this function returns false. *‍/. More...
 
virtual bool isFillComplete () const=0
 Whether fillComplete() has been called (without an intervening resumeFill()). More...
 
Extraction Methods
virtual void getGlobalRowCopy (::Tpetra::Details::DefaultTypes::global_ordinal_type GlobalRow, const Teuchos::ArrayView< ::Tpetra::Details::DefaultTypes::global_ordinal_type > &Indices, size_t &NumIndices) const=0
 Extract a list of entries in a specified global row of the graph. Put into pre-allocated storage. More...
 
virtual void getLocalRowCopy (::Tpetra::Details::DefaultTypes::local_ordinal_type LocalRow, const Teuchos::ArrayView< ::Tpetra::Details::DefaultTypes::local_ordinal_type > &Indices, size_t &NumIndices) const=0
 Extract a list of entries in a specified local row of the graph. Put into storage allocated by calling routine. More...
 
virtual bool supportsRowViews () const
 Whether this class implements getLocalRowView() and getGlobalRowView(). More...
 
Public methods for redistributing data
void doImport (const SrcDistObject &source, const Import< ::Tpetra::Details::DefaultTypes::local_ordinal_type, ::Tpetra::Details::DefaultTypes::global_ordinal_type, ::Tpetra::Details::DefaultTypes::node_type > &importer, CombineMode CM)
 Import data into this object using an Import object ("forward mode"). More...
 
void doImport (const SrcDistObject &source, const Export< ::Tpetra::Details::DefaultTypes::local_ordinal_type, ::Tpetra::Details::DefaultTypes::global_ordinal_type, ::Tpetra::Details::DefaultTypes::node_type > &exporter, CombineMode CM)
 Import data into this object using an Export object ("reverse mode"). More...
 
void doExport (const SrcDistObject &source, const Export< ::Tpetra::Details::DefaultTypes::local_ordinal_type, ::Tpetra::Details::DefaultTypes::global_ordinal_type, ::Tpetra::Details::DefaultTypes::node_type > &exporter, CombineMode CM)
 Export data into this object using an Export object ("forward mode"). More...
 
void doExport (const SrcDistObject &source, const Import< ::Tpetra::Details::DefaultTypes::local_ordinal_type, ::Tpetra::Details::DefaultTypes::global_ordinal_type, ::Tpetra::Details::DefaultTypes::node_type > &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...
 
virtual Teuchos::RCP< const map_typegetMap () 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...
 
Implementation of Teuchos::Describable
virtual std::string description () const
 One-line descriptiion of this object. More...
 

Protected Member Functions

Methods governing changes between global and local indices
void makeColMap (Teuchos::Array< int > &remotePIDs)
 Make and set the graph's column Map. More...
 
std::pair< size_t, std::string > makeIndicesLocal ()
 Convert column indices from global to local. More...
 
void makeImportExport (Teuchos::Array< int > &remotePIDs, const bool useRemotePIDs)
 Make the Import and Export objects, if needed. More...
 

Friends

template<class S , class LO , class GO , class N >
class CrsMatrix
 Alias for Tpetra::Classes::CrsMatrix. More...
 
template<class LO2 , class GO2 , class N2 >
class CrsGraph
 Alias for Tpetra::Classes::CrsGraph. More...
 

Advanced methods, at increased risk of deprecation.

template<class CrsGraphType >
Teuchos::RCP< CrsGraphType > importAndFillCompleteCrsGraph (const Teuchos::RCP< const CrsGraphType > &sourceGraph, const Import< typename CrsGraphType::local_ordinal_type, typename CrsGraphType::global_ordinal_type, typename CrsGraphType::node_type > &importer, const Teuchos::RCP< const Map< typename CrsGraphType::local_ordinal_type, typename CrsGraphType::global_ordinal_type, typename CrsGraphType::node_type > > &domainMap, const Teuchos::RCP< const Map< typename CrsGraphType::local_ordinal_type, typename CrsGraphType::global_ordinal_type, typename CrsGraphType::node_type > > &rangeMap, const Teuchos::RCP< Teuchos::ParameterList > &params)
 
template<class CrsGraphType >
Teuchos::RCP< CrsGraphType > importAndFillCompleteCrsGraph (const Teuchos::RCP< const CrsGraphType > &sourceGraph, const Import< typename CrsGraphType::local_ordinal_type, typename CrsGraphType::global_ordinal_type, typename CrsGraphType::node_type > &rowImporter, const Import< typename CrsGraphType::local_ordinal_type, typename CrsGraphType::global_ordinal_type, typename CrsGraphType::node_type > &domainImporter, const Teuchos::RCP< const Map< typename CrsGraphType::local_ordinal_type, typename CrsGraphType::global_ordinal_type, typename CrsGraphType::node_type > > &domainMap, const Teuchos::RCP< const Map< typename CrsGraphType::local_ordinal_type, typename CrsGraphType::global_ordinal_type, typename CrsGraphType::node_type > > &rangeMap, const Teuchos::RCP< Teuchos::ParameterList > &params)
 
template<class CrsGraphType >
Teuchos::RCP< CrsGraphType > exportAndFillCompleteCrsGraph (const Teuchos::RCP< const CrsGraphType > &sourceGraph, const Export< typename CrsGraphType::local_ordinal_type, typename CrsGraphType::global_ordinal_type, typename CrsGraphType::node_type > &exporter, const Teuchos::RCP< const Map< typename CrsGraphType::local_ordinal_type, typename CrsGraphType::global_ordinal_type, typename CrsGraphType::node_type > > &domainMap, const Teuchos::RCP< const Map< typename CrsGraphType::local_ordinal_type, typename CrsGraphType::global_ordinal_type, typename CrsGraphType::node_type > > &rangeMap, const Teuchos::RCP< Teuchos::ParameterList > &params)
 
template<class CrsGraphType >
Teuchos::RCP< CrsGraphType > exportAndFillCompleteCrsGraph (const Teuchos::RCP< const CrsGraphType > &sourceGraph, const Export< typename CrsGraphType::local_ordinal_type, typename CrsGraphType::global_ordinal_type, typename CrsGraphType::node_type > &rowExporter, const Export< typename CrsGraphType::local_ordinal_type, typename CrsGraphType::global_ordinal_type, typename CrsGraphType::node_type > &domainExporter, const Teuchos::RCP< const Map< typename CrsGraphType::local_ordinal_type, typename CrsGraphType::global_ordinal_type, typename CrsGraphType::node_type > > &domainMap, const Teuchos::RCP< const Map< typename CrsGraphType::local_ordinal_type, typename CrsGraphType::global_ordinal_type, typename CrsGraphType::node_type > > &rangeMap, const Teuchos::RCP< Teuchos::ParameterList > &params)
 
void getLocalDiagOffsets (const Kokkos::View< size_t *, device_type, Kokkos::MemoryUnmanaged > &offsets) const
 Get offsets of the diagonal entries in the graph. More...
 
void getLocalDiagOffsets (Teuchos::ArrayRCP< size_t > &offsets) const
 Backwards compatibility overload of the above method. More...
 
void getNumEntriesPerLocalRowUpperBound (Teuchos::ArrayRCP< const size_t > &boundPerLocalRow, size_t &boundForAllLocalRows, bool &boundSameForAllLocalRows) const
 Get an upper bound on the number of entries that can be stored in each row. More...
 
void setAllIndices (const typename local_graph_type::row_map_type &rowPointers, const typename local_graph_type::entries_type::non_const_type &columnIndices)
 Set the graph's data directly, using 1-D storage. More...
 
void setAllIndices (const Teuchos::ArrayRCP< size_t > &rowPointers, const Teuchos::ArrayRCP< LocalOrdinal > &columnIndices)
 Set the graph's data directly, using 1-D storage. More...
 
Teuchos::ArrayRCP< const size_t > getNodeRowPtrs () const
 Get a host view of the row offsets. More...
 
Teuchos::ArrayRCP< const LocalOrdinal > getNodePackedIndices () const
 Get an Teuchos::ArrayRCP of the packed column-indices. More...
 
void replaceColMap (const Teuchos::RCP< const map_type > &newColMap)
 Replace the graph's current column Map with the given Map. More...
 
void reindexColumns (const Teuchos::RCP< const map_type > &newColMap, const Teuchos::RCP< const import_type > &newImport=Teuchos::null, const bool sortIndicesInEachRow=true)
 Reindex the column indices in place, and replace the column Map. Optionally, replace the Import object as well. More...
 
void replaceDomainMapAndImporter (const Teuchos::RCP< const map_type > &newDomainMap, const Teuchos::RCP< const import_type > &newImporter)
 Replace the current domain Map and Import with the given parameters. More...
 
virtual void removeEmptyProcessesInPlace (const Teuchos::RCP< const map_type > &newMap) override
 Remove processes owning zero rows from the Maps and their communicator. More...
 
void importAndFillComplete (Teuchos::RCP< CrsGraph< LocalOrdinal, GlobalOrdinal, Node > > &destGraph, const import_type &importer, const Teuchos::RCP< const map_type > &domainMap, const Teuchos::RCP< const map_type > &rangeMap, const Teuchos::RCP< Teuchos::ParameterList > &params=Teuchos::null) const
 Import from this to the given destination graph, and make the result fill complete. More...
 
void importAndFillComplete (Teuchos::RCP< CrsGraph< LocalOrdinal, GlobalOrdinal, Node > > &destGraph, const import_type &rowImporter, const import_type &domainImporter, const Teuchos::RCP< const map_type > &domainMap, const Teuchos::RCP< const map_type > &rangeMap, const Teuchos::RCP< Teuchos::ParameterList > &params) const
 Import from this to the given destination graph, and make the result fill complete. More...
 
void exportAndFillComplete (Teuchos::RCP< CrsGraph< LocalOrdinal, GlobalOrdinal, Node > > &destGraph, const export_type &exporter, const Teuchos::RCP< const map_type > &domainMap=Teuchos::null, const Teuchos::RCP< const map_type > &rangeMap=Teuchos::null, const Teuchos::RCP< Teuchos::ParameterList > &params=Teuchos::null) const
 Export from this to the given destination graph, and make the result fill complete. More...
 
void exportAndFillComplete (Teuchos::RCP< CrsGraph< LocalOrdinal, GlobalOrdinal, Node > > &destGraph, const export_type &rowExporter, const export_type &domainExporter, const Teuchos::RCP< const map_type > &domainMap, const Teuchos::RCP< const map_type > &rangeMap, const Teuchos::RCP< Teuchos::ParameterList > &params) const
 Export from this to the given destination graph, and make the result fill complete. More...
 
bool indicesAreAllocated () const
 
void allocateIndices (const ELocalGlobal lg)
 

Methods for inserting indices or transforming values

static const bool useAtomicUpdatesByDefault
 Whether transformLocalValues should use atomic updates by default. More...
 
size_t insertIndices (RowInfo &rowInfo, const SLocalGlobalViews &newInds, const ELocalGlobal lg, const ELocalGlobal I)
 Insert indices into the given row. More...
 
size_t insertGlobalIndicesImpl (const LocalOrdinal lclRow, const GlobalOrdinal inputGblColInds[], const size_t numInputInds)
 Insert global indices, using an input local row index. More...
 
size_t insertGlobalIndicesImpl (const RowInfo &rowInfo, const GlobalOrdinal inputGblColInds[], const size_t numInputInds)
 Insert global indices, using an input RowInfo. More...
 
void insertLocalIndicesImpl (const LocalOrdinal lclRow, const Teuchos::ArrayView< const LocalOrdinal > &gblColInds)
 
void insertGlobalIndicesFiltered (const LocalOrdinal lclRow, const GlobalOrdinal gblColInds[], const LocalOrdinal numGblColInds)
 Like insertGlobalIndices(), but with column Map filtering. More...
 
void insertGlobalIndicesIntoNonownedRows (const GlobalOrdinal gblRow, const GlobalOrdinal gblColInds[], const LocalOrdinal numGblColInds)
 Implementation of insertGlobalIndices for nonowned rows. More...
 

Methods for sorting and merging column indices.

Teuchos::RCP< const map_typerowMap_
 The Map describing the distribution of rows of the graph. More...
 
Teuchos::RCP< const map_typecolMap_
 The Map describing the distribution of columns of the graph. More...
 
Teuchos::RCP< const map_typerangeMap_
 The Map describing the range of the (matrix corresponding to the) graph. More...
 
Teuchos::RCP< const map_typedomainMap_
 The Map describing the domain of the (matrix corresponding to the) graph. More...
 
Teuchos::RCP< const import_typeimporter_
 The Import from the domain Map to the column Map. More...
 
Teuchos::RCP< const export_typeexporter_
 The Export from the row Map to the range Map. More...
 
local_graph_type lclGraph_
 Local graph; only initialized after first fillComplete() call. More...
 
size_t nodeNumDiags_
 Local number of (populated) diagonal entries. More...
 
size_t nodeMaxNumRowEntries_
 Local maximum of the number of entries in each row. More...
 
global_size_t globalNumEntries_
 Global number of entries in the graph. More...
 
global_size_t globalNumDiags_
 Global number of (populated) diagonal entries. More...
 
global_size_t globalMaxNumRowEntries_
 Global maximum of the number of entries in each row. More...
 
ProfileType pftype_
 Whether the graph was allocated with static or dynamic profile. More...
 
Kokkos::View< const size_t *, execution_space >::HostMirror k_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...
 
bool haveGlobalConstants () const
 Returns true if globalConstants have been computed; false otherwise. More...
 
void computeGlobalConstants (const bool computeLocalTriangularConstants)
 Compute global constants, if they have not yet been computed. More...
 
local_graph_type getLocalGraph () const
 Get the local graph. More...
 
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...
 
size_t sortAndMergeRowIndices (const RowInfo &rowInfo, const bool sorted, const bool merged)
 Sort and merge duplicate column indices in the given row. More...
 
void setDomainRangeMaps (const Teuchos::RCP< const map_type > &domainMap, const Teuchos::RCP< const map_type > &rangeMap)
 
void staticAssertions () const
 
void clearGlobalConstants ()
 
void computeLocalConstants (const bool computeLocalTriangularConstants)
 Compute local constants, if they have not yet been computed. More...
 
RowInfo getRowInfo (const LocalOrdinal myRow) const
 Get information about the locally owned row with local index myRow. More...
 
RowInfo getRowInfoFromGlobalRowIndex (const GlobalOrdinal gblRow) const
 Get information about the locally owned row with global index gblRow. More...
 
Teuchos::ArrayView< const LocalOrdinal > getLocalView (const RowInfo rowinfo) const
 Get a const, nonowned, locally indexed view of the locally owned row myRow, such that rowinfo = getRowInfo(myRow). More...
 
Teuchos::ArrayView< LocalOrdinal > getLocalViewNonConst (const RowInfo rowinfo)
 Get a nonconst, nonowned, locally indexed view of the locally owned row myRow, such that rowinfo = getRowInfo(myRow). More...
 
LocalOrdinal getLocalViewRawConst (const LocalOrdinal *&lclInds, LocalOrdinal &capacity, const RowInfo &rowInfo) const
 Get a pointer to the local column indices of a locally owned row, using the result of getRowInfo. More...
 
Teuchos::ArrayView< const GlobalOrdinal > getGlobalView (const RowInfo &rowinfo) const
 Get a const, nonowned, globally indexed view of the locally owned row myRow, such that rowinfo = getRowInfo(myRow). More...
 
Teuchos::ArrayView< GlobalOrdinal > getGlobalViewNonConst (const RowInfo &rowinfo)
 Get a nonconst, nonowned, globally indexed view of the locally owned row myRow, such that rowinfo = getRowInfo(myRow). More...
 
LocalOrdinal getGlobalViewRawConst (const GlobalOrdinal *&gblInds, LocalOrdinal &capacity, const RowInfo &rowInfo) const
 Get a pointer to the global column indices of a locally owned row, using the result of getRowInfoFromGlobalRowIndex. More...
 
void fillLocalGraph (const Teuchos::RCP< Teuchos::ParameterList > &params)
 
void checkInternalState () const
 Throw an exception if the internal state is not consistent. More...
 

1-D storage (StaticProfile) data structures

typedef Kokkos::View< GlobalOrdinal *, execution_spacet_GlobalOrdinal_1D
 Type of the k_gblInds1D_ array of global column indices. More...
 
local_graph_type::entries_type::non_const_type k_lclInds1D_
 Local column indices for all rows. More...
 
t_GlobalOrdinal_1D k_gblInds1D_
 Global column indices for all rows. More...
 
local_graph_type::row_map_type::const_type k_rowPtrs_
 Row offsets for "1-D" storage. More...
 

2-D storage (DynamicProfile) data structures

2-D storage exists only if the graph was allocated with DynamicProfile. All of these data structures exist in host memory. Currently, NONE of them are thread safe, let alone thread scalable. These data structures only exist to support legacy use cases. At some point, we may add a thread-scalable intermediate level of "dynamicity" between 2-D storage and 1-D storage (StaticProfile), which bounds the total number of entries allowed per process, but does not otherwise bound the number of entries per row.

typedef Kokkos::View< size_t *, Kokkos::LayoutLeft, device_type >::HostMirror num_row_entries_type
 The type of k_numRowEntries_ (see below). More...
 
Teuchos::ArrayRCP< Teuchos::Array< LocalOrdinal > > lclInds2D_
 Local column indices for all rows. More...
 
Teuchos::ArrayRCP< Teuchos::Array< GlobalOrdinal > > gblInds2D_
 Global column indices for all rows. More...
 
num_row_entries_type k_numRowEntries_
 The number of local entries in each locally owned row. More...
 
::Tpetra::Details::EStorageStatus storageStatus_
 Status of the graph's storage, when not in a fill-complete state. More...
 
bool indicesAreAllocated_
 
bool indicesAreLocal_
 
bool indicesAreGlobal_
 
bool fillComplete_
 
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::vector< GlobalOrdinal > > nonlocals_
 Nonlocal data given to insertGlobalIndices. More...
 
bool sortGhostsAssociatedWithEachProcessor_
 Whether to require makeColMap() (and therefore fillComplete()) to order column Map GIDs associated with each remote process in ascending order. More...
 

Methods for use only by experts

typedef Kokkos::Device< typename device_type::execution_space, buffer_memory_spacebuffer_device_type
 Kokkos::Device specialization for communication buffers. More...
 
enum  ReverseOption
 Whether the data transfer should be performed in forward or reverse mode. More...
 
typedef device_type::memory_space buffer_memory_space
 Kokkos memory space for communication buffers. More...
 
virtual void removeEmptyProcessesInPlace (const Teuchos::RCP< const map_type > &newMap)
 Remove processes which contain no entries in this object's Map. More...
 
virtual size_t constantNumberOfPackets () const
 Whether the implementation's instance promises always to have a constant number of packets per LID (local index), and if so, how many packets per LID there are. More...
 
virtual void doTransfer (const SrcDistObject &src, const ::Tpetra::Details::Transfer< local_ordinal_type, global_ordinal_type, node_type > &transfer, const char modeString[], const ReverseOption revOp, const CombineMode CM)
 Redistribute data across memory images. More...
 
virtual bool reallocArraysForNumPacketsPerLid (const size_t numExportLIDs, const size_t numImportLIDs)
 Reallocate numExportPacketsPerLID_ and/or numImportPacketsPerLID_, if necessary. More...
 
virtual void doTransferOld (const SrcDistObject &src, CombineMode CM, size_t numSameIDs, const Teuchos::ArrayView< const local_ordinal_type > &permuteToLIDs, const Teuchos::ArrayView< const local_ordinal_type > &permuteFromLIDs, const Teuchos::ArrayView< const local_ordinal_type > &remoteLIDs, const Teuchos::ArrayView< const local_ordinal_type > &exportLIDs, Distributor &distor, ReverseOption revOp)
 
virtual void doTransferNew (const SrcDistObject &src, const CombineMode CM, const size_t numSameIDs, const Kokkos::DualView< const local_ordinal_type *, device_type > &permuteToLIDs, const Kokkos::DualView< const local_ordinal_type *, device_type > &permuteFromLIDs, const Kokkos::DualView< const local_ordinal_type *, device_type > &remoteLIDs, const Kokkos::DualView< const local_ordinal_type *, device_type > &exportLIDs, Distributor &distor, const ReverseOption revOp, const bool commOnHost)
 

Methods implemented by subclasses and used by doTransfer().

The doTransfer() method uses the subclass' implementations of these methods to implement data transfer. Subclasses of DistObject must implement these methods. This is an instance of the Template Method Pattern. ("Template" here doesn't mean "C++ template"; it means "pattern with holes that are filled in by the subclass' method implementations.")

Teuchos::RCP< const map_typemap_
 The Map over which this object is distributed. More...
 
Kokkos::DualView< packet_type *, buffer_device_typeimports_
 Buffer into which packed data are imported (received from other processes). More...
 
Kokkos::DualView< size_t *, buffer_device_typenumImportPacketsPerLID_
 Number of packets to receive for each receive operation. More...
 
Kokkos::DualView< packet_type *, buffer_device_typeexports_
 Buffer from which packed data are exported (sent to other processes). More...
 
Kokkos::DualView< size_t *, buffer_device_typenumExportPacketsPerLID_
 Number of packets to send for each send operation. More...
 
virtual bool useNewInterface ()
 Whether the subclass implements the "old" or "new" (Kokkos-friendly) interface. More...
 
virtual void copyAndPermute (const SrcDistObject &source, size_t numSameIDs, const Teuchos::ArrayView< const local_ordinal_type > &permuteToLIDs, const Teuchos::ArrayView< const local_ordinal_type > &permuteFromLIDs)
 Perform copies and permutations that are local to this process. More...
 
virtual void copyAndPermuteNew (const SrcDistObject &source, const size_t numSameIDs, const Kokkos::DualView< const local_ordinal_type *, device_type > &permuteToLIDs, const Kokkos::DualView< const local_ordinal_type *, device_type > &permuteFromLIDs)
 
virtual void packAndPrepare (const SrcDistObject &source, const Teuchos::ArrayView< const local_ordinal_type > &exportLIDs, Teuchos::Array< packet_type > &exports, const Teuchos::ArrayView< size_t > &numPacketsPerLID, size_t &constantNumPackets, Distributor &distor)
 Perform any packing or preparation required for communication. More...
 
virtual void packAndPrepareNew (const SrcDistObject &source, const Kokkos::DualView< const local_ordinal_type *, device_type > &exportLIDs, Kokkos::DualView< packet_type *, buffer_device_type > &exports, const Kokkos::DualView< size_t *, buffer_device_type > &numPacketsPerLID, size_t &constantNumPackets, Distributor &distor)
 
virtual void unpackAndCombine (const Teuchos::ArrayView< const local_ordinal_type > &importLIDs, const Teuchos::ArrayView< const packet_type > &imports, const Teuchos::ArrayView< size_t > &numPacketsPerLID, size_t constantNumPackets, Distributor &distor, CombineMode CM)
 Perform any unpacking and combining after communication (old version that uses Teuchos memory management classes to hold data). More...
 
virtual void unpackAndCombineNew (const Kokkos::DualView< const local_ordinal_type *, device_type > &importLIDs, const Kokkos::DualView< const packet_type *, buffer_device_type > &imports, const Kokkos::DualView< const size_t *, buffer_device_type > &numPacketsPerLID, const size_t constantNumPackets, Distributor &distor, const CombineMode CM)
 Perform any unpacking and combining after communication (new version that uses Kokkos data structures to hold data). More...
 
virtual void createViews () const
 Hook for creating a const view. More...
 
virtual void createViewsNonConst (KokkosClassic::ReadWriteOption rwo)
 Hook for creating a nonconst view. More...
 
virtual void releaseViews () const
 Hook for releasing views. More...
 
bool reallocImportsIfNeeded (const size_t newSize, const bool debug=false)
 Reallocate imports_ if needed. More...
 

Detailed Description

template<class LocalOrdinal = ::Tpetra::Details::DefaultTypes::local_ordinal_type, class GlobalOrdinal = ::Tpetra::Details::DefaultTypes::global_ordinal_type, class Node = ::Tpetra::Details::DefaultTypes::node_type>
class Tpetra::Classes::CrsGraph< LocalOrdinal, GlobalOrdinal, Node >

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

Template Parameters
LocalOrdinalThe type of local indices. See the documentation of Map for requirements.
GlobalOrdinalThe type of global indices. See the documentation of Map for requirements.
NodeThe Kokkos Node type. See the documentation of Map for requirements.

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 259 of file Tpetra_CrsGraph_decl.hpp.

Member Typedef Documentation

◆ local_ordinal_type

template<class LocalOrdinal = ::Tpetra::Details::DefaultTypes::local_ordinal_type, class GlobalOrdinal = ::Tpetra::Details::DefaultTypes::global_ordinal_type, class Node = ::Tpetra::Details::DefaultTypes::node_type>
typedef LocalOrdinal Tpetra::Classes::CrsGraph< LocalOrdinal, GlobalOrdinal, Node >::local_ordinal_type

This class' first template parameter; the type of local indices.

Definition at line 278 of file Tpetra_CrsGraph_decl.hpp.

◆ global_ordinal_type

template<class LocalOrdinal = ::Tpetra::Details::DefaultTypes::local_ordinal_type, class GlobalOrdinal = ::Tpetra::Details::DefaultTypes::global_ordinal_type, class Node = ::Tpetra::Details::DefaultTypes::node_type>
typedef GlobalOrdinal Tpetra::Classes::CrsGraph< LocalOrdinal, GlobalOrdinal, Node >::global_ordinal_type

This class' second template parameter; the type of global indices.

Definition at line 280 of file Tpetra_CrsGraph_decl.hpp.

◆ node_type

template<class LocalOrdinal = ::Tpetra::Details::DefaultTypes::local_ordinal_type, class GlobalOrdinal = ::Tpetra::Details::DefaultTypes::global_ordinal_type, class Node = ::Tpetra::Details::DefaultTypes::node_type>
typedef Node Tpetra::Classes::CrsGraph< LocalOrdinal, GlobalOrdinal, Node >::node_type

This class' Kokkos Node type.

Definition at line 282 of file Tpetra_CrsGraph_decl.hpp.

◆ device_type

template<class LocalOrdinal = ::Tpetra::Details::DefaultTypes::local_ordinal_type, class GlobalOrdinal = ::Tpetra::Details::DefaultTypes::global_ordinal_type, class Node = ::Tpetra::Details::DefaultTypes::node_type>
typedef Node::device_type Tpetra::Classes::CrsGraph< LocalOrdinal, GlobalOrdinal, Node >::device_type

This class' Kokkos device type.

Definition at line 285 of file Tpetra_CrsGraph_decl.hpp.

◆ execution_space

template<class LocalOrdinal = ::Tpetra::Details::DefaultTypes::local_ordinal_type, class GlobalOrdinal = ::Tpetra::Details::DefaultTypes::global_ordinal_type, class Node = ::Tpetra::Details::DefaultTypes::node_type>
typedef device_type::execution_space Tpetra::Classes::CrsGraph< LocalOrdinal, GlobalOrdinal, Node >::execution_space

This class' Kokkos execution space.

Definition at line 287 of file Tpetra_CrsGraph_decl.hpp.

◆ local_graph_type

template<class LocalOrdinal = ::Tpetra::Details::DefaultTypes::local_ordinal_type, class GlobalOrdinal = ::Tpetra::Details::DefaultTypes::global_ordinal_type, class Node = ::Tpetra::Details::DefaultTypes::node_type>
typedef Kokkos::StaticCrsGraph<LocalOrdinal, Kokkos::LayoutLeft, execution_space> Tpetra::Classes::CrsGraph< LocalOrdinal, GlobalOrdinal, Node >::local_graph_type

The type of the part of the sparse graph on each MPI process.

Definition at line 292 of file Tpetra_CrsGraph_decl.hpp.

◆ TPETRA_DEPRECATED [1/4]

template<class LocalOrdinal = ::Tpetra::Details::DefaultTypes::local_ordinal_type, class GlobalOrdinal = ::Tpetra::Details::DefaultTypes::global_ordinal_type, class Node = ::Tpetra::Details::DefaultTypes::node_type>
typedef local_graph_type LocalStaticCrsGraphType Tpetra::Classes::CrsGraph< LocalOrdinal, GlobalOrdinal, Node >::TPETRA_DEPRECATED

DEPRECATED; use local_graph_type (above) instead.

Definition at line 294 of file Tpetra_CrsGraph_decl.hpp.

◆ TPETRA_DEPRECATED [2/4]

template<class LocalOrdinal = ::Tpetra::Details::DefaultTypes::local_ordinal_type, class GlobalOrdinal = ::Tpetra::Details::DefaultTypes::global_ordinal_type, class Node = ::Tpetra::Details::DefaultTypes::node_type>
typedef local_graph_type::row_map_type t_RowPtrs Tpetra::Classes::CrsGraph< LocalOrdinal, GlobalOrdinal, Node >::TPETRA_DEPRECATED

DEPRECATED; use local_graph_type::row_map_type instead.

Definition at line 297 of file Tpetra_CrsGraph_decl.hpp.

◆ TPETRA_DEPRECATED [3/4]

template<class LocalOrdinal = ::Tpetra::Details::DefaultTypes::local_ordinal_type, class GlobalOrdinal = ::Tpetra::Details::DefaultTypes::global_ordinal_type, class Node = ::Tpetra::Details::DefaultTypes::node_type>
typedef local_graph_type::row_map_type::non_const_type t_RowPtrsNC Tpetra::Classes::CrsGraph< LocalOrdinal, GlobalOrdinal, Node >::TPETRA_DEPRECATED

DEPRECATED; use local_graph_type::row_map_type::non_const_type instead.

Definition at line 299 of file Tpetra_CrsGraph_decl.hpp.

◆ TPETRA_DEPRECATED [4/4]

template<class LocalOrdinal = ::Tpetra::Details::DefaultTypes::local_ordinal_type, class GlobalOrdinal = ::Tpetra::Details::DefaultTypes::global_ordinal_type, class Node = ::Tpetra::Details::DefaultTypes::node_type>
typedef local_graph_type::entries_type::non_const_type t_LocalOrdinal_1D Tpetra::Classes::CrsGraph< LocalOrdinal, GlobalOrdinal, Node >::TPETRA_DEPRECATED

DEPRECATED; use local_graph_type::entries_type::non_const_type instead.

Definition at line 301 of file Tpetra_CrsGraph_decl.hpp.

◆ map_type

template<class LocalOrdinal = ::Tpetra::Details::DefaultTypes::local_ordinal_type, class GlobalOrdinal = ::Tpetra::Details::DefaultTypes::global_ordinal_type, class Node = ::Tpetra::Details::DefaultTypes::node_type>
using Tpetra::Classes::CrsGraph< LocalOrdinal, GlobalOrdinal, Node >::map_type = ::Tpetra::Map<LocalOrdinal, GlobalOrdinal, Node>

The Map specialization used by this class.

Definition at line 304 of file Tpetra_CrsGraph_decl.hpp.

◆ import_type

template<class LocalOrdinal = ::Tpetra::Details::DefaultTypes::local_ordinal_type, class GlobalOrdinal = ::Tpetra::Details::DefaultTypes::global_ordinal_type, class Node = ::Tpetra::Details::DefaultTypes::node_type>
using Tpetra::Classes::CrsGraph< LocalOrdinal, GlobalOrdinal, Node >::import_type = ::Tpetra::Import<LocalOrdinal, GlobalOrdinal, Node>

The Import specialization used by this class.

Definition at line 306 of file Tpetra_CrsGraph_decl.hpp.

◆ export_type

template<class LocalOrdinal = ::Tpetra::Details::DefaultTypes::local_ordinal_type, class GlobalOrdinal = ::Tpetra::Details::DefaultTypes::global_ordinal_type, class Node = ::Tpetra::Details::DefaultTypes::node_type>
using Tpetra::Classes::CrsGraph< LocalOrdinal, GlobalOrdinal, Node >::export_type = ::Tpetra::Export<LocalOrdinal, GlobalOrdinal, Node>

The Export specialization used by this class.

Definition at line 308 of file Tpetra_CrsGraph_decl.hpp.

◆ t_GlobalOrdinal_1D

template<class LocalOrdinal = ::Tpetra::Details::DefaultTypes::local_ordinal_type, class GlobalOrdinal = ::Tpetra::Details::DefaultTypes::global_ordinal_type, class Node = ::Tpetra::Details::DefaultTypes::node_type>
typedef Kokkos::View<GlobalOrdinal*, execution_space> Tpetra::Classes::CrsGraph< LocalOrdinal, GlobalOrdinal, Node >::t_GlobalOrdinal_1D
protected

Type of the k_gblInds1D_ array of global column indices.

Definition at line 2177 of file Tpetra_CrsGraph_decl.hpp.

◆ num_row_entries_type

template<class LocalOrdinal = ::Tpetra::Details::DefaultTypes::local_ordinal_type, class GlobalOrdinal = ::Tpetra::Details::DefaultTypes::global_ordinal_type, class Node = ::Tpetra::Details::DefaultTypes::node_type>
typedef Kokkos::View<size_t*, Kokkos::LayoutLeft, device_type>::HostMirror Tpetra::Classes::CrsGraph< LocalOrdinal, GlobalOrdinal, Node >::num_row_entries_type
protected

The type of k_numRowEntries_ (see below).

This View gets used only on host. However, making this literally a host View (of Kokkos::HostSpace) causes inexplicable test failures only on CUDA. Thus, I left it as a HostMirror, which means (given Trilinos' current UVM requirement) that it will be a UVM allocation.

Definition at line 2261 of file Tpetra_CrsGraph_decl.hpp.

◆ packet_type

typedef ::Kokkos::Details::ArithTraits<::Tpetra::Details::DefaultTypes::global_ordinal_type >::val_type Tpetra::Classes::DistObject< ::Tpetra::Details::DefaultTypes::global_ordinal_type , ::Tpetra::Details::DefaultTypes::local_ordinal_type , ::Tpetra::Details::DefaultTypes::global_ordinal_type , ::Tpetra::Details::DefaultTypes::node_type >::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 361 of file Tpetra_DistObject_decl.hpp.

◆ buffer_memory_space

Tpetra::Classes::DistObject< ::Tpetra::Details::DefaultTypes::global_ordinal_type , ::Tpetra::Details::DefaultTypes::local_ordinal_type , ::Tpetra::Details::DefaultTypes::global_ordinal_type , ::Tpetra::Details::DefaultTypes::node_type >::buffer_memory_space
protectedinherited

Kokkos memory space for communication buffers.

See #1088 for why this is not just device_type::memory_space.

Definition at line 693 of file Tpetra_DistObject_decl.hpp.

◆ buffer_device_type

Tpetra::Classes::DistObject< ::Tpetra::Details::DefaultTypes::global_ordinal_type , ::Tpetra::Details::DefaultTypes::local_ordinal_type , ::Tpetra::Details::DefaultTypes::global_ordinal_type , ::Tpetra::Details::DefaultTypes::node_type >::buffer_device_type
inherited

Kokkos::Device specialization for communication buffers.

See #1088 for why this is not just device_type::device_type.

This needs to be public so that I can declare functions like packAndPrepareWithOwningPIDs.

Warning
This is an implementation detail. DO NOT DEPEND ON IT. It may disappear or change at any time.

Definition at line 710 of file Tpetra_DistObject_decl.hpp.

Member Enumeration Documentation

◆ ReverseOption

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 605 of file Tpetra_DistObject_decl.hpp.

Constructor & Destructor Documentation

◆ CrsGraph() [1/10]

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

Constructor specifying a single upper bound for the number of entries in all rows on the calling process.

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

◆ CrsGraph() [2/10]

template<class LocalOrdinal , class GlobalOrdinal , class Node >
Tpetra::Classes::CrsGraph< LocalOrdinal, GlobalOrdinal, Node >::CrsGraph ( const Teuchos::RCP< const map_type > &  rowMap,
const Kokkos::DualView< const size_t *, execution_space > &  numEntPerRow,
const ProfileType  pftype = DynamicProfile,
const Teuchos::RCP< Teuchos::ParameterList > &  params = Teuchos::null 
)

Constructor specifying a (possibly different) upper bound for the number of entries in each row.

Parameters
rowMap[in] Distribution of rows of the graph.
numEntPerRow[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 385 of file Tpetra_CrsGraph_def.hpp.

◆ CrsGraph() [3/10]

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

Constructor specifying a (possibly different) upper bound for the number of entries in each row (legacy KokkosClassic version).

Parameters
rowMap[in] Distribution of rows of the graph.
numEntPerRow[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 313 of file Tpetra_CrsGraph_def.hpp.

◆ CrsGraph() [4/10]

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

Constructor specifying column Map and a single upper bound for the number of entries in all rows on the calling process.

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

◆ CrsGraph() [5/10]

template<class LocalOrdinal , class GlobalOrdinal , class Node >
Tpetra::Classes::CrsGraph< LocalOrdinal, GlobalOrdinal, Node >::CrsGraph ( const Teuchos::RCP< const map_type > &  rowMap,
const Teuchos::RCP< const map_type > &  colMap,
const Kokkos::DualView< const size_t *, execution_space > &  numEntPerRow,
ProfileType  pftype = DynamicProfile,
const Teuchos::RCP< Teuchos::ParameterList > &  params = Teuchos::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.
numEntPerRow[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 444 of file Tpetra_CrsGraph_def.hpp.

◆ CrsGraph() [6/10]

template<class LocalOrdinal , class GlobalOrdinal , class Node >
Tpetra::Classes::CrsGraph< LocalOrdinal, GlobalOrdinal, Node >::CrsGraph ( const Teuchos::RCP< const map_type > &  rowMap,
const Teuchos::RCP< const map_type > &  colMap,
const Teuchos::ArrayRCP< const size_t > &  numEntPerRow,
ProfileType  pftype = DynamicProfile,
const Teuchos::RCP< Teuchos::ParameterList > &  params = Teuchos::null 
)

Constructor specifying column Map and number of entries in each row (legacy KokkosClassic version).

Parameters
rowMap[in] Distribution of rows of the graph.
colMap[in] Distribution of columns of the graph.
numEntPerRow[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 505 of file Tpetra_CrsGraph_def.hpp.

◆ CrsGraph() [7/10]

template<class LocalOrdinal , class GlobalOrdinal , class Node >
Tpetra::Classes::CrsGraph< LocalOrdinal, GlobalOrdinal, Node >::CrsGraph ( const Teuchos::RCP< const map_type > &  rowMap,
const Teuchos::RCP< const map_type > &  colMap,
const typename local_graph_type::row_map_type &  rowPointers,
const typename local_graph_type::entries_type::non_const_type &  columnIndices,
const Teuchos::RCP< Teuchos::ParameterList > &  params = Teuchos::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 581 of file Tpetra_CrsGraph_def.hpp.

◆ CrsGraph() [8/10]

template<class LocalOrdinal , class GlobalOrdinal , class Node >
Tpetra::Classes::CrsGraph< LocalOrdinal, GlobalOrdinal, Node >::CrsGraph ( const Teuchos::RCP< const map_type > &  rowMap,
const Teuchos::RCP< const map_type > &  colMap,
const Teuchos::ArrayRCP< size_t > &  rowPointers,
const Teuchos::ArrayRCP< LocalOrdinal > &  columnIndices,
const Teuchos::RCP< Teuchos::ParameterList > &  params = Teuchos::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 617 of file Tpetra_CrsGraph_def.hpp.

◆ CrsGraph() [9/10]

template<class LocalOrdinal , class GlobalOrdinal , class Node >
Tpetra::Classes::CrsGraph< LocalOrdinal, GlobalOrdinal, Node >::CrsGraph ( const Teuchos::RCP< const map_type > &  rowMap,
const Teuchos::RCP< const map_type > &  colMap,
const local_graph_type lclGraph,
const Teuchos::RCP< Teuchos::ParameterList > &  params 
)

Constructor specifying column Map and a local (sorted) graph, which the resulting CrsGraph views.

Unlike most other CrsGraph constructors, successful completion of this constructor will result in a fill-complete graph.

Parameters
rowMap[in] Distribution of rows of the graph.
colMap[in] Distribution of columns of the graph.
lclGraph[in] A locally indexed Kokkos::StaticCrsGraph whose local row indices come from the specified row Map, and whose local column indices come from the specified column Map.
params[in/out] Optional list of parameters. If not null, any missing parameters will be filled in with their default values.

Definition at line 653 of file Tpetra_CrsGraph_def.hpp.

◆ CrsGraph() [10/10]

template<class LocalOrdinal , class GlobalOrdinal , class Node >
Tpetra::Classes::CrsGraph< LocalOrdinal, GlobalOrdinal, Node >::CrsGraph ( const local_graph_type lclGraph,
const Teuchos::RCP< const map_type > &  rowMap,
const Teuchos::RCP< const map_type > &  colMap,
const Teuchos::RCP< const map_type > &  domainMap = Teuchos::null,
const Teuchos::RCP< const map_type > &  rangeMap = Teuchos::null,
const Teuchos::RCP< Teuchos::ParameterList > &  params = Teuchos::null 
)

Constructor specifying column, domain and range maps, and a local (sorted) graph, which the resulting CrsGraph views.

Unlike most other CrsGraph constructors, successful completion of this constructor will result in a fill-complete graph.

Parameters
rowMap[in] Distribution of rows of the graph.
colMap[in] Distribution of columns of the graph.
domainMap[in] The graph's domain Map. MUST be one to one!
rangeMap[in] The graph's range Map. MUST be one to one! May be, but need not be, the same as the domain Map.
lclGraph[in] A locally indexed Kokkos::StaticCrsGraph whose local row indices come from the specified row Map, and whose local column indices come from the specified column Map.
params[in/out] Optional list of parameters. If not null, any missing parameters will be filled in with their default values.

Definition at line 667 of file Tpetra_CrsGraph_def.hpp.

◆ ~CrsGraph()

template<class LocalOrdinal , class GlobalOrdinal , class Node >
Tpetra::Classes::CrsGraph< LocalOrdinal, GlobalOrdinal, Node >::~CrsGraph
virtual

Destructor.

Definition at line 746 of file Tpetra_CrsGraph_def.hpp.

Member Function Documentation

◆ clone()

template<class LocalOrdinal = ::Tpetra::Details::DefaultTypes::local_ordinal_type, class GlobalOrdinal = ::Tpetra::Details::DefaultTypes::global_ordinal_type, class Node = ::Tpetra::Details::DefaultTypes::node_type>
template<class Node2 >
Teuchos::RCP<CrsGraph<LocalOrdinal, GlobalOrdinal, Node2> > Tpetra::Classes::CrsGraph< LocalOrdinal, GlobalOrdinal, Node >::clone ( const Teuchos::RCP< Node2 > &  node2,
const Teuchos::RCP< Teuchos::ParameterList > &  params = Teuchos::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 590 of file Tpetra_CrsGraph_decl.hpp.

◆ setParameterList()

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

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

Definition at line 789 of file Tpetra_CrsGraph_def.hpp.

◆ getValidParameters()

template<class LocalOrdinal , class GlobalOrdinal , class Node >
Teuchos::RCP< const Teuchos::ParameterList > Tpetra::Classes::CrsGraph< LocalOrdinal, GlobalOrdinal, Node >::getValidParameters
override

Default parameter list suitable for validation.

Definition at line 752 of file Tpetra_CrsGraph_def.hpp.

◆ insertGlobalIndices() [1/2]

template<class LocalOrdinal , class GlobalOrdinal , class Node >
void Tpetra::Classes::CrsGraph< LocalOrdinal, GlobalOrdinal, Node >::insertGlobalIndices ( const GlobalOrdinal  globalRow,
const Teuchos::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 3213 of file Tpetra_CrsGraph_def.hpp.

◆ insertGlobalIndices() [2/2]

template<class LocalOrdinal , class GlobalOrdinal , class Node >
void Tpetra::Classes::CrsGraph< LocalOrdinal, GlobalOrdinal, Node >::insertGlobalIndices ( const GlobalOrdinal  globalRow,
const LocalOrdinal  numEnt,
const GlobalOrdinal  inds[] 
)

Epetra compatibility version of insertGlobalIndices (see above) that takes input as a raw pointer, rather than Teuchos::ArrayView.

Arguments are the same and in the same order as Epetra_CrsGraph::InsertGlobalIndices.

Definition at line 3136 of file Tpetra_CrsGraph_def.hpp.

◆ insertLocalIndices() [1/2]

template<class LocalOrdinal , class GlobalOrdinal , class Node >
void Tpetra::Classes::CrsGraph< LocalOrdinal, GlobalOrdinal, Node >::insertLocalIndices ( const LocalOrdinal  localRow,
const Teuchos::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 3056 of file Tpetra_CrsGraph_def.hpp.

◆ insertLocalIndices() [2/2]

template<class LocalOrdinal , class GlobalOrdinal , class Node >
void Tpetra::Classes::CrsGraph< LocalOrdinal, GlobalOrdinal, Node >::insertLocalIndices ( const LocalOrdinal  localRow,
const LocalOrdinal  numEnt,
const LocalOrdinal  inds[] 
)

Epetra compatibility version of insertLocalIndices (see above) that takes input as a raw pointer, rather than Teuchos::ArrayView.

Arguments are the same and in the same order as Epetra_CrsGraph::InsertMyIndices.

Definition at line 3124 of file Tpetra_CrsGraph_def.hpp.

◆ removeLocalIndices()

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

◆ globalAssemble()

template<class LocalOrdinal , class GlobalOrdinal , class Node >
void Tpetra::Classes::CrsGraph< LocalOrdinal, GlobalOrdinal, Node >::globalAssemble

Communicate nonlocal contributions to other processes.

This method is called automatically by fillComplete(). Most users do not need to call this themselves.

This method must be called collectively (that is, like any MPI collective) over all processes in the graph's communicator.

Definition at line 3567 of file Tpetra_CrsGraph_def.hpp.

◆ resumeFill()

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

Resume fill operations.

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

resumeFill() may be called repeatedly.

Warning
A CrsGraph instance does not currently (as of 23 Jul 2017) and never did support arbitrary structure changes after the first fillComplete call on that instance. The safest thing to do is not to change structure at all after first fillComplete.
Postcondition
isFillActive() == true
isFillComplete() == false

This method must be called collectively (that is, like any MPI collective) over all processes in the graph's communicator.

Definition at line 3729 of file Tpetra_CrsGraph_def.hpp.

◆ fillComplete() [1/2]

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

Tell the graph that you are done changing its structure.

This tells the graph to optimize its data structures for computational kernels, and to prepare (MPI) communication patterns.

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

This method must be called collectively (that is, like any MPI collective) over all processes in the graph's communicator.

Warning
The domain Map and row Map arguments to this method MUST be one to one! If you have Maps that are not one to one, and you do not know how to make a Map that covers the same global indices but is one to one, then you may call Tpetra::createOneToOne() (see Map's header file) to make a one-to-one version of your Map.
Precondition
isFillActive() && ! isFillComplete()
Postcondition
! isFillActive() && isFillComplete()
Parameters
domainMap[in] The graph's domain Map. MUST be one to one!
rangeMap[in] The graph's range Map. MUST be one to one! May be, but need not be, the same as the domain Map.
params[in/out] List of parameters controlling this method's behavior. See below for valid parameters.

List of valid parameters in params:

Definition at line 3784 of file Tpetra_CrsGraph_def.hpp.

◆ fillComplete() [2/2]

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

Tell the graph that you are done changing its structure; set default domain and range Maps.

See above three-argument version of fillComplete for full documentation. If the graph does not yet have domain and range Maps (i.e., if fillComplete has not yet been called on this graph at least once), then this method uses the graph's row Map (result of this->getRowMap()) as both the domain Map and the range Map. Otherwise, this method uses the graph's existing domain and range Maps.

This method must be called collectively (that is, like any MPI collective) over all processes in the graph's communicator.

Warning
It is only valid to call this overload of fillComplete if the row Map is one to one! If the row Map is NOT one to one, you must call the above three-argument version of fillComplete, and supply one-to-one domain and range Maps. If you have Maps that are not one to one, and you do not know how to make a Map that covers the same global indices but is one to one, then you may call Tpetra::createOneToOne() (see Map's header file) to make a one-to-one version of your Map.
Parameters
params[in/out] List of parameters controlling this method's behavior. See documentation of the three-argument version of fillComplete (above) for valid parameters.

Definition at line 3757 of file Tpetra_CrsGraph_def.hpp.

◆ expertStaticFillComplete()

template<class LocalOrdinal , class GlobalOrdinal , class Node >
void Tpetra::Classes::CrsGraph< LocalOrdinal, GlobalOrdinal, Node >::expertStaticFillComplete ( const Teuchos::RCP< const map_type > &  domainMap,
const Teuchos::RCP< const map_type > &  rangeMap,
const Teuchos::RCP< const import_type > &  importer = Teuchos::null,
const Teuchos::RCP< const export_type > &  exporter = Teuchos::null,
const Teuchos::RCP< Teuchos::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. 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.

This method must be called collectively (that is, like any MPI collective) over all processes in the graph's communicator.

Warning
This method is intended for expert developer use only, and should never be called by user code.
Parameters
domainMap[in] The graph's domain Map. MUST be one to one!
rangeMap[in] The graph's range Map. MUST be one to one! May be, but need not be, the same as the domain Map.
importer[in] Import from the graph's domain Map to its column Map. If no Import is necessary (i.e., if the domain and column Maps are the same, in the sense of Tpetra::Map::isSameAs), then this may be Teuchos::null.
exporter[in] Export from the graph's row Map to its range Map. If no Export is necessary (i.e., if the row and range Maps are the same, in the sense of Tpetra::Map::isSameAs), then this may be Teuchos::null.
params[in/out] List of parameters controlling this method's behavior.

Definition at line 3947 of file Tpetra_CrsGraph_def.hpp.

◆ getComm() [1/2]

template<class LocalOrdinal , class GlobalOrdinal , class Node >
Teuchos::RCP< const Teuchos::Comm< int > > Tpetra::Classes::CrsGraph< LocalOrdinal, GlobalOrdinal, Node >::getComm
override

Returns the communicator.

Definition at line 1218 of file Tpetra_CrsGraph_def.hpp.

◆ getNode() [1/2]

template<class LocalOrdinal , class GlobalOrdinal , class Node >
Teuchos::RCP< Node > Tpetra::Classes::CrsGraph< LocalOrdinal, GlobalOrdinal, Node >::getNode
override

Returns the underlying node.

Definition at line 894 of file Tpetra_CrsGraph_def.hpp.

◆ getRowMap() [1/2]

template<class LocalOrdinal , class GlobalOrdinal , class Node >
Teuchos::RCP< const typename CrsGraph< LocalOrdinal, GlobalOrdinal, Node >::map_type > Tpetra::Classes::CrsGraph< LocalOrdinal, GlobalOrdinal, Node >::getRowMap
override

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

Definition at line 903 of file Tpetra_CrsGraph_def.hpp.

◆ getColMap() [1/2]

template<class LocalOrdinal , class GlobalOrdinal , class Node >
Teuchos::RCP< const typename CrsGraph< LocalOrdinal, GlobalOrdinal, Node >::map_type > Tpetra::Classes::CrsGraph< LocalOrdinal, GlobalOrdinal, Node >::getColMap
override

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

Definition at line 912 of file Tpetra_CrsGraph_def.hpp.

◆ getDomainMap() [1/2]

template<class LocalOrdinal , class GlobalOrdinal , class Node >
Teuchos::RCP< const typename CrsGraph< LocalOrdinal, GlobalOrdinal, Node >::map_type > Tpetra::Classes::CrsGraph< LocalOrdinal, GlobalOrdinal, Node >::getDomainMap
override

Returns the Map associated with the domain of this graph.

Definition at line 921 of file Tpetra_CrsGraph_def.hpp.

◆ getRangeMap() [1/2]

template<class LocalOrdinal , class GlobalOrdinal , class Node >
Teuchos::RCP< const typename CrsGraph< LocalOrdinal, GlobalOrdinal, Node >::map_type > Tpetra::Classes::CrsGraph< LocalOrdinal, GlobalOrdinal, Node >::getRangeMap
override

Returns the Map associated with the domain of this graph.

Definition at line 930 of file Tpetra_CrsGraph_def.hpp.

◆ getImporter() [1/2]

template<class LocalOrdinal , class GlobalOrdinal , class Node >
Teuchos::RCP< const typename CrsGraph< LocalOrdinal, GlobalOrdinal, Node >::import_type > Tpetra::Classes::CrsGraph< LocalOrdinal, GlobalOrdinal, Node >::getImporter
override

Returns the importer associated with this graph.

Definition at line 939 of file Tpetra_CrsGraph_def.hpp.

◆ getExporter() [1/2]

template<class LocalOrdinal , class GlobalOrdinal , class Node >
Teuchos::RCP< const typename CrsGraph< LocalOrdinal, GlobalOrdinal, Node >::export_type > Tpetra::Classes::CrsGraph< LocalOrdinal, GlobalOrdinal, Node >::getExporter
override

Returns the exporter associated with this graph.

Definition at line 948 of file Tpetra_CrsGraph_def.hpp.

◆ getGlobalNumRows() [1/2]

template<class LocalOrdinal , class GlobalOrdinal , class Node >
global_size_t Tpetra::Classes::CrsGraph< LocalOrdinal, GlobalOrdinal, Node >::getGlobalNumRows
override

Returns the number of global rows in the graph.

Undefined if isFillActive().

Definition at line 801 of file Tpetra_CrsGraph_def.hpp.

◆ getGlobalNumCols() [1/2]

template<class LocalOrdinal , class GlobalOrdinal , class Node >
global_size_t Tpetra::Classes::CrsGraph< LocalOrdinal, GlobalOrdinal, Node >::getGlobalNumCols
override

Returns the number of global columns in the graph.

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

Definition at line 810 of file Tpetra_CrsGraph_def.hpp.

◆ getNodeNumRows() [1/2]

template<class LocalOrdinal , class GlobalOrdinal , class Node >
size_t Tpetra::Classes::CrsGraph< LocalOrdinal, GlobalOrdinal, Node >::getNodeNumRows
override

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

Definition at line 824 of file Tpetra_CrsGraph_def.hpp.

◆ getNodeNumCols() [1/2]

template<class LocalOrdinal , class GlobalOrdinal , class Node >
size_t Tpetra::Classes::CrsGraph< LocalOrdinal, GlobalOrdinal, Node >::getNodeNumCols
override

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

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

Definition at line 835 of file Tpetra_CrsGraph_def.hpp.

◆ getIndexBase() [1/2]

template<class LocalOrdinal , class GlobalOrdinal , class Node >
GlobalOrdinal Tpetra::Classes::CrsGraph< LocalOrdinal, GlobalOrdinal, Node >::getIndexBase
override

Returns the index base for global indices for this graph.

Definition at line 1227 of file Tpetra_CrsGraph_def.hpp.

◆ getGlobalNumEntries() [1/2]

template<class LocalOrdinal , class GlobalOrdinal , class Node >
global_size_t Tpetra::Classes::CrsGraph< LocalOrdinal, GlobalOrdinal, Node >::getGlobalNumEntries
override

Returns the global number of entries in the graph.

Undefined if isFillActive().

Definition at line 998 of file Tpetra_CrsGraph_def.hpp.

◆ getNodeNumEntries() [1/2]

template<class LocalOrdinal , class GlobalOrdinal , class Node >
size_t Tpetra::Classes::CrsGraph< LocalOrdinal, GlobalOrdinal, Node >::getNodeNumEntries
override

The local number of entries in the graph.

"Local" means "local to the calling (MPI) process."

Warning
If the graph is not fill complete, this may launch a thread-parallel computational kernel. This is because we do not store the number of entries as a separate integer field, since doing so and keeping it updated would hinder thread-parallel insertion of new entries. See #1357.

Definition at line 1013 of file Tpetra_CrsGraph_def.hpp.

◆ getNumEntriesInGlobalRow() [1/2]

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

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.

Definition at line 2747 of file Tpetra_CrsGraph_def.hpp.

◆ getNumEntriesInLocalRow() [1/2]

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

Get the number of entries in the given row (local index).

Returns
The number of entries in the given row, specified by local index, on the calling MPI process. If the specified local row index is invalid on the calling process, return Teuchos::OrdinalTraits<size_t>::invalid().

Definition at line 2762 of file Tpetra_CrsGraph_def.hpp.

◆ getNodeAllocationSize()

template<class LocalOrdinal , class GlobalOrdinal , class Node >
size_t Tpetra::Classes::CrsGraph< LocalOrdinal, GlobalOrdinal, Node >::getNodeAllocationSize

The local number of indices allocated for the graph, over all rows on the calling (MPI) process.

"Local" means "local to the calling (MPI) process."

Warning
If the graph is not fill complete, this may require computation. This is because we do not store the allocation count as a separate integer field, since doing so and keeping it updated would hinder thread-parallel insertion of new entries.

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

Returns
If indicesAreAllocated() is true, the allocation size. Otherwise, Tpetra::Details::OrdinalTraits<size_t>::invalid().

Definition at line 1164 of file Tpetra_CrsGraph_def.hpp.

◆ getNumAllocatedEntriesInGlobalRow()

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

Current number of allocated entries in the given row on the calling (MPI) process, using a global row index.

Returns
If the given row index is in the row Map on the calling process, then return this process' allocation size for that row. Otherwise, return Tpetra::Details::OrdinalTraits<size_t>::invalid().

Definition at line 2777 of file Tpetra_CrsGraph_def.hpp.

◆ getNumAllocatedEntriesInLocalRow()

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

Current number of allocated entries in the given row on the calling (MPI) process, using a local row index.

Returns
If the given row index is in the row Map on the calling process, then return this process' allocation size for that row. Otherwise, return Tpetra::Details::OrdinalTraits<size_t>::invalid().

Definition at line 2792 of file Tpetra_CrsGraph_def.hpp.

◆ getGlobalNumDiags() [1/2]

template<class LocalOrdinal , class GlobalOrdinal , class Node >
global_size_t Tpetra::Classes::CrsGraph< LocalOrdinal, GlobalOrdinal, Node >::getGlobalNumDiags
override

Number of diagonal entries over all processes in the graph's communicator.

Precondition
! this->isFillActive()
Warning
This method is DEPRECATED. DO NOT CALL IT. It may go away at any time.

Definition at line 885 of file Tpetra_CrsGraph_def.hpp.

◆ getGlobalNumDiagsImpl()

template<class LocalOrdinal , class GlobalOrdinal , class Node >
global_size_t Tpetra::Classes::CrsGraph< LocalOrdinal, GlobalOrdinal, Node >::getGlobalNumDiagsImpl
overridevirtual

DO NOT CALL THIS METHOD; THIS IS NOT FOR USERS.

Warning
DO NOT CALL THIS METHOD. THIS IS AN IMPLEMENTATION DETAIL OF TPETRA DESIGNED TO PREVENT SPURIOUS BUILD WARNINGS. DO NOT CALL THIS METHOD. IT WILL GO AWAY VERY SOON PER #2630.

This function exists only to prevent spurious deprecation warnings in CrsMatrix and BlockCrsMatrix. We only want users to see deprecated warnings if they call deprecated methods, not if we call them.

Implements Tpetra::Details::HasDeprecatedMethods2630_WarningThisClassIsNotForUsers.

Definition at line 870 of file Tpetra_CrsGraph_def.hpp.

◆ getNodeNumDiags() [1/2]

template<class LocalOrdinal , class GlobalOrdinal , class Node >
size_t Tpetra::Classes::CrsGraph< LocalOrdinal, GlobalOrdinal, Node >::getNodeNumDiags
override

Number of diagonal entries on the calling process.

Precondition
! this->isFillActive()
Warning
This method is DEPRECATED. DO NOT CALL IT. It may go away at any time.

Definition at line 861 of file Tpetra_CrsGraph_def.hpp.

◆ getNodeNumDiagsImpl()

template<class LocalOrdinal , class GlobalOrdinal , class Node >
size_t Tpetra::Classes::CrsGraph< LocalOrdinal, GlobalOrdinal, Node >::getNodeNumDiagsImpl
overridevirtual

DO NOT CALL THIS METHOD; THIS IS NOT FOR USERS.

Warning
DO NOT CALL THIS METHOD. THIS IS AN IMPLEMENTATION DETAIL OF TPETRA DESIGNED TO PREVENT SPURIOUS BUILD WARNINGS. DO NOT CALL THIS METHOD. IT WILL GO AWAY VERY SOON PER #2630.

This function exists only to prevent spurious deprecation warnings in CrsMatrix and BlockCrsMatrix. We only want users to see deprecated warnings if they call deprecated methods, not if we call them.

Implements Tpetra::Details::HasDeprecatedMethods2630_WarningThisClassIsNotForUsers.

Definition at line 852 of file Tpetra_CrsGraph_def.hpp.

◆ getGlobalMaxNumRowEntries() [1/2]

template<class LocalOrdinal , class GlobalOrdinal , class Node >
global_size_t Tpetra::Classes::CrsGraph< LocalOrdinal, GlobalOrdinal, Node >::getGlobalMaxNumRowEntries
override

Maximum number of entries in any row of the graph, over all processes in the graph's communicator.

Precondition
! isFillActive()
Note
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.

Definition at line 1068 of file Tpetra_CrsGraph_def.hpp.

◆ getNodeMaxNumRowEntries() [1/2]

template<class LocalOrdinal , class GlobalOrdinal , class Node >
size_t Tpetra::Classes::CrsGraph< LocalOrdinal, GlobalOrdinal, Node >::getNodeMaxNumRowEntries
override

Maximum number of entries in any row of the graph, on this process.

Precondition
! isFillActive()

Definition at line 1083 of file Tpetra_CrsGraph_def.hpp.

◆ hasColMap() [1/2]

template<class LocalOrdinal , class GlobalOrdinal , class Node >
bool Tpetra::Classes::CrsGraph< LocalOrdinal, GlobalOrdinal, Node >::hasColMap
override

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.

Definition at line 957 of file Tpetra_CrsGraph_def.hpp.

◆ isLowerTriangularImpl()

template<class LocalOrdinal , class GlobalOrdinal , class Node >
bool Tpetra::Classes::CrsGraph< LocalOrdinal, GlobalOrdinal, Node >::isLowerTriangularImpl
overridevirtual

DO NOT CALL THIS METHOD; THIS IS NOT FOR USERS.

Warning
DO NOT CALL THIS METHOD. THIS IS AN IMPLEMENTATION DETAIL OF TPETRA DESIGNED TO PREVENT SPURIOUS BUILD WARNINGS. DO NOT CALL THIS METHOD. IT WILL GO AWAY VERY SOON PER #2630.

This function exists only to prevent spurious deprecation warnings in CrsMatrix and BlockCrsMatrix. We only want users to see deprecated warnings if they call deprecated methods, not if we call them.

Implements Tpetra::Details::HasDeprecatedMethods2630_WarningThisClassIsNotForUsers.

Definition at line 1110 of file Tpetra_CrsGraph_def.hpp.

◆ isLowerTriangular() [1/2]

template<class LocalOrdinal , class GlobalOrdinal , class Node >
bool Tpetra::Classes::CrsGraph< LocalOrdinal, GlobalOrdinal, Node >::isLowerTriangular
override

Whether the graph is locally lower triangular.

Warning
DO NOT CALL THIS METHOD! This method is DEPRECATED and will DISAPPEAR VERY SOON per #2630.
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.

Definition at line 1119 of file Tpetra_CrsGraph_def.hpp.

◆ isUpperTriangularImpl()

template<class LocalOrdinal , class GlobalOrdinal , class Node >
bool Tpetra::Classes::CrsGraph< LocalOrdinal, GlobalOrdinal, Node >::isUpperTriangularImpl
overridevirtual

DO NOT CALL THIS METHOD; THIS IS NOT FOR USERS.

Warning
DO NOT CALL THIS METHOD. THIS IS AN IMPLEMENTATION DETAIL OF TPETRA DESIGNED TO PREVENT SPURIOUS BUILD WARNINGS. DO NOT CALL THIS METHOD. IT WILL GO AWAY VERY SOON PER #2630.

This function exists only to prevent spurious deprecation warnings in CrsMatrix and BlockCrsMatrix. We only want users to see deprecated warnings if they call deprecated methods, not if we call them.

Implements Tpetra::Details::HasDeprecatedMethods2630_WarningThisClassIsNotForUsers.

Definition at line 1128 of file Tpetra_CrsGraph_def.hpp.

◆ isUpperTriangular() [1/2]

template<class LocalOrdinal , class GlobalOrdinal , class Node >
bool Tpetra::Classes::CrsGraph< LocalOrdinal, GlobalOrdinal, Node >::isUpperTriangular
override

Whether the graph is locally upper triangular.

Warning
DO NOT CALL THIS METHOD! This method is DEPRECATED and will DISAPPEAR VERY SOON per #2630.
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.

Definition at line 1137 of file Tpetra_CrsGraph_def.hpp.

◆ isLocallyIndexed() [1/2]

template<class LocalOrdinal , class GlobalOrdinal , class Node >
bool Tpetra::Classes::CrsGraph< LocalOrdinal, GlobalOrdinal, Node >::isLocallyIndexed
override

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

Definition at line 1146 of file Tpetra_CrsGraph_def.hpp.

◆ isGloballyIndexed() [1/2]

template<class LocalOrdinal , class GlobalOrdinal , class Node >
bool Tpetra::Classes::CrsGraph< LocalOrdinal, GlobalOrdinal, Node >::isGloballyIndexed
override

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

Definition at line 1155 of file Tpetra_CrsGraph_def.hpp.

◆ isFillComplete() [1/2]

template<class LocalOrdinal , class GlobalOrdinal , class Node >
bool Tpetra::Classes::CrsGraph< LocalOrdinal, GlobalOrdinal, Node >::isFillComplete
override

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

Definition at line 1092 of file Tpetra_CrsGraph_def.hpp.

◆ isFillActive()

template<class LocalOrdinal , class GlobalOrdinal , class Node >
bool Tpetra::Classes::CrsGraph< LocalOrdinal, GlobalOrdinal, Node >::isFillActive

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

Definition at line 1101 of file Tpetra_CrsGraph_def.hpp.

◆ isSorted()

template<class LocalOrdinal , class GlobalOrdinal , class Node >
bool Tpetra::Classes::CrsGraph< LocalOrdinal, GlobalOrdinal, Node >::isSorted

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

◆ isStorageOptimized()

template<class LocalOrdinal , class GlobalOrdinal , class Node >
bool Tpetra::Classes::CrsGraph< LocalOrdinal, GlobalOrdinal, Node >::isStorageOptimized

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

◆ getProfileType()

template<class LocalOrdinal , class GlobalOrdinal , class Node >
ProfileType Tpetra::Classes::CrsGraph< LocalOrdinal, GlobalOrdinal, Node >::getProfileType

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

Definition at line 989 of file Tpetra_CrsGraph_def.hpp.

◆ getGlobalRowCopy() [1/2]

template<class LocalOrdinal , class GlobalOrdinal , class Node >
void Tpetra::Classes::CrsGraph< LocalOrdinal, GlobalOrdinal, Node >::getGlobalRowCopy ( GlobalOrdinal  GlobalRow,
const Teuchos::ArrayView< GlobalOrdinal > &  Indices,
size_t &  NumIndices 
) const
override

Get a copy of the given row, using global indices.

Parameters
GlobalRow[in] Global index of the row.
Indices[out] On output: Global column indices.
NumIndices[out] Number of indices returned.

Definition at line 2949 of file Tpetra_CrsGraph_def.hpp.

◆ getLocalRowCopy() [1/2]

template<class LocalOrdinal , class GlobalOrdinal , class Node >
void Tpetra::Classes::CrsGraph< LocalOrdinal, GlobalOrdinal, Node >::getLocalRowCopy ( LocalOrdinal  LocalRow,
const Teuchos::ArrayView< LocalOrdinal > &  indices,
size_t &  NumIndices 
) const
override

Get a copy of the given row, using local indices.

Parameters
LocalRow[in] Local index of the row.
Indices[out] On output: Local column indices.
NumIndices[out] Number of indices returned.
Precondition
hasColMap()

Definition at line 2901 of file Tpetra_CrsGraph_def.hpp.

◆ getGlobalRowView()

template<class LocalOrdinal , class GlobalOrdinal , class Node >
void Tpetra::Classes::CrsGraph< LocalOrdinal, GlobalOrdinal, Node >::getGlobalRowView ( const GlobalOrdinal  gblRow,
Teuchos::ArrayView< const GlobalOrdinal > &  gblColInds 
) const
overridevirtual

Get a const, non-persisting view of the given global row's global column indices, as a Teuchos::ArrayView.

Parameters
gblRow[in] Global index of the row.
gblColInds[out] Global column indices in the row. If the given row is not a valid row index on the calling process, then the result has no entries (its size is zero).
Precondition
! isLocallyIndexed()
Postcondition
gblColInds.size() == getNumEntriesInGlobalRow(gblRow)

Reimplemented from Tpetra::Classes::RowGraph< ::Tpetra::Details::DefaultTypes::local_ordinal_type, ::Tpetra::Details::DefaultTypes::global_ordinal_type, ::Tpetra::Details::DefaultTypes::node_type >.

Definition at line 3024 of file Tpetra_CrsGraph_def.hpp.

◆ supportsRowViews() [1/2]

template<class LocalOrdinal , class GlobalOrdinal , class Node >
bool Tpetra::Classes::CrsGraph< LocalOrdinal, GlobalOrdinal, Node >::supportsRowViews
override

Whether this class implements getLocalRowView() and getGlobalRowView() (it does).

Definition at line 6306 of file Tpetra_CrsGraph_def.hpp.

◆ getLocalRowView()

template<class LocalOrdinal , class GlobalOrdinal , class Node >
void Tpetra::Classes::CrsGraph< LocalOrdinal, GlobalOrdinal, Node >::getLocalRowView ( const LocalOrdinal  lclRow,
Teuchos::ArrayView< const LocalOrdinal > &  lclColInds 
) const
overridevirtual

Get a const, non-persisting view of the given local row's local column indices, as a Teuchos::ArrayView.

Parameters
lclRow[in] Local index of the row.
lclColInds[out] Local column indices in the row. If the given row is not a valid row index on the calling process, then the result has no entries (its size is zero).
Precondition
! isGloballyIndexed()
Postcondition
lclColInds.size() == getNumEntriesInLocalRow(lclRow)

Reimplemented from Tpetra::Classes::RowGraph< ::Tpetra::Details::DefaultTypes::local_ordinal_type, ::Tpetra::Details::DefaultTypes::global_ordinal_type, ::Tpetra::Details::DefaultTypes::node_type >.

Definition at line 2986 of file Tpetra_CrsGraph_def.hpp.

◆ description() [1/2]

template<class LocalOrdinal , class GlobalOrdinal , class Node >
std::string Tpetra::Classes::CrsGraph< LocalOrdinal, GlobalOrdinal, Node >::description
override

Return a one-line human-readable description of this object.

Definition at line 5361 of file Tpetra_CrsGraph_def.hpp.

◆ describe()

template<class LocalOrdinal , class GlobalOrdinal , class Node >
void Tpetra::Classes::CrsGraph< LocalOrdinal, GlobalOrdinal, Node >::describe ( Teuchos::FancyOStream &  out,
const Teuchos::EVerbosityLevel  verbLevel = Teuchos::Describable::verbLevel_default 
) const
overridevirtual

◆ checkSizes()

template<class LocalOrdinal , class GlobalOrdinal , class Node >
bool Tpetra::Classes::CrsGraph< LocalOrdinal, GlobalOrdinal, Node >::checkSizes ( const SrcDistObject source)
overridevirtual

◆ pack() [1/2]

template<class LocalOrdinal , class GlobalOrdinal , class Node >
void Tpetra::Classes::CrsGraph< LocalOrdinal, GlobalOrdinal, Node >::pack ( const Teuchos::ArrayView< const LocalOrdinal > &  exportLIDs,
Teuchos::Array< GlobalOrdinal > &  exports,
const Teuchos::ArrayView< size_t > &  numPacketsPerLID,
size_t &  constantNumPackets,
Distributor distor 
) const
overridevirtual

◆ getLocalDiagOffsets() [1/2]

template<class LocalOrdinal , class GlobalOrdinal , class Node >
void Tpetra::Classes::CrsGraph< LocalOrdinal, GlobalOrdinal, Node >::getLocalDiagOffsets ( const Kokkos::View< size_t *, device_type, Kokkos::MemoryUnmanaged > &  offsets) const

Get offsets of the diagonal entries in the graph.

Warning
This method is only for expert users.
We make no promises about backwards compatibility for this method. It may disappear or change at any time.
This method must be called collectively. We reserve the right to do extra checking in a debug build that will require collectives.

This method helps users optimize Tpetra::CrsMatrix::getLocalDiagCopy and Tpetra::Experimental::BlockCrsMatrix::getLocalDiagCopy, for several calls when the graph's structure does not change. The method fills an array of offsets of the local diagonal entries in the matrix. getLocalDiagCopy uses the offsets to extract the diagonal entries directly, without needing to search for them using Map lookups and search in each row of the graph.

The output array's contents are not defined in any other context other than for use in getLocalDiagCopy. For example, you should not rely on offsets(i) being the index of the diagonal entry in the views returned by Tpetra::CrsMatrix::getLocalRowView. This may be the case, but it need not be. (For example, we may choose to optimize the lookups down to the optimized storage level, in which case the offsets will be computed with respect to the underlying storage format, rather than with respect to the views.)

Changes to the graph's structure, or calling fillComplete on the graph (if its structure is not already fixed), may make the output array's contents invalid. "Invalid" means that you must call this method again to recompute the offsets.

Precondition
The graph must have a column Map.
All diagonal entries of the graph must be populated on this process. Results are undefined otherwise.
offsets.extent(0) >= this->getNodeNumRows()
Parameters
offsets[out] Output array of offsets. This method does NOT allocate the array; the caller must allocate. Must have getNodeNumRows() entries on the calling process. (This may be different on different processes.)

Definition at line 6008 of file Tpetra_CrsGraph_def.hpp.

◆ getLocalDiagOffsets() [2/2]

template<class LocalOrdinal , class GlobalOrdinal , class Node >
void Tpetra::Classes::CrsGraph< LocalOrdinal, GlobalOrdinal, Node >::getLocalDiagOffsets ( Teuchos::ArrayRCP< size_t > &  offsets) const

Backwards compatibility overload of the above method.

This method takes a Teuchos::ArrayRCP instead of a Kokkos::View. It also reallocates the output array if it is not long enough.

Parameters
offsets[out] Output array of offsets. This method reallocates the array if it is not long enough. This is why the method takes the array by reference.

Definition at line 6268 of file Tpetra_CrsGraph_def.hpp.

◆ getNumEntriesPerLocalRowUpperBound()

template<class LocalOrdinal , class GlobalOrdinal , class Node >
void Tpetra::Classes::CrsGraph< LocalOrdinal, GlobalOrdinal, Node >::getNumEntriesPerLocalRowUpperBound ( Teuchos::ArrayRCP< const size_t > &  boundPerLocalRow,
size_t &  boundForAllLocalRows,
bool &  boundSameForAllLocalRows 
) const

Get an upper bound on the number of entries that can be stored in each row.

When a CrsGraph is constructed, callers must give an upper bound on the number of entries in each local row. They may either supply a single integer which is the upper bound for all local rows, or they may give an array with a possibly different upper bound for each local row.

This method returns the upper bound for each row. If numEntriesPerLocalRowBound is Teuchos::null on output and boundSameForAllLocalRows is true on output, then numEntriesAllLocalRowsBound is the upper bound for all local rows. If boundSameForAllLocalRows is false on output, then numEntriesPerLocalRowBound has zero or more entries on output, and numEntriesPerLocalRowBound[i_local] is the upper bound for local row i_local.

The output argument boundSameForAllLocalRows is conservative; it only tells us whether boundForAllLocalRows has a meaningful value on output. We don't necessarily check whether all entries of boundPerLocalRow are the same.

Definition at line 3458 of file Tpetra_CrsGraph_def.hpp.

◆ setAllIndices() [1/2]

template<class LocalOrdinal , class GlobalOrdinal , class Node >
void Tpetra::Classes::CrsGraph< LocalOrdinal, GlobalOrdinal, Node >::setAllIndices ( const typename local_graph_type::row_map_type &  rowPointers,
const typename local_graph_type::entries_type::non_const_type &  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 3344 of file Tpetra_CrsGraph_def.hpp.

◆ setAllIndices() [2/2]

template<class LocalOrdinal , class GlobalOrdinal , class Node >
void Tpetra::Classes::CrsGraph< LocalOrdinal, GlobalOrdinal, Node >::setAllIndices ( const Teuchos::ArrayRCP< size_t > &  rowPointers,
const Teuchos::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 3397 of file Tpetra_CrsGraph_def.hpp.

◆ getNodeRowPtrs()

template<class LocalOrdinal , class GlobalOrdinal , class Node >
Teuchos::ArrayRCP< const size_t > Tpetra::Classes::CrsGraph< LocalOrdinal, GlobalOrdinal, Node >::getNodeRowPtrs

Get a host view of the row offsets.

Note
Please prefer getLocalGraph() to get the row offsets.

This may return either a copy or a view of the row offsets. In either case, it will always live in host memory, never in (CUDA) device memory.

Definition at line 2807 of file Tpetra_CrsGraph_def.hpp.

◆ getNodePackedIndices()

template<class LocalOrdinal , class GlobalOrdinal , class Node >
Teuchos::ArrayRCP< const LocalOrdinal > Tpetra::Classes::CrsGraph< LocalOrdinal, GlobalOrdinal, Node >::getNodePackedIndices

Get an Teuchos::ArrayRCP of the packed column-indices.

The returned buffer exists in host-memory.

Definition at line 2892 of file Tpetra_CrsGraph_def.hpp.

◆ replaceColMap()

template<class LocalOrdinal , class GlobalOrdinal , class Node >
void Tpetra::Classes::CrsGraph< LocalOrdinal, GlobalOrdinal, Node >::replaceColMap ( const Teuchos::RCP< const map_type > &  newColMap)

Replace the graph's current column Map with the given Map.

This only replaces the column Map. It does not change the graph's current column indices, or otherwise apply a permutation. For example, suppose that before calling this method, the calling process owns a row containing local column indices [0, 2, 4]. These indices do not change, nor does their order change, as a result of calling this method.

Parameters
newColMap[in] New column Map. Must be nonnull.

Definition at line 4434 of file Tpetra_CrsGraph_def.hpp.

◆ reindexColumns()

template<class LocalOrdinal , class GlobalOrdinal , class Node >
void Tpetra::Classes::CrsGraph< LocalOrdinal, GlobalOrdinal, Node >::reindexColumns ( const Teuchos::RCP< const map_type > &  newColMap,
const Teuchos::RCP< const import_type > &  newImport = Teuchos::null,
const bool  sortIndicesInEachRow = true 
)

Reindex the column indices in place, and replace the column Map. Optionally, replace the Import object as well.

Precondition
On every calling process, every index owned by the current column Map must also be owned by the new column Map.
If the new Import object is provided, the new Import object's source Map must be the same as the current domain Map, and the new Import's target Map must be the same as the new column Map.
Parameters
newColMap[in] New column Map. Must be nonnull.
newImport[in] New Import object. Optional; computed if not provided or if null. Computing an Import is expensive, so it is worth providing this if you can.
sortIndicesInEachRow[in] If true, sort the indices in each row after reindexing.

Definition at line 4453 of file Tpetra_CrsGraph_def.hpp.

◆ replaceDomainMapAndImporter()

template<class LocalOrdinal , class GlobalOrdinal , class Node >
void Tpetra::Classes::CrsGraph< LocalOrdinal, GlobalOrdinal, Node >::replaceDomainMapAndImporter ( const Teuchos::RCP< const map_type > &  newDomainMap,
const Teuchos::RCP< const import_type > &  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 4722 of file Tpetra_CrsGraph_def.hpp.

◆ removeEmptyProcessesInPlace() [1/2]

template<class LocalOrdinal , class GlobalOrdinal , class Node >
void Tpetra::Classes::CrsGraph< LocalOrdinal, GlobalOrdinal, Node >::removeEmptyProcessesInPlace ( const Teuchos::RCP< const map_type > &  newMap)
overridevirtual

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.

Definition at line 5910 of file Tpetra_CrsGraph_def.hpp.

◆ importAndFillComplete() [1/2]

template<class LocalOrdinal , class GlobalOrdinal , class Node >
void Tpetra::Classes::CrsGraph< LocalOrdinal, GlobalOrdinal, Node >::importAndFillComplete ( Teuchos::RCP< CrsGraph< LocalOrdinal, GlobalOrdinal, Node > > &  destGraph,
const import_type importer,
const Teuchos::RCP< const map_type > &  domainMap,
const Teuchos::RCP< const map_type > &  rangeMap,
const Teuchos::RCP< Teuchos::ParameterList > &  params = Teuchos::null 
) const

Import from this to the given destination graph, and make the result fill complete.

If destGraph.is_null(), this creates a new graph as the destination. (This is why destGraph is passed in by nonconst reference to RCP.) Otherwise it checks for "pristine" status and throws if that is not the case. "Pristine" means that the graph has no entries and is not fill complete.

Use of the "non-member constructor" version of this method, exportAndFillCompleteCrsGraph, is preferred for user applications.

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

Definition at line 6961 of file Tpetra_CrsGraph_def.hpp.

◆ importAndFillComplete() [2/2]

template<class LocalOrdinal , class GlobalOrdinal , class Node >
void Tpetra::Classes::CrsGraph< LocalOrdinal, GlobalOrdinal, Node >::importAndFillComplete ( Teuchos::RCP< CrsGraph< LocalOrdinal, GlobalOrdinal, Node > > &  destGraph,
const import_type rowImporter,
const import_type domainImporter,
const Teuchos::RCP< const map_type > &  domainMap,
const Teuchos::RCP< const map_type > &  rangeMap,
const Teuchos::RCP< Teuchos::ParameterList > &  params 
) const

Import from this to the given destination graph, and make the result fill complete.

If destGraph.is_null(), this creates a new graph as the destination. (This is why destGraph is passed in by nonconst reference to RCP.) Otherwise it checks for "pristine" status and throws if that is not the case. "Pristine" means that the graph has no entries and is not fill complete.

Use of the "non-member constructor" version of this method, exportAndFillCompleteCrsGraph, is preferred for user applications.

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

Definition at line 6973 of file Tpetra_CrsGraph_def.hpp.

◆ exportAndFillComplete() [1/2]

template<class LocalOrdinal , class GlobalOrdinal , class Node >
void Tpetra::Classes::CrsGraph< LocalOrdinal, GlobalOrdinal, Node >::exportAndFillComplete ( Teuchos::RCP< CrsGraph< LocalOrdinal, GlobalOrdinal, Node > > &  destGraph,
const export_type exporter,
const Teuchos::RCP< const map_type > &  domainMap = Teuchos::null,
const Teuchos::RCP< const map_type > &  rangeMap = Teuchos::null,
const Teuchos::RCP< Teuchos::ParameterList > &  params = Teuchos::null 
) const

Export from this to the given destination graph, and make the result fill complete.

If destGraph.is_null(), this creates a new graph as the destination. (This is why destGraph is passed in by nonconst reference to RCP.) Otherwise it checks for "pristine" status and throws if that is not the case. "Pristine" means that the graph has no entries and is not fill complete.

Use of the "non-member constructor" version of this method, exportAndFillCompleteCrsGraph, is preferred for user applications.

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

Definition at line 6986 of file Tpetra_CrsGraph_def.hpp.

◆ exportAndFillComplete() [2/2]

template<class LocalOrdinal , class GlobalOrdinal , class Node >
void Tpetra::Classes::CrsGraph< LocalOrdinal, GlobalOrdinal, Node >::exportAndFillComplete ( Teuchos::RCP< CrsGraph< LocalOrdinal, GlobalOrdinal, Node > > &  destGraph,
const export_type rowExporter,
const export_type domainExporter,
const Teuchos::RCP< const map_type > &  domainMap,
const Teuchos::RCP< const map_type > &  rangeMap,
const Teuchos::RCP< Teuchos::ParameterList > &  params 
) const

Export from this to the given destination graph, and make the result fill complete.

If destGraph.is_null(), this creates a new graph as the destination. (This is why destGraph is passed in by nonconst reference to RCP.) Otherwise it checks for "pristine" status and throws if that is not the case. "Pristine" means that the graph has no entries and is not fill complete.

Use of the "non-member constructor" version of this method, exportAndFillCompleteCrsGraph, is preferred for user applications.

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

Definition at line 6998 of file Tpetra_CrsGraph_def.hpp.

◆ makeColMap()

template<class LocalOrdinal , class GlobalOrdinal , class Node >
void Tpetra::Classes::CrsGraph< LocalOrdinal, GlobalOrdinal, Node >::makeColMap ( Teuchos::Array< int > &  remotePIDs)
protected

Make and set the graph's column Map.

This method makes the column Map, even if the graph already has one. It is the caller's responsibility not to call this method unnecessarily.

Parameters
remotePIDs[out] The process ranks corresponding to the column Map's "remote" (not on the calling process in the domain Map) indices.

Definition at line 5192 of file Tpetra_CrsGraph_def.hpp.

◆ makeIndicesLocal()

template<class LocalOrdinal , class GlobalOrdinal , class Node >
std::pair< size_t, std::string > Tpetra::Classes::CrsGraph< LocalOrdinal, GlobalOrdinal, Node >::makeIndicesLocal
protected

Convert column indices from global to local.

Precondition
The graph has a column Map.
Postcondition
The graph is locally indexed.
Returns
Error code and error string. See below.

First return value is the number of column indices on this process, counting duplicates, that could not be converted to local indices, because they were not in the column Map on the calling process. If some error occurred before conversion happened, then this is Tpetra::Details::OrdinalTraits<size_t>::invalid().

Second return value is a human-readable error string. If the first return value is zero, then the string may be empty.

Definition at line 4904 of file Tpetra_CrsGraph_def.hpp.

◆ makeImportExport()

template<class LocalOrdinal , class GlobalOrdinal , class Node >
void Tpetra::Classes::CrsGraph< LocalOrdinal, GlobalOrdinal, Node >::makeImportExport ( Teuchos::Array< int > &  remotePIDs,
const bool  useRemotePIDs 
)
protected

Make the Import and Export objects, if needed.

Parameters
remotePIDs[in/out] On input: the output of makeColMap(). May be modified on output.
useRemotePIDs[in] Whether to use remotePIDs. Use it if we called makeColMap with this as the output argument, else don't use it.

Definition at line 5293 of file Tpetra_CrsGraph_def.hpp.

◆ insertIndices()

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

This method does no allocation; it just inserts the indices.

Parameters
rowInfo[in/out] On input: 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. On output: numEntries field is updated.
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.
Returns
The number of indices inserted.

Definition at line 1971 of file Tpetra_CrsGraph_def.hpp.

◆ insertGlobalIndicesImpl() [1/2]

template<class LocalOrdinal , class GlobalOrdinal , class Node >
size_t Tpetra::Classes::CrsGraph< LocalOrdinal, GlobalOrdinal, Node >::insertGlobalIndicesImpl ( const LocalOrdinal  lclRow,
const GlobalOrdinal  inputGblColInds[],
const size_t  numInputInds 
)
protected

Insert global indices, using an input local row index.

Parameters
rowInfo[in] Result of getRowInfo() on the row in which to insert.
inputGblColInds[in] Input global column indices.
numInputInds[in] The number of input global column indices.
Returns
The number of indices inserted.

Definition at line 2073 of file Tpetra_CrsGraph_def.hpp.

◆ insertGlobalIndicesImpl() [2/2]

template<class LocalOrdinal , class GlobalOrdinal , class Node >
size_t Tpetra::Classes::CrsGraph< LocalOrdinal, GlobalOrdinal, Node >::insertGlobalIndicesImpl ( const RowInfo rowInfo,
const GlobalOrdinal  inputGblColInds[],
const size_t  numInputInds 
)
protected

Insert global indices, using an input RowInfo.

Parameters
rowInfo[in] Result of getRowInfo() on the row in which to insert.
inputGblColInds[in] Input global column indices.
numInputInds[in] The number of input global column indices.
Returns
The number of indices inserted.

Definition at line 2084 of file Tpetra_CrsGraph_def.hpp.

◆ insertGlobalIndicesFiltered()

template<class LocalOrdinal , class GlobalOrdinal , class Node >
void Tpetra::Classes::CrsGraph< LocalOrdinal, GlobalOrdinal, Node >::insertGlobalIndicesFiltered ( const LocalOrdinal  lclRow,
const GlobalOrdinal  gblColInds[],
const LocalOrdinal  numGblColInds 
)
protected

Like insertGlobalIndices(), but with column Map filtering.

"Column Map filtering" means that any column indices not in the column Map on the calling process, get silently dropped.

Parameters
lclRow[in] Local index of the row in which to insert. This row MUST be in the row Map on the calling process.
gblColInds[in] The global column indices to insert into that row.
numGblColInds[in] The number of global column indices to insert into that row.

Definition at line 3224 of file Tpetra_CrsGraph_def.hpp.

◆ insertGlobalIndicesIntoNonownedRows()

template<class LocalOrdinal , class GlobalOrdinal , class Node >
void Tpetra::Classes::CrsGraph< LocalOrdinal, GlobalOrdinal, Node >::insertGlobalIndicesIntoNonownedRows ( const GlobalOrdinal  gblRow,
const GlobalOrdinal  gblColInds[],
const LocalOrdinal  numGblColInds 
)
protected

Implementation of insertGlobalIndices for nonowned rows.

A global row index is nonowned when it is not in the column Map on the calling process.

Parameters
gblRow[in] Global index of the row in which to insert. This row must NOT be in the row Map on the calling process.
gblColInds[in] The global column indices to insert into that row.
numGblColInds[in] The number of global column indices to insert into that row.

Definition at line 3288 of file Tpetra_CrsGraph_def.hpp.

◆ isMerged()

template<class LocalOrdinal , class GlobalOrdinal , class Node >
bool Tpetra::Classes::CrsGraph< LocalOrdinal, GlobalOrdinal, Node >::isMerged
protected

Whether duplicate column indices in each row have been merged.

Definition at line 1254 of file Tpetra_CrsGraph_def.hpp.

◆ setLocallyModified()

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

◆ sortAndMergeRowIndices()

template<class LocalOrdinal , class GlobalOrdinal , class Node >
size_t Tpetra::Classes::CrsGraph< LocalOrdinal, GlobalOrdinal, Node >::sortAndMergeRowIndices ( const RowInfo rowInfo,
const bool  sorted,
const bool  merged 
)
protected

Sort and merge duplicate column indices in the given row.

Precondition
The graph is locally indexed: isGloballyIndexed() == false.
The graph is not already storage optimized: isStorageOptimized() == false
Returns
The number of duplicate column indices eliminated from the row.

Definition at line 2398 of file Tpetra_CrsGraph_def.hpp.

◆ setDomainRangeMaps()

template<class LocalOrdinal , class GlobalOrdinal , class Node >
void Tpetra::Classes::CrsGraph< LocalOrdinal, GlobalOrdinal, Node >::setDomainRangeMaps ( const Teuchos::RCP< const map_type > &  domainMap,
const Teuchos::RCP< const map_type > &  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 2437 of file Tpetra_CrsGraph_def.hpp.

◆ haveGlobalConstants()

template<class LocalOrdinal = ::Tpetra::Details::DefaultTypes::local_ordinal_type, class GlobalOrdinal = ::Tpetra::Details::DefaultTypes::global_ordinal_type, class Node = ::Tpetra::Details::DefaultTypes::node_type>
bool Tpetra::Classes::CrsGraph< LocalOrdinal, GlobalOrdinal, Node >::haveGlobalConstants ( ) const
inline

Returns true if globalConstants have been computed; false otherwise.

Definition at line 1879 of file Tpetra_CrsGraph_decl.hpp.

◆ computeGlobalConstants()

template<class LocalOrdinal , class GlobalOrdinal , class Node >
void Tpetra::Classes::CrsGraph< LocalOrdinal, GlobalOrdinal, Node >::computeGlobalConstants ( const bool  computeLocalTriangularConstants)

Compute global constants, if they have not yet been computed.

Warning
This is an implementation detail of Tpetra. It may change or disappear at any time. It is public only because MueLu setup needs it to be public.

Global constants include:

  • globalNumEntries_
  • globalNumDiags_
  • globalMaxNumRowEntries_

Always compute the following:

  • globalNumEntries_
  • globalMaxNumRowEntries_

Only compute the following if the input argument computeLocalTriangularConstants is true:

  • globalNumDiags_

The bool input argument comes from an input ParameterList bool parameter "compute local triangular constants", named analogously to the existing bool parameter "compute global constants".

Definition at line 4773 of file Tpetra_CrsGraph_def.hpp.

◆ computeLocalConstants()

template<class LocalOrdinal , class GlobalOrdinal , class Node >
void Tpetra::Classes::CrsGraph< LocalOrdinal, GlobalOrdinal, Node >::computeLocalConstants ( const bool  computeLocalTriangularConstants)
protected

Compute local constants, if they have not yet been computed.

Warning
You MUST call fillLocalGraph (or CrsMatrix::fillLocalGraphAndMatrix) before calling this method! This method depends on the Kokkos::StaticCrsGraph (local_graph_type) object being ready.

Local constants include:

  • lowerTriangular_
  • upperTriangular_
  • nodeNumDiags_
  • nodeMaxNumRowEntries_

Always compute the following:

  • nodeMaxNumRowEntries_

Only compute the following if the input argument computeLocalTriangularConstants is true:

  • lowerTriangular_
  • upperTriangular_
  • nodeNumDiags_

The bool input argument comes from an input ParameterList bool parameter "compute local triangular constants", named analogously to the existing bool parameter "compute global constants".

computeGlobalConstants calls this method, if global constants have not yet been computed.

Definition at line 4837 of file Tpetra_CrsGraph_def.hpp.

◆ getRowInfo()

template<class LocalOrdinal , class GlobalOrdinal , class Node >
RowInfo Tpetra::Classes::CrsGraph< LocalOrdinal, GlobalOrdinal, Node >::getRowInfo ( const LocalOrdinal  myRow) const
protected

Get information about the locally owned row with local index myRow.

Definition at line 1783 of file Tpetra_CrsGraph_def.hpp.

◆ getRowInfoFromGlobalRowIndex()

template<class LocalOrdinal , class GlobalOrdinal , class Node >
RowInfo Tpetra::Classes::CrsGraph< LocalOrdinal, GlobalOrdinal, Node >::getRowInfoFromGlobalRowIndex ( const GlobalOrdinal  gblRow) const
protected

Get information about the locally owned row with global index gblRow.

If gblRow is not locally owned, the localRow field of the returned struct is Teuchos::OrdinalTraits<size_t>::invalid().

The point of this method is to fuse the global-to-local row index lookup for checking whether gblRow is locally owned, with other error checking that getRowInfo() does. This avoids an extra global-to-local index lookup in methods like CrsMatrix::replaceGlobalValues().

Definition at line 1851 of file Tpetra_CrsGraph_def.hpp.

◆ getLocalView()

template<class LocalOrdinal , class GlobalOrdinal , class Node >
Teuchos::ArrayView< const LocalOrdinal > Tpetra::Classes::CrsGraph< LocalOrdinal, GlobalOrdinal, Node >::getLocalView ( const RowInfo  rowinfo) const
protected

Get a const, nonowned, locally indexed view of the locally owned row myRow, such that rowinfo = getRowInfo(myRow).

Definition at line 1449 of file Tpetra_CrsGraph_def.hpp.

◆ getLocalViewNonConst()

template<class LocalOrdinal , class GlobalOrdinal , class Node >
Teuchos::ArrayView< LocalOrdinal > Tpetra::Classes::CrsGraph< LocalOrdinal, GlobalOrdinal, Node >::getLocalViewNonConst ( const RowInfo  rowinfo)
protected

Get a nonconst, nonowned, locally indexed view of the locally owned row myRow, such that rowinfo = getRowInfo(myRow).

Definition at line 1524 of file Tpetra_CrsGraph_def.hpp.

◆ getLocalViewRawConst()

template<class LocalOrdinal , class GlobalOrdinal , class Node >
LocalOrdinal Tpetra::Classes::CrsGraph< LocalOrdinal, GlobalOrdinal, Node >::getLocalViewRawConst ( const LocalOrdinal *&  lclInds,
LocalOrdinal &  capacity,
const RowInfo rowInfo 
) const
protected

Get a pointer to the local column indices of a locally owned row, using the result of getRowInfo.

Parameters
lclInds[out] Pointer to the local column indices of the given row.
capacity[out] Capacity of (number of entries that can fit in) the given row.
rowInfo[in] Result of getRowInfo(lclRow) for the row lclRow to view.
Returns
0 if successful, else a nonzero error code.

Definition at line 1485 of file Tpetra_CrsGraph_def.hpp.

◆ getGlobalView()

template<class LocalOrdinal , class GlobalOrdinal , class Node >
Teuchos::ArrayView< const GlobalOrdinal > Tpetra::Classes::CrsGraph< LocalOrdinal, GlobalOrdinal, Node >::getGlobalView ( const RowInfo rowinfo) const
protected

Get a const, nonowned, globally indexed view of the locally owned row myRow, such that rowinfo = getRowInfo(myRow).

Definition at line 1691 of file Tpetra_CrsGraph_def.hpp.

◆ getGlobalViewNonConst()

template<class LocalOrdinal , class GlobalOrdinal , class Node >
Teuchos::ArrayView< GlobalOrdinal > Tpetra::Classes::CrsGraph< LocalOrdinal, GlobalOrdinal, Node >::getGlobalViewNonConst ( const RowInfo rowinfo)
protected

Get a nonconst, nonowned, globally indexed view of the locally owned row myRow, such that rowinfo = getRowInfo(myRow).

Definition at line 1756 of file Tpetra_CrsGraph_def.hpp.

◆ getGlobalViewRawConst()

template<class LocalOrdinal , class GlobalOrdinal , class Node >
LocalOrdinal Tpetra::Classes::CrsGraph< LocalOrdinal, GlobalOrdinal, Node >::getGlobalViewRawConst ( const GlobalOrdinal *&  gblInds,
LocalOrdinal &  capacity,
const RowInfo rowInfo 
) const
protected

Get a pointer to the global column indices of a locally owned row, using the result of getRowInfoFromGlobalRowIndex.

Parameters
gblInds[out] Pointer to the global column indices of the given row.
capacity[out] Capacity of (number of entries that can fit in) the given row.
rowInfo[in] Result of getRowInfoFromGlobalRowIndex(gblRow) for the row to view, whose global row index is gblRow.
Returns
0 if successful, else a nonzero error code.

Definition at line 1718 of file Tpetra_CrsGraph_def.hpp.

◆ getLocalGraph()

template<class LocalOrdinal , class GlobalOrdinal , class Node >
CrsGraph< LocalOrdinal, GlobalOrdinal, Node >::local_graph_type Tpetra::Classes::CrsGraph< LocalOrdinal, GlobalOrdinal, Node >::getLocalGraph

Get the local graph.

Warning
THIS IS AN EXPERT MODE FUNCTION. THIS IS AN IMPLEMENTATION DETAIL. DO NOT CALL THIS FUNCTION!!!

This is only a valid representation of the local graph if the (global) graph is fill complete.

Definition at line 4765 of file Tpetra_CrsGraph_def.hpp.

◆ checkInternalState()

template<class LocalOrdinal , class GlobalOrdinal , class Node >
void Tpetra::Classes::CrsGraph< LocalOrdinal, GlobalOrdinal, Node >::checkInternalState
protected

Throw an exception if the internal state is not consistent.

Definition at line 2467 of file Tpetra_CrsGraph_def.hpp.

◆ getComm() [2/2]

virtual Teuchos::RCP<const Teuchos::Comm<int> > Tpetra::Classes::RowGraph< ::Tpetra::Details::DefaultTypes::local_ordinal_type , ::Tpetra::Details::DefaultTypes::global_ordinal_type , ::Tpetra::Details::DefaultTypes::node_type >::getComm
pure virtualinherited

The communicator over which this graph is distributed.

◆ getNode() [2/2]

virtual Teuchos::RCP<::Tpetra::Details::DefaultTypes::node_type > Tpetra::Classes::RowGraph< ::Tpetra::Details::DefaultTypes::local_ordinal_type , ::Tpetra::Details::DefaultTypes::global_ordinal_type , ::Tpetra::Details::DefaultTypes::node_type >::getNode
pure virtualinherited

The Kokkos Node instance with which this object was created.

◆ getRowMap() [2/2]

virtual Teuchos::RCP<const Map<::Tpetra::Details::DefaultTypes::local_ordinal_type ,::Tpetra::Details::DefaultTypes::global_ordinal_type ,::Tpetra::Details::DefaultTypes::node_type > > Tpetra::Classes::RowGraph< ::Tpetra::Details::DefaultTypes::local_ordinal_type , ::Tpetra::Details::DefaultTypes::global_ordinal_type , ::Tpetra::Details::DefaultTypes::node_type >::getRowMap
pure virtualinherited

The Map that describes this graph's distribution of rows over processes.

◆ getColMap() [2/2]

virtual Teuchos::RCP<const Map<::Tpetra::Details::DefaultTypes::local_ordinal_type ,::Tpetra::Details::DefaultTypes::global_ordinal_type ,::Tpetra::Details::DefaultTypes::node_type > > Tpetra::Classes::RowGraph< ::Tpetra::Details::DefaultTypes::local_ordinal_type , ::Tpetra::Details::DefaultTypes::global_ordinal_type , ::Tpetra::Details::DefaultTypes::node_type >::getColMap
pure virtualinherited

The Map that describes this graph's distribution of columns over processes.

◆ getDomainMap() [2/2]

virtual Teuchos::RCP<const Map<::Tpetra::Details::DefaultTypes::local_ordinal_type ,::Tpetra::Details::DefaultTypes::global_ordinal_type ,::Tpetra::Details::DefaultTypes::node_type > > Tpetra::Classes::RowGraph< ::Tpetra::Details::DefaultTypes::local_ordinal_type , ::Tpetra::Details::DefaultTypes::global_ordinal_type , ::Tpetra::Details::DefaultTypes::node_type >::getDomainMap
pure virtualinherited

The Map associated with the domain of this graph.

◆ getRangeMap() [2/2]

virtual Teuchos::RCP<const Map<::Tpetra::Details::DefaultTypes::local_ordinal_type ,::Tpetra::Details::DefaultTypes::global_ordinal_type ,::Tpetra::Details::DefaultTypes::node_type > > Tpetra::Classes::RowGraph< ::Tpetra::Details::DefaultTypes::local_ordinal_type , ::Tpetra::Details::DefaultTypes::global_ordinal_type , ::Tpetra::Details::DefaultTypes::node_type >::getRangeMap
pure virtualinherited

The Map associated with the range of this graph.

◆ getImporter() [2/2]

virtual Teuchos::RCP<const Import<::Tpetra::Details::DefaultTypes::local_ordinal_type ,::Tpetra::Details::DefaultTypes::global_ordinal_type ,::Tpetra::Details::DefaultTypes::node_type > > Tpetra::Classes::RowGraph< ::Tpetra::Details::DefaultTypes::local_ordinal_type , ::Tpetra::Details::DefaultTypes::global_ordinal_type , ::Tpetra::Details::DefaultTypes::node_type >::getImporter
pure virtualinherited

This graph's Import object.

◆ getExporter() [2/2]

virtual Teuchos::RCP<const Export<::Tpetra::Details::DefaultTypes::local_ordinal_type ,::Tpetra::Details::DefaultTypes::global_ordinal_type ,::Tpetra::Details::DefaultTypes::node_type > > Tpetra::Classes::RowGraph< ::Tpetra::Details::DefaultTypes::local_ordinal_type , ::Tpetra::Details::DefaultTypes::global_ordinal_type , ::Tpetra::Details::DefaultTypes::node_type >::getExporter
pure virtualinherited

This graph's Export object.

◆ getGlobalNumRows() [2/2]

virtual global_size_t Tpetra::Classes::RowGraph< ::Tpetra::Details::DefaultTypes::local_ordinal_type , ::Tpetra::Details::DefaultTypes::global_ordinal_type , ::Tpetra::Details::DefaultTypes::node_type >::getGlobalNumRows
pure virtualinherited

Returns the number of global rows in the graph.

◆ getGlobalNumCols() [2/2]

virtual global_size_t Tpetra::Classes::RowGraph< ::Tpetra::Details::DefaultTypes::local_ordinal_type , ::Tpetra::Details::DefaultTypes::global_ordinal_type , ::Tpetra::Details::DefaultTypes::node_type >::getGlobalNumCols
pure virtualinherited

Returns the number of global columns in the graph.

◆ getNodeNumRows() [2/2]

virtual size_t Tpetra::Classes::RowGraph< ::Tpetra::Details::DefaultTypes::local_ordinal_type , ::Tpetra::Details::DefaultTypes::global_ordinal_type , ::Tpetra::Details::DefaultTypes::node_type >::getNodeNumRows
pure virtualinherited

Returns the number of rows owned on the calling node.

◆ getNodeNumCols() [2/2]

virtual size_t Tpetra::Classes::RowGraph< ::Tpetra::Details::DefaultTypes::local_ordinal_type , ::Tpetra::Details::DefaultTypes::global_ordinal_type , ::Tpetra::Details::DefaultTypes::node_type >::getNodeNumCols
pure virtualinherited

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

◆ getIndexBase() [2/2]

virtual ::Tpetra::Details::DefaultTypes::global_ordinal_type Tpetra::Classes::RowGraph< ::Tpetra::Details::DefaultTypes::local_ordinal_type , ::Tpetra::Details::DefaultTypes::global_ordinal_type , ::Tpetra::Details::DefaultTypes::node_type >::getIndexBase
pure virtualinherited

Returns the index base for global indices for this graph.

◆ getGlobalNumEntries() [2/2]

virtual global_size_t Tpetra::Classes::RowGraph< ::Tpetra::Details::DefaultTypes::local_ordinal_type , ::Tpetra::Details::DefaultTypes::global_ordinal_type , ::Tpetra::Details::DefaultTypes::node_type >::getGlobalNumEntries
pure virtualinherited

Returns the global number of entries in the graph.

◆ getNodeNumEntries() [2/2]

virtual size_t Tpetra::Classes::RowGraph< ::Tpetra::Details::DefaultTypes::local_ordinal_type , ::Tpetra::Details::DefaultTypes::global_ordinal_type , ::Tpetra::Details::DefaultTypes::node_type >::getNodeNumEntries
pure virtualinherited

Returns the local number of entries in the graph.

◆ getNumEntriesInGlobalRow() [2/2]

virtual size_t Tpetra::Classes::RowGraph< ::Tpetra::Details::DefaultTypes::local_ordinal_type , ::Tpetra::Details::DefaultTypes::global_ordinal_type , ::Tpetra::Details::DefaultTypes::node_type >::getNumEntriesInGlobalRow ( ::Tpetra::Details::DefaultTypes::global_ordinal_type  globalRow) const
pure virtualinherited

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

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

◆ getNumEntriesInLocalRow() [2/2]

virtual size_t Tpetra::Classes::RowGraph< ::Tpetra::Details::DefaultTypes::local_ordinal_type , ::Tpetra::Details::DefaultTypes::global_ordinal_type , ::Tpetra::Details::DefaultTypes::node_type >::getNumEntriesInLocalRow ( ::Tpetra::Details::DefaultTypes::local_ordinal_type  localRow) const
pure virtualinherited

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

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

◆ getGlobalNumDiags() [2/2]

virtual global_size_t TPETRA_DEPRECATED Tpetra::Classes::RowGraph< ::Tpetra::Details::DefaultTypes::local_ordinal_type , ::Tpetra::Details::DefaultTypes::global_ordinal_type , ::Tpetra::Details::DefaultTypes::node_type >::getGlobalNumDiags
pure virtualinherited

Number of diagonal entries over all processes in the graph's communicator.

Warning
DO NOT CALL THIS METHOD! This method is DEPRECATED and will DISAPPEAR VERY SOON per #2630.

◆ getNodeNumDiags() [2/2]

virtual size_t TPETRA_DEPRECATED Tpetra::Classes::RowGraph< ::Tpetra::Details::DefaultTypes::local_ordinal_type , ::Tpetra::Details::DefaultTypes::global_ordinal_type , ::Tpetra::Details::DefaultTypes::node_type >::getNodeNumDiags
pure virtualinherited

Number of diagonal entries on the calling process.

Warning
DO NOT CALL THIS METHOD! This method is DEPRECATED and will DISAPPEAR VERY SOON per #2630.

◆ getGlobalMaxNumRowEntries() [2/2]

virtual size_t Tpetra::Classes::RowGraph< ::Tpetra::Details::DefaultTypes::local_ordinal_type , ::Tpetra::Details::DefaultTypes::global_ordinal_type , ::Tpetra::Details::DefaultTypes::node_type >::getGlobalMaxNumRowEntries
pure virtualinherited

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

◆ getNodeMaxNumRowEntries() [2/2]

virtual size_t Tpetra::Classes::RowGraph< ::Tpetra::Details::DefaultTypes::local_ordinal_type , ::Tpetra::Details::DefaultTypes::global_ordinal_type , ::Tpetra::Details::DefaultTypes::node_type >::getNodeMaxNumRowEntries
pure virtualinherited

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

◆ hasColMap() [2/2]

virtual bool Tpetra::Classes::RowGraph< ::Tpetra::Details::DefaultTypes::local_ordinal_type , ::Tpetra::Details::DefaultTypes::global_ordinal_type , ::Tpetra::Details::DefaultTypes::node_type >::hasColMap
pure virtualinherited

Whether the graph has a well-defined column Map.

◆ isLowerTriangular() [2/2]

virtual bool TPETRA_DEPRECATED Tpetra::Classes::RowGraph< ::Tpetra::Details::DefaultTypes::local_ordinal_type , ::Tpetra::Details::DefaultTypes::global_ordinal_type , ::Tpetra::Details::DefaultTypes::node_type >::isLowerTriangular
pure virtualinherited

Whether the graph is locally lower triangular.

Warning
DO NOT CALL THIS METHOD! This method is DEPRECATED and will DISAPPEAR VERY SOON per #2630.
Precondition
Subclasses reserve the right to impose preconditions on the matrix's state.
Note
This is entirely a local property. That means this method may return different results on different processes.

◆ isUpperTriangular() [2/2]

virtual bool TPETRA_DEPRECATED Tpetra::Classes::RowGraph< ::Tpetra::Details::DefaultTypes::local_ordinal_type , ::Tpetra::Details::DefaultTypes::global_ordinal_type , ::Tpetra::Details::DefaultTypes::node_type >::isUpperTriangular
pure virtualinherited

Whether the graph is locally upper triangular.

Warning
DO NOT CALL THIS METHOD! This method is DEPRECATED and will DISAPPEAR VERY SOON per #2630.
Precondition
Subclasses reserve the right to impose preconditions on the matrix's state.
Note
This is entirely a local property. That means this method may return different results on different processes.

◆ isLocallyIndexed() [2/2]

virtual bool Tpetra::Classes::RowGraph< ::Tpetra::Details::DefaultTypes::local_ordinal_type , ::Tpetra::Details::DefaultTypes::global_ordinal_type , ::Tpetra::Details::DefaultTypes::node_type >::isLocallyIndexed
pure virtualinherited

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

◆ isGloballyIndexed() [2/2]

virtual bool Tpetra::Classes::RowGraph< ::Tpetra::Details::DefaultTypes::local_ordinal_type , ::Tpetra::Details::DefaultTypes::global_ordinal_type , ::Tpetra::Details::DefaultTypes::node_type >::isGloballyIndexed
pure virtualinherited

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

◆ isFillComplete() [2/2]

virtual bool Tpetra::Classes::RowGraph< ::Tpetra::Details::DefaultTypes::local_ordinal_type , ::Tpetra::Details::DefaultTypes::global_ordinal_type , ::Tpetra::Details::DefaultTypes::node_type >::isFillComplete
pure virtualinherited

Whether fillComplete() has been called (without an intervening resumeFill()).

◆ getGlobalRowCopy() [2/2]

virtual void Tpetra::Classes::RowGraph< ::Tpetra::Details::DefaultTypes::local_ordinal_type , ::Tpetra::Details::DefaultTypes::global_ordinal_type , ::Tpetra::Details::DefaultTypes::node_type >::getGlobalRowCopy ( ::Tpetra::Details::DefaultTypes::global_ordinal_type  GlobalRow,
const Teuchos::ArrayView< ::Tpetra::Details::DefaultTypes::global_ordinal_type > &  Indices,
size_t &  NumIndices 
) const
pure virtualinherited

Extract a list of entries 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 if Indices is not large enough to hold the column indices associated with row GlobalRow. If GlobalRow does not belong to this node, then Indices is unchanged and NumIndices is returned as Teuchos::OrdinalTraits<size_t>::invalid().

◆ getLocalRowCopy() [2/2]

virtual void Tpetra::Classes::RowGraph< ::Tpetra::Details::DefaultTypes::local_ordinal_type , ::Tpetra::Details::DefaultTypes::global_ordinal_type , ::Tpetra::Details::DefaultTypes::node_type >::getLocalRowCopy ( ::Tpetra::Details::DefaultTypes::local_ordinal_type  LocalRow,
const Teuchos::ArrayView< ::Tpetra::Details::DefaultTypes::local_ordinal_type > &  Indices,
size_t &  NumIndices 
) const
pure virtualinherited

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

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

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

◆ supportsRowViews() [2/2]

virtual bool Tpetra::Classes::RowGraph< ::Tpetra::Details::DefaultTypes::local_ordinal_type , ::Tpetra::Details::DefaultTypes::global_ordinal_type , ::Tpetra::Details::DefaultTypes::node_type >::supportsRowViews
inlinevirtualinherited

Whether this class implements getLocalRowView() and getGlobalRowView().

If subclasses override the default (trivial) implementation of getLocalRowView() and getGlobalRowView(), then they need to override this method as well.

Definition at line 245 of file Tpetra_RowGraph_decl.hpp.

◆ pack() [2/2]

virtual void Tpetra::Classes::Packable< ::Tpetra::Details::DefaultTypes::global_ordinal_type , ::Tpetra::Details::DefaultTypes::local_ordinal_type >::pack ( const Teuchos::ArrayView< const ::Tpetra::Details::DefaultTypes::local_ordinal_type > &  exportLIDs,
Teuchos::Array< ::Tpetra::Details::DefaultTypes::global_ordinal_type > &  exports,
const Teuchos::ArrayView< size_t > &  numPacketsPerLID,
size_t &  constantNumPackets,
Distributor distor 
) const
pure virtualinherited

Pack the object's data for an Import or Export.

Parameters
exportLIDs[in] List of the local indices of the entries which the source object will send out.
exports[out] On exit, the buffer packed with data to send. This object may resize the array if necessary.
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, zero if numPacketsPerLID has variable contents (different size for each local index). If nonzero, then it is expected that the number of packets per local index is constant, and that constantNumPackets is that value.
distor[in] The Distributor object we are using. Implementations may ignore this object. We provide it for consistency with DistObject's packAndPrepare method.

◆ doImport() [1/2]

void Tpetra::Classes::DistObject< ::Tpetra::Details::DefaultTypes::global_ordinal_type , ::Tpetra::Details::DefaultTypes::local_ordinal_type , ::Tpetra::Details::DefaultTypes::global_ordinal_type , ::Tpetra::Details::DefaultTypes::node_type >::doImport ( const SrcDistObject< ::Tpetra::Details::DefaultTypes::global_ordinal_type, ::Tpetra::Details::DefaultTypes::local_ordinal_type, ::Tpetra::Details::DefaultTypes::global_ordinal_type, ::Tpetra::Details::DefaultTypes::node_type > &  source,
const Import< ::Tpetra::Details::DefaultTypes::local_ordinal_type , ::Tpetra::Details::DefaultTypes::global_ordinal_type , ::Tpetra::Details::DefaultTypes::node_type > &  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.

Definition at line 418 of file Tpetra_DistObject_def.hpp.

◆ doImport() [2/2]

void Tpetra::Classes::DistObject< ::Tpetra::Details::DefaultTypes::global_ordinal_type , ::Tpetra::Details::DefaultTypes::local_ordinal_type , ::Tpetra::Details::DefaultTypes::global_ordinal_type , ::Tpetra::Details::DefaultTypes::node_type >::doImport ( const SrcDistObject< ::Tpetra::Details::DefaultTypes::global_ordinal_type, ::Tpetra::Details::DefaultTypes::local_ordinal_type, ::Tpetra::Details::DefaultTypes::global_ordinal_type, ::Tpetra::Details::DefaultTypes::node_type > &  source,
const Export< ::Tpetra::Details::DefaultTypes::local_ordinal_type , ::Tpetra::Details::DefaultTypes::global_ordinal_type , ::Tpetra::Details::DefaultTypes::node_type > &  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.

Definition at line 465 of file Tpetra_DistObject_def.hpp.

◆ doExport() [1/2]

void Tpetra::Classes::DistObject< ::Tpetra::Details::DefaultTypes::global_ordinal_type , ::Tpetra::Details::DefaultTypes::local_ordinal_type , ::Tpetra::Details::DefaultTypes::global_ordinal_type , ::Tpetra::Details::DefaultTypes::node_type >::doExport ( const SrcDistObject< ::Tpetra::Details::DefaultTypes::global_ordinal_type, ::Tpetra::Details::DefaultTypes::local_ordinal_type, ::Tpetra::Details::DefaultTypes::global_ordinal_type, ::Tpetra::Details::DefaultTypes::node_type > &  source,
const Export< ::Tpetra::Details::DefaultTypes::local_ordinal_type , ::Tpetra::Details::DefaultTypes::global_ordinal_type , ::Tpetra::Details::DefaultTypes::node_type > &  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.

Definition at line 441 of file Tpetra_DistObject_def.hpp.

◆ doExport() [2/2]

void Tpetra::Classes::DistObject< ::Tpetra::Details::DefaultTypes::global_ordinal_type , ::Tpetra::Details::DefaultTypes::local_ordinal_type , ::Tpetra::Details::DefaultTypes::global_ordinal_type , ::Tpetra::Details::DefaultTypes::node_type >::doExport ( const SrcDistObject< ::Tpetra::Details::DefaultTypes::global_ordinal_type, ::Tpetra::Details::DefaultTypes::local_ordinal_type, ::Tpetra::Details::DefaultTypes::global_ordinal_type, ::Tpetra::Details::DefaultTypes::node_type > &  source,
const Import< ::Tpetra::Details::DefaultTypes::local_ordinal_type , ::Tpetra::Details::DefaultTypes::global_ordinal_type , ::Tpetra::Details::DefaultTypes::node_type > &  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.

Definition at line 489 of file Tpetra_DistObject_def.hpp.

◆ isDistributed()

bool Tpetra::Classes::DistObject< ::Tpetra::Details::DefaultTypes::global_ordinal_type , ::Tpetra::Details::DefaultTypes::local_ordinal_type , ::Tpetra::Details::DefaultTypes::global_ordinal_type , ::Tpetra::Details::DefaultTypes::node_type >::isDistributed
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.

Definition at line 502 of file Tpetra_DistObject_def.hpp.

◆ getMap()

virtual Teuchos::RCP<const map_type> Tpetra::Classes::DistObject< ::Tpetra::Details::DefaultTypes::global_ordinal_type , ::Tpetra::Details::DefaultTypes::local_ordinal_type , ::Tpetra::Details::DefaultTypes::global_ordinal_type , ::Tpetra::Details::DefaultTypes::node_type >::getMap
inlinevirtualinherited

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.

Definition at line 510 of file Tpetra_DistObject_decl.hpp.

◆ print()

void Tpetra::Classes::DistObject< ::Tpetra::Details::DefaultTypes::global_ordinal_type , ::Tpetra::Details::DefaultTypes::local_ordinal_type , ::Tpetra::Details::DefaultTypes::global_ordinal_type , ::Tpetra::Details::DefaultTypes::node_type >::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.

Definition at line 520 of file Tpetra_DistObject_def.hpp.

◆ description() [2/2]

std::string Tpetra::Classes::DistObject< ::Tpetra::Details::DefaultTypes::global_ordinal_type , ::Tpetra::Details::DefaultTypes::local_ordinal_type , ::Tpetra::Details::DefaultTypes::global_ordinal_type , ::Tpetra::Details::DefaultTypes::node_type >::description
virtualinherited

One-line descriptiion of this object.

We declare this method virtual so that subclasses of DistObject may override it.

Definition at line 530 of file Tpetra_DistObject_def.hpp.

◆ removeEmptyProcessesInPlace() [2/2]

void Tpetra::Classes::DistObject< ::Tpetra::Details::DefaultTypes::global_ordinal_type , ::Tpetra::Details::DefaultTypes::local_ordinal_type , ::Tpetra::Details::DefaultTypes::global_ordinal_type , ::Tpetra::Details::DefaultTypes::node_type >::removeEmptyProcessesInPlace ( const Teuchos::RCP< const map_type > &  newMap)
virtualinherited

Remove processes which contain no entries in this object's Map.

Warning
This method is ONLY for use by experts. We highly recommend using the nonmember function of the same name defined in this file.
We make NO promises of backwards compatibility. This method may change or disappear at any time.

On input, this object is distributed over the Map returned by getMap() (the "original Map," with its communicator, the "original communicator"). The input newMap of this method must be the same as the result of calling getMap()->removeEmptyProcesses(). On processes in the original communicator which contain zero entries ("excluded processes," as opposed to "included processes"), the input newMap must be Teuchos::null (which is what getMap()->removeEmptyProcesses() returns anyway).

On included processes, reassign this object's Map (that would be returned by getMap()) to the input newMap, and do any work that needs to be done to restore correct semantics. On excluded processes, free any data that needs freeing, and do any other work that needs to be done to restore correct semantics.

This method has collective semantics over the original communicator. On exit, the only method of this object which is safe to call on excluded processes is the destructor. This implies that subclasses' destructors must not contain communication operations.

Returns
The object's new Map. Its communicator is a new communicator, distinct from the old Map's communicator, which contains a subset of the processes in the old communicator.
Note
The name differs from Map's method removeEmptyProcesses(), in order to emphasize that the operation on DistObject happens in place, modifying the input, whereas the operation removeEmptyProcess() on Map does not modify the input.
To implementers of DistObject subclasses: The default implementation of this class throws std::logic_error.

Definition at line 592 of file Tpetra_DistObject_def.hpp.

◆ constantNumberOfPackets()

size_t Tpetra::Classes::DistObject< ::Tpetra::Details::DefaultTypes::global_ordinal_type , ::Tpetra::Details::DefaultTypes::local_ordinal_type , ::Tpetra::Details::DefaultTypes::global_ordinal_type , ::Tpetra::Details::DefaultTypes::node_type >::constantNumberOfPackets
protectedvirtualinherited

Whether the implementation's instance promises always to have a constant number of packets per LID (local index), 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 (local index) 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.

Definition at line 626 of file Tpetra_DistObject_def.hpp.

◆ doTransfer()

void Tpetra::Classes::DistObject< ::Tpetra::Details::DefaultTypes::global_ordinal_type , ::Tpetra::Details::DefaultTypes::local_ordinal_type , ::Tpetra::Details::DefaultTypes::global_ordinal_type , ::Tpetra::Details::DefaultTypes::node_type >::doTransfer ( const SrcDistObject< ::Tpetra::Details::DefaultTypes::global_ordinal_type, ::Tpetra::Details::DefaultTypes::local_ordinal_type, ::Tpetra::Details::DefaultTypes::global_ordinal_type, ::Tpetra::Details::DefaultTypes::node_type > &  src,
const ::Tpetra::Details::Transfer< local_ordinal_type, global_ordinal_type, node_type > &  transfer,
const char  modeString[],
const ReverseOption  revOp,
const CombineMode  CM 
)
protectedvirtualinherited

Redistribute data across memory images.

Parameters
src[in] The source object, to redistribute into the target object, which is *this object.
transfer[in] The Export or Import object representing the communication pattern. (Details::Transfer is the common base class of these two objects.)
modeString[in] Human-readable string, for verbose debugging output and error output, explaining what function called this method. Example: "doImport (forward)", "doExport (reverse)".
revOp[in] Whether to do a forward or reverse mode redistribution.
CM[in] The combine mode that describes how to combine values that map to the same global ID on the same process.

Definition at line 648 of file Tpetra_DistObject_def.hpp.

◆ reallocArraysForNumPacketsPerLid()

bool Tpetra::Classes::DistObject< ::Tpetra::Details::DefaultTypes::global_ordinal_type , ::Tpetra::Details::DefaultTypes::local_ordinal_type , ::Tpetra::Details::DefaultTypes::global_ordinal_type , ::Tpetra::Details::DefaultTypes::node_type >::reallocArraysForNumPacketsPerLid ( const size_t  numExportLIDs,
const size_t  numImportLIDs 
)
protectedvirtualinherited

Reallocate numExportPacketsPerLID_ and/or numImportPacketsPerLID_, if necessary.

Parameters
numExportLIDs[in] Number of entries in the exportLIDs input array argument of doTransfer().
numImportLIDs[in] Number of entries in the remoteLIDs input array argument of doTransfer().
Returns
Whether we actually reallocated either of the arrays.
Warning
This is an implementation detail of doTransferOld() and doTransferNew(). This needs to be protected, but that doesn't mean users should call this method.

Definition at line 669 of file Tpetra_DistObject_def.hpp.

◆ useNewInterface()

virtual bool Tpetra::Classes::DistObject< ::Tpetra::Details::DefaultTypes::global_ordinal_type , ::Tpetra::Details::DefaultTypes::local_ordinal_type , ::Tpetra::Details::DefaultTypes::global_ordinal_type , ::Tpetra::Details::DefaultTypes::node_type >::useNewInterface
inlineprotectedvirtualinherited

Whether the subclass implements the "old" or "new" (Kokkos-friendly) interface.

The "old" interface consists of copyAndPermute, packAndPrepare, and unpackAndCombine. The "new" interface consists of copyAndPermuteNew, packAndPrepareNew, and unpackAndCombineNew. We prefer the new interface, because it facilitates thread parallelization using Kokkos data structures.

At some point, we will remove the old interface, and rename the "new" interface (by removing "New" from the methods' names), so that it becomes the only interface.

Definition at line 761 of file Tpetra_DistObject_decl.hpp.

◆ copyAndPermute()

virtual void Tpetra::Classes::DistObject< ::Tpetra::Details::DefaultTypes::global_ordinal_type , ::Tpetra::Details::DefaultTypes::local_ordinal_type , ::Tpetra::Details::DefaultTypes::global_ordinal_type , ::Tpetra::Details::DefaultTypes::node_type >::copyAndPermute ( const SrcDistObject< ::Tpetra::Details::DefaultTypes::global_ordinal_type, ::Tpetra::Details::DefaultTypes::local_ordinal_type, ::Tpetra::Details::DefaultTypes::global_ordinal_type, ::Tpetra::Details::DefaultTypes::node_type > &  source,
size_t  numSameIDs,
const Teuchos::ArrayView< const local_ordinal_type > &  permuteToLIDs,
const Teuchos::ArrayView< const local_ordinal_type > &  permuteFromLIDs 
)
inlineprotectedvirtualinherited

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.

Definition at line 781 of file Tpetra_DistObject_decl.hpp.

◆ packAndPrepare()

virtual void Tpetra::Classes::DistObject< ::Tpetra::Details::DefaultTypes::global_ordinal_type , ::Tpetra::Details::DefaultTypes::local_ordinal_type , ::Tpetra::Details::DefaultTypes::global_ordinal_type , ::Tpetra::Details::DefaultTypes::node_type >::packAndPrepare ( const SrcDistObject< ::Tpetra::Details::DefaultTypes::global_ordinal_type, ::Tpetra::Details::DefaultTypes::local_ordinal_type, ::Tpetra::Details::DefaultTypes::global_ordinal_type, ::Tpetra::Details::DefaultTypes::node_type > &  source,
const Teuchos::ArrayView< const local_ordinal_type > &  exportLIDs,
Teuchos::Array< packet_type > &  exports,
const Teuchos::ArrayView< size_t > &  numPacketsPerLID,
size_t &  constantNumPackets,
Distributor distor 
)
inlineprotectedvirtualinherited

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.

Definition at line 816 of file Tpetra_DistObject_decl.hpp.

◆ unpackAndCombine()

virtual void Tpetra::Classes::DistObject< ::Tpetra::Details::DefaultTypes::global_ordinal_type , ::Tpetra::Details::DefaultTypes::local_ordinal_type , ::Tpetra::Details::DefaultTypes::global_ordinal_type , ::Tpetra::Details::DefaultTypes::node_type >::unpackAndCombine ( const Teuchos::ArrayView< const local_ordinal_type > &  importLIDs,
const Teuchos::ArrayView< const packet_type > &  imports,
const Teuchos::ArrayView< size_t > &  numPacketsPerLID,
size_t  constantNumPackets,
Distributor distor,
CombineMode  CM 
)
inlineprotectedvirtualinherited

Perform any unpacking and combining after communication (old version that uses Teuchos memory management classes to hold data).

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.

Definition at line 857 of file Tpetra_DistObject_decl.hpp.

◆ unpackAndCombineNew()

virtual void Tpetra::Classes::DistObject< ::Tpetra::Details::DefaultTypes::global_ordinal_type , ::Tpetra::Details::DefaultTypes::local_ordinal_type , ::Tpetra::Details::DefaultTypes::global_ordinal_type , ::Tpetra::Details::DefaultTypes::node_type >::unpackAndCombineNew ( const Kokkos::DualView< const local_ordinal_type *, device_type > &  importLIDs,
const Kokkos::DualView< const packet_type *, buffer_device_type > &  imports,
const Kokkos::DualView< const size_t *, buffer_device_type > &  numPacketsPerLID,
const size_t  constantNumPackets,
Distributor distor,
const CombineMode  CM 
)
inlineprotectedvirtualinherited

Perform any unpacking and combining after communication (new version that uses Kokkos data structures to hold data).

The imports input argument controls whether this method should unpack on host or unpack on device.

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.

Definition at line 891 of file Tpetra_DistObject_decl.hpp.

◆ createViews()

void Tpetra::Classes::DistObject< ::Tpetra::Details::DefaultTypes::global_ordinal_type , ::Tpetra::Details::DefaultTypes::local_ordinal_type , ::Tpetra::Details::DefaultTypes::global_ordinal_type , ::Tpetra::Details::DefaultTypes::node_type >::createViews
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.

Definition at line 906 of file Tpetra_DistObject_def.hpp.

◆ createViewsNonConst()

void Tpetra::Classes::DistObject< ::Tpetra::Details::DefaultTypes::global_ordinal_type , ::Tpetra::Details::DefaultTypes::local_ordinal_type , ::Tpetra::Details::DefaultTypes::global_ordinal_type , ::Tpetra::Details::DefaultTypes::node_type >::createViewsNonConst ( KokkosClassic::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).

Definition at line 923 of file Tpetra_DistObject_def.hpp.

◆ releaseViews()

void Tpetra::Classes::DistObject< ::Tpetra::Details::DefaultTypes::global_ordinal_type , ::Tpetra::Details::DefaultTypes::local_ordinal_type , ::Tpetra::Details::DefaultTypes::global_ordinal_type , ::Tpetra::Details::DefaultTypes::node_type >::releaseViews
protectedvirtualinherited

Hook for releasing views.

Note
This is no longer called (and is therefore no longer needed) for subclasses for which useNewInterface() returns true.

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.

Definition at line 939 of file Tpetra_DistObject_def.hpp.

◆ reallocImportsIfNeeded()

bool Tpetra::Classes::DistObject< ::Tpetra::Details::DefaultTypes::global_ordinal_type , ::Tpetra::Details::DefaultTypes::local_ordinal_type , ::Tpetra::Details::DefaultTypes::global_ordinal_type , ::Tpetra::Details::DefaultTypes::node_type >::reallocImportsIfNeeded ( const size_t  newSize,
const bool  debug = false 
)
protectedinherited

Reallocate imports_ if needed.

This unfortunately must be declared protected, for the same reason that imports_ is declared protected.

Parameters
newSize[in] New size of imports_.
debug[in] Whether to print (copious) debug output to stderr.
Returns
Whether we actually reallocated.

We don't need a "reallocExportsIfNeeded" method, because exports_ always gets passed into packAndPrepareNew() by nonconst reference. Thus, that method can resize the DualView without needing to call other DistObject methods.

Definition at line 968 of file Tpetra_DistObject_def.hpp.

Friends And Related Function Documentation

◆ CrsMatrix

template<class LocalOrdinal = ::Tpetra::Details::DefaultTypes::local_ordinal_type, class GlobalOrdinal = ::Tpetra::Details::DefaultTypes::global_ordinal_type, class Node = ::Tpetra::Details::DefaultTypes::node_type>
template<class S , class LO , class GO , class N >
friend class CrsMatrix
friend

Alias for Tpetra::Classes::CrsMatrix.

Definition at line 269 of file Tpetra_CrsGraph_decl.hpp.

◆ CrsGraph

template<class LocalOrdinal = ::Tpetra::Details::DefaultTypes::local_ordinal_type, class GlobalOrdinal = ::Tpetra::Details::DefaultTypes::global_ordinal_type, class Node = ::Tpetra::Details::DefaultTypes::node_type>
template<class LO2 , class GO2 , class N2 >
friend class CrsGraph
friend

Alias for Tpetra::Classes::CrsGraph.

Definition at line 271 of file Tpetra_CrsGraph_decl.hpp.

Member Data Documentation

◆ useAtomicUpdatesByDefault

template<class LocalOrdinal = ::Tpetra::Details::DefaultTypes::local_ordinal_type, class GlobalOrdinal = ::Tpetra::Details::DefaultTypes::global_ordinal_type, class Node = ::Tpetra::Details::DefaultTypes::node_type>
const bool Tpetra::Classes::CrsGraph< LocalOrdinal, GlobalOrdinal, Node >::useAtomicUpdatesByDefault
staticprotected
Initial value:
=
true

Whether transformLocalValues should use atomic updates by default.

Warning
This is an implementation detail.

Definition at line 1816 of file Tpetra_CrsGraph_decl.hpp.

◆ rowMap_

template<class LocalOrdinal = ::Tpetra::Details::DefaultTypes::local_ordinal_type, class GlobalOrdinal = ::Tpetra::Details::DefaultTypes::global_ordinal_type, class Node = ::Tpetra::Details::DefaultTypes::node_type>
Teuchos::RCP<const map_type> Tpetra::Classes::CrsGraph< LocalOrdinal, GlobalOrdinal, Node >::rowMap_
protected

The Map describing the distribution of rows of the graph.

Definition at line 2071 of file Tpetra_CrsGraph_decl.hpp.

◆ colMap_

template<class LocalOrdinal = ::Tpetra::Details::DefaultTypes::local_ordinal_type, class GlobalOrdinal = ::Tpetra::Details::DefaultTypes::global_ordinal_type, class Node = ::Tpetra::Details::DefaultTypes::node_type>
Teuchos::RCP<const map_type> Tpetra::Classes::CrsGraph< LocalOrdinal, GlobalOrdinal, Node >::colMap_
protected

The Map describing the distribution of columns of the graph.

Definition at line 2073 of file Tpetra_CrsGraph_decl.hpp.

◆ rangeMap_

template<class LocalOrdinal = ::Tpetra::Details::DefaultTypes::local_ordinal_type, class GlobalOrdinal = ::Tpetra::Details::DefaultTypes::global_ordinal_type, class Node = ::Tpetra::Details::DefaultTypes::node_type>
Teuchos::RCP<const map_type> Tpetra::Classes::CrsGraph< LocalOrdinal, GlobalOrdinal, Node >::rangeMap_
protected

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

Definition at line 2075 of file Tpetra_CrsGraph_decl.hpp.

◆ domainMap_

template<class LocalOrdinal = ::Tpetra::Details::DefaultTypes::local_ordinal_type, class GlobalOrdinal = ::Tpetra::Details::DefaultTypes::global_ordinal_type, class Node = ::Tpetra::Details::DefaultTypes::node_type>
Teuchos::RCP<const map_type> Tpetra::Classes::CrsGraph< LocalOrdinal, GlobalOrdinal, Node >::domainMap_
protected

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

Definition at line 2077 of file Tpetra_CrsGraph_decl.hpp.

◆ importer_

template<class LocalOrdinal = ::Tpetra::Details::DefaultTypes::local_ordinal_type, class GlobalOrdinal = ::Tpetra::Details::DefaultTypes::global_ordinal_type, class Node = ::Tpetra::Details::DefaultTypes::node_type>
Teuchos::RCP<const import_type> Tpetra::Classes::CrsGraph< LocalOrdinal, GlobalOrdinal, Node >::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 2085 of file Tpetra_CrsGraph_decl.hpp.

◆ exporter_

template<class LocalOrdinal = ::Tpetra::Details::DefaultTypes::local_ordinal_type, class GlobalOrdinal = ::Tpetra::Details::DefaultTypes::global_ordinal_type, class Node = ::Tpetra::Details::DefaultTypes::node_type>
Teuchos::RCP<const export_type> Tpetra::Classes::CrsGraph< LocalOrdinal, GlobalOrdinal, Node >::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 2092 of file Tpetra_CrsGraph_decl.hpp.

◆ lclGraph_

template<class LocalOrdinal = ::Tpetra::Details::DefaultTypes::local_ordinal_type, class GlobalOrdinal = ::Tpetra::Details::DefaultTypes::global_ordinal_type, class Node = ::Tpetra::Details::DefaultTypes::node_type>
local_graph_type Tpetra::Classes::CrsGraph< LocalOrdinal, GlobalOrdinal, Node >::lclGraph_
protected

Local graph; only initialized after first fillComplete() call.

Definition at line 2095 of file Tpetra_CrsGraph_decl.hpp.

◆ nodeNumDiags_

template<class LocalOrdinal = ::Tpetra::Details::DefaultTypes::local_ordinal_type, class GlobalOrdinal = ::Tpetra::Details::DefaultTypes::global_ordinal_type, class Node = ::Tpetra::Details::DefaultTypes::node_type>
size_t Tpetra::Classes::CrsGraph< LocalOrdinal, GlobalOrdinal, Node >::nodeNumDiags_
protected

Local number of (populated) diagonal entries.

Computed in computeLocalConstants(); only valid when isFillComplete().

Definition at line 2100 of file Tpetra_CrsGraph_decl.hpp.

◆ nodeMaxNumRowEntries_

template<class LocalOrdinal = ::Tpetra::Details::DefaultTypes::local_ordinal_type, class GlobalOrdinal = ::Tpetra::Details::DefaultTypes::global_ordinal_type, class Node = ::Tpetra::Details::DefaultTypes::node_type>
size_t Tpetra::Classes::CrsGraph< LocalOrdinal, GlobalOrdinal, Node >::nodeMaxNumRowEntries_
protected

Local maximum of the number of entries in each row.

Computed in computeLocalConstants(); only valid when isFillComplete().

Definition at line 2105 of file Tpetra_CrsGraph_decl.hpp.

◆ globalNumEntries_

template<class LocalOrdinal = ::Tpetra::Details::DefaultTypes::local_ordinal_type, class GlobalOrdinal = ::Tpetra::Details::DefaultTypes::global_ordinal_type, class Node = ::Tpetra::Details::DefaultTypes::node_type>
global_size_t Tpetra::Classes::CrsGraph< LocalOrdinal, GlobalOrdinal, Node >::globalNumEntries_
protected

Global number of entries in the graph.

Only valid when isFillComplete().

Definition at line 2110 of file Tpetra_CrsGraph_decl.hpp.

◆ globalNumDiags_

template<class LocalOrdinal = ::Tpetra::Details::DefaultTypes::local_ordinal_type, class GlobalOrdinal = ::Tpetra::Details::DefaultTypes::global_ordinal_type, class Node = ::Tpetra::Details::DefaultTypes::node_type>
global_size_t Tpetra::Classes::CrsGraph< LocalOrdinal, GlobalOrdinal, Node >::globalNumDiags_
protected

Global number of (populated) diagonal entries.

Computed in computeGlobalConstants(); only valid when isFillComplete().

Definition at line 2115 of file Tpetra_CrsGraph_decl.hpp.

◆ globalMaxNumRowEntries_

template<class LocalOrdinal = ::Tpetra::Details::DefaultTypes::local_ordinal_type, class GlobalOrdinal = ::Tpetra::Details::DefaultTypes::global_ordinal_type, class Node = ::Tpetra::Details::DefaultTypes::node_type>
global_size_t Tpetra::Classes::CrsGraph< LocalOrdinal, GlobalOrdinal, Node >::globalMaxNumRowEntries_
protected

Global maximum of the number of entries in each row.

Computed in computeGlobalConstants(); only valid when isFillComplete().

Definition at line 2120 of file Tpetra_CrsGraph_decl.hpp.

◆ pftype_

template<class LocalOrdinal = ::Tpetra::Details::DefaultTypes::local_ordinal_type, class GlobalOrdinal = ::Tpetra::Details::DefaultTypes::global_ordinal_type, class Node = ::Tpetra::Details::DefaultTypes::node_type>
ProfileType Tpetra::Classes::CrsGraph< LocalOrdinal, GlobalOrdinal, Node >::pftype_
protected

Whether the graph was allocated with static or dynamic profile.

Definition at line 2123 of file Tpetra_CrsGraph_decl.hpp.

◆ k_numAllocPerRow_

template<class LocalOrdinal = ::Tpetra::Details::DefaultTypes::local_ordinal_type, class GlobalOrdinal = ::Tpetra::Details::DefaultTypes::global_ordinal_type, class Node = ::Tpetra::Details::DefaultTypes::node_type>
Kokkos::View<const size_t*, execution_space>::HostMirror Tpetra::Classes::CrsGraph< LocalOrdinal, GlobalOrdinal, Node >::k_numAllocPerRow_
protected

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

This comes in as an argument to some of the graph's constructors. Either this or numAllocForAllRows_ is used, but not both. allocateIndices(), setAllIndices(), and expertStaticFillComplete() all deallocate this array once they are done with it.

This is a host View because it is only ever used on the host. It has the HostMirror type for backwards compatibility; this used to be a DualView with default layout, so making this a HostMirror ensures that we can still take it directly by assignment from the constructors that take DualView, without a deep copy.

This array only exists on a process before the graph's indices are allocated on that process. After that point, it is discarded, since the graph's allocation implicitly or explicitly represents the same information.

FIXME (mfh 07 Aug 2014) We want graph's constructors to allocate, rather than doing lazy allocation at first insert. This will make both k_numAllocPerRow_ and numAllocForAllRows_ obsolete.

Definition at line 2151 of file Tpetra_CrsGraph_decl.hpp.

◆ numAllocForAllRows_

template<class LocalOrdinal = ::Tpetra::Details::DefaultTypes::local_ordinal_type, class GlobalOrdinal = ::Tpetra::Details::DefaultTypes::global_ordinal_type, class Node = ::Tpetra::Details::DefaultTypes::node_type>
size_t Tpetra::Classes::CrsGraph< LocalOrdinal, GlobalOrdinal, Node >::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 k_numAllocPerRow_ is used, but not both.

FIXME (mfh 07 Aug 2014) We want graph's constructors to allocate, rather than doing lazy allocation at first insert. This will make both k_numAllocPerRow_ and numAllocForAllRows_ obsolete.

Definition at line 2162 of file Tpetra_CrsGraph_decl.hpp.

◆ k_lclInds1D_

template<class LocalOrdinal = ::Tpetra::Details::DefaultTypes::local_ordinal_type, class GlobalOrdinal = ::Tpetra::Details::DefaultTypes::global_ordinal_type, class Node = ::Tpetra::Details::DefaultTypes::node_type>
local_graph_type::entries_type::non_const_type Tpetra::Classes::CrsGraph< LocalOrdinal, GlobalOrdinal, Node >::k_lclInds1D_
protected

Local column indices for all rows.

This is only allocated if

  • The calling process has a nonzero number of entries
  • The graph has StaticProfile (1-D storage)
  • The graph is locally indexed

Definition at line 2174 of file Tpetra_CrsGraph_decl.hpp.

◆ k_gblInds1D_

template<class LocalOrdinal = ::Tpetra::Details::DefaultTypes::local_ordinal_type, class GlobalOrdinal = ::Tpetra::Details::DefaultTypes::global_ordinal_type, class Node = ::Tpetra::Details::DefaultTypes::node_type>
t_GlobalOrdinal_1D Tpetra::Classes::CrsGraph< LocalOrdinal, GlobalOrdinal, Node >::k_gblInds1D_
protected

Global column indices for all rows.

This is only allocated if

  • The calling process has a nonzero number of entries
  • The graph has StaticProfile (1-D storage)
  • The graph is globally indexed

Definition at line 2186 of file Tpetra_CrsGraph_decl.hpp.

◆ k_rowPtrs_

template<class LocalOrdinal = ::Tpetra::Details::DefaultTypes::local_ordinal_type, class GlobalOrdinal = ::Tpetra::Details::DefaultTypes::global_ordinal_type, class Node = ::Tpetra::Details::DefaultTypes::node_type>
local_graph_type::row_map_type::const_type Tpetra::Classes::CrsGraph< LocalOrdinal, GlobalOrdinal, Node >::k_rowPtrs_
protected

Row offsets for "1-D" storage.

This is only allocated if "1-D" (StaticProfile) storage is active. In that case, if beg = k_rowPtrs_(i_lcl) and end = k_rowPtrs_(i_lcl+1) for local row index i_lcl, then

  • if the graph is locally indexed, k_lclInds1D_(beg:end-1) (inclusive range) is the space for any local column indices in local row i_lcl, else
  • if the graph is globally indexed, k_gblInds1D_(beg:end-1) (inclusive range) is the space for any global column indices in local row i_lcl.

Only the first k_numRowEntries_(i_lcl) of these entries are actual valid column indices. Any remaining entries are "extra space." If the graph's storage is packed, then there is no extra space, and the k_numRowEntries_ array is invalid.

Both the k_rowPtrs_ and k_numRowEntries_ arrays are not allocated if the graph has 2-D (DynamicProfile) storage.

If it is allocated, k_rowPtrs_ has length getNodeNumRows()+1. The k_numRowEntries_ array has has length getNodeNumRows(), again if it is allocated.

Definition at line 2212 of file Tpetra_CrsGraph_decl.hpp.

◆ lclInds2D_

template<class LocalOrdinal = ::Tpetra::Details::DefaultTypes::local_ordinal_type, class GlobalOrdinal = ::Tpetra::Details::DefaultTypes::global_ordinal_type, class Node = ::Tpetra::Details::DefaultTypes::node_type>
Teuchos::ArrayRCP<Teuchos::Array<LocalOrdinal> > Tpetra::Classes::CrsGraph< LocalOrdinal, GlobalOrdinal, Node >::lclInds2D_
protected

Local column indices for all rows.

This is only allocated if

  • The calling process has a nonzero number of entries
  • The graph has DynamicProfile (2-D storage)
  • The graph is locally indexed

In that case, if i_lcl is the local index of a locally owned row, then lclInds2D_[i_lcl] stores the local column indices for that row.

Definition at line 2239 of file Tpetra_CrsGraph_decl.hpp.

◆ gblInds2D_

template<class LocalOrdinal = ::Tpetra::Details::DefaultTypes::local_ordinal_type, class GlobalOrdinal = ::Tpetra::Details::DefaultTypes::global_ordinal_type, class Node = ::Tpetra::Details::DefaultTypes::node_type>
Teuchos::ArrayRCP<Teuchos::Array<GlobalOrdinal> > Tpetra::Classes::CrsGraph< LocalOrdinal, GlobalOrdinal, Node >::gblInds2D_
protected

Global column indices for all rows.

This is only allocated if

  • The calling process has a nonzero number of entries
  • The graph has DynamicProfile (2-D storage)
  • The graph is globally indexed

In that case, if i_gbl is the global index of a globally owned row, then gblInds2D_[i_gbl] stores the global column indices for that row.

Definition at line 2252 of file Tpetra_CrsGraph_decl.hpp.

◆ k_numRowEntries_

template<class LocalOrdinal = ::Tpetra::Details::DefaultTypes::local_ordinal_type, class GlobalOrdinal = ::Tpetra::Details::DefaultTypes::global_ordinal_type, class Node = ::Tpetra::Details::DefaultTypes::node_type>
num_row_entries_type Tpetra::Classes::CrsGraph< LocalOrdinal, GlobalOrdinal, Node >::k_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.

This may also exist with 1-D storage, if storage is unpacked.

Definition at line 2279 of file Tpetra_CrsGraph_decl.hpp.

◆ storageStatus_

template<class LocalOrdinal = ::Tpetra::Details::DefaultTypes::local_ordinal_type, class GlobalOrdinal = ::Tpetra::Details::DefaultTypes::global_ordinal_type, class Node = ::Tpetra::Details::DefaultTypes::node_type>
::Tpetra::Details::EStorageStatus Tpetra::Classes::CrsGraph< LocalOrdinal, GlobalOrdinal, Node >::storageStatus_
protected

Status of the graph's storage, when not in a fill-complete state.

The phrase "When not in a fill-complete state" is important. When the graph is fill complete, it always uses 1-D "packed" storage. However, if the "Optimize Storage" parameter to fillComplete was false, the graph may keep unpacked 1-D or 2-D storage around and resume it on the next resumeFill call.

Definition at line 2292 of file Tpetra_CrsGraph_decl.hpp.

◆ lowerTriangular_

template<class LocalOrdinal = ::Tpetra::Details::DefaultTypes::local_ordinal_type, class GlobalOrdinal = ::Tpetra::Details::DefaultTypes::global_ordinal_type, class Node = ::Tpetra::Details::DefaultTypes::node_type>
bool Tpetra::Classes::CrsGraph< LocalOrdinal, GlobalOrdinal, Node >::lowerTriangular_
protected

Whether the graph is locally lower triangular.

Definition at line 2300 of file Tpetra_CrsGraph_decl.hpp.

◆ upperTriangular_

template<class LocalOrdinal = ::Tpetra::Details::DefaultTypes::local_ordinal_type, class GlobalOrdinal = ::Tpetra::Details::DefaultTypes::global_ordinal_type, class Node = ::Tpetra::Details::DefaultTypes::node_type>
bool Tpetra::Classes::CrsGraph< LocalOrdinal, GlobalOrdinal, Node >::upperTriangular_
protected

Whether the graph is locally upper triangular.

Definition at line 2302 of file Tpetra_CrsGraph_decl.hpp.

◆ indicesAreSorted_

template<class LocalOrdinal = ::Tpetra::Details::DefaultTypes::local_ordinal_type, class GlobalOrdinal = ::Tpetra::Details::DefaultTypes::global_ordinal_type, class Node = ::Tpetra::Details::DefaultTypes::node_type>
bool Tpetra::Classes::CrsGraph< LocalOrdinal, GlobalOrdinal, Node >::indicesAreSorted_
protected

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

Definition at line 2304 of file Tpetra_CrsGraph_decl.hpp.

◆ noRedundancies_

template<class LocalOrdinal = ::Tpetra::Details::DefaultTypes::local_ordinal_type, class GlobalOrdinal = ::Tpetra::Details::DefaultTypes::global_ordinal_type, class Node = ::Tpetra::Details::DefaultTypes::node_type>
bool Tpetra::Classes::CrsGraph< LocalOrdinal, GlobalOrdinal, Node >::noRedundancies_
protected

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

Definition at line 2307 of file Tpetra_CrsGraph_decl.hpp.

◆ haveLocalConstants_

template<class LocalOrdinal = ::Tpetra::Details::DefaultTypes::local_ordinal_type, class GlobalOrdinal = ::Tpetra::Details::DefaultTypes::global_ordinal_type, class Node = ::Tpetra::Details::DefaultTypes::node_type>
bool Tpetra::Classes::CrsGraph< LocalOrdinal, GlobalOrdinal, Node >::haveLocalConstants_
protected

Whether this process has computed local constants.

Definition at line 2309 of file Tpetra_CrsGraph_decl.hpp.

◆ haveGlobalConstants_

template<class LocalOrdinal = ::Tpetra::Details::DefaultTypes::local_ordinal_type, class GlobalOrdinal = ::Tpetra::Details::DefaultTypes::global_ordinal_type, class Node = ::Tpetra::Details::DefaultTypes::node_type>
bool Tpetra::Classes::CrsGraph< LocalOrdinal, GlobalOrdinal, Node >::haveGlobalConstants_
protected

Whether all processes have computed global constants.

Definition at line 2311 of file Tpetra_CrsGraph_decl.hpp.

◆ nonlocals_

template<class LocalOrdinal = ::Tpetra::Details::DefaultTypes::local_ordinal_type, class GlobalOrdinal = ::Tpetra::Details::DefaultTypes::global_ordinal_type, class Node = ::Tpetra::Details::DefaultTypes::node_type>
std::map<GlobalOrdinal, std::vector<GlobalOrdinal> > Tpetra::Classes::CrsGraph< LocalOrdinal, GlobalOrdinal, Node >::nonlocals_
protected

Nonlocal data given to insertGlobalIndices.

Definition at line 2314 of file Tpetra_CrsGraph_decl.hpp.

◆ sortGhostsAssociatedWithEachProcessor_

template<class LocalOrdinal = ::Tpetra::Details::DefaultTypes::local_ordinal_type, class GlobalOrdinal = ::Tpetra::Details::DefaultTypes::global_ordinal_type, class Node = ::Tpetra::Details::DefaultTypes::node_type>
bool Tpetra::Classes::CrsGraph< LocalOrdinal, GlobalOrdinal, Node >::sortGhostsAssociatedWithEachProcessor_
protected

Whether to require makeColMap() (and therefore fillComplete()) to order column Map GIDs associated with each remote process in ascending order.

makeColMap() always groups remote GIDs by process rank, so that all remote GIDs with the same owning rank occur contiguously. By default, it always sorts remote GIDs in increasing order within those groups. This behavior differs from Epetra, which does not sort remote GIDs with the same owning process.

This is true by default, which means "sort remote GIDs." If you don't want to sort (for compatibility with Epetra), call sortGhostColumnGIDsWithinProcessBlock(false).

Definition at line 2330 of file Tpetra_CrsGraph_decl.hpp.

◆ map_

Teuchos::RCP<const map_type> Tpetra::Classes::DistObject< ::Tpetra::Details::DefaultTypes::global_ordinal_type , ::Tpetra::Details::DefaultTypes::local_ordinal_type , ::Tpetra::Details::DefaultTypes::global_ordinal_type , ::Tpetra::Details::DefaultTypes::node_type >::map_
protectedinherited

The Map over which this object is distributed.

Definition at line 942 of file Tpetra_DistObject_decl.hpp.

◆ imports_

Kokkos::DualView<packet_type*, buffer_device_type> Tpetra::Classes::DistObject< ::Tpetra::Details::DefaultTypes::global_ordinal_type , ::Tpetra::Details::DefaultTypes::local_ordinal_type , ::Tpetra::Details::DefaultTypes::global_ordinal_type , ::Tpetra::Details::DefaultTypes::node_type >::imports_
protectedinherited

Buffer into which packed data are imported (received from other processes).

Unfortunately, I had to declare these protected, because CrsMatrix uses them at one point. Please, nobody else use them.

Definition at line 951 of file Tpetra_DistObject_decl.hpp.

◆ numImportPacketsPerLID_

Kokkos::DualView<size_t*, buffer_device_type> Tpetra::Classes::DistObject< ::Tpetra::Details::DefaultTypes::global_ordinal_type , ::Tpetra::Details::DefaultTypes::local_ordinal_type , ::Tpetra::Details::DefaultTypes::global_ordinal_type , ::Tpetra::Details::DefaultTypes::node_type >::numImportPacketsPerLID_
protectedinherited

Number of packets to receive for each receive operation.

This array is used in Distributor::doPosts() (and doReversePosts()) when starting the ireceive operation.

This may be ignored in doTransfer() if constantNumPackets is nonzero, indicating a constant number of packets per LID. (For example, MultiVector sets the constantNumPackets output argument of packAndPrepare() to the number of columns in the multivector.)

Unfortunately, I had to declare this protected, because CrsMatrix uses it at one point. Please, nobody else use it.

Definition at line 983 of file Tpetra_DistObject_decl.hpp.

◆ exports_

Kokkos::DualView<packet_type*, buffer_device_type> Tpetra::Classes::DistObject< ::Tpetra::Details::DefaultTypes::global_ordinal_type , ::Tpetra::Details::DefaultTypes::local_ordinal_type , ::Tpetra::Details::DefaultTypes::global_ordinal_type , ::Tpetra::Details::DefaultTypes::node_type >::exports_
protectedinherited

Buffer from which packed data are exported (sent to other processes).

Unfortunately, I had to declare this protected, because CrsMatrix uses it at one point. Please, nobody else use it.

Definition at line 990 of file Tpetra_DistObject_decl.hpp.

◆ numExportPacketsPerLID_

Kokkos::DualView<size_t*, buffer_device_type> Tpetra::Classes::DistObject< ::Tpetra::Details::DefaultTypes::global_ordinal_type , ::Tpetra::Details::DefaultTypes::local_ordinal_type , ::Tpetra::Details::DefaultTypes::global_ordinal_type , ::Tpetra::Details::DefaultTypes::node_type >::numExportPacketsPerLID_
protectedinherited

Number of packets to send for each send operation.

This array is used in Distributor::doPosts() (and doReversePosts()) for preparing for the send operation.

This may be ignored in doTransfer() if constantNumPackets is nonzero, indicating a constant number of packets per LID. (For example, MultiVector sets the constantNumPackets output argument of packAndPrepare() to the number of columns in the multivector.)

Unfortunately, I had to declare this protected, because CrsMatrix uses them at one point. Please, nobody else use it.

Definition at line 1005 of file Tpetra_DistObject_decl.hpp.


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