10#ifndef TPETRA_ROWGRAPH_DECL_HPP 
   11#define TPETRA_ROWGRAPH_DECL_HPP 
   14#include "Tpetra_Map.hpp" 
   15#include "Tpetra_Import.hpp" 
   16#include "Tpetra_Export.hpp" 
   18#include "Teuchos_Describable.hpp" 
   34template <
class LocalOrdinal,
 
   37class RowGraph : 
virtual public Teuchos::Describable,
 
   38                 public Packable<GlobalOrdinal, LocalOrdinal> {
 
   50  typedef typename Kokkos::View<LocalOrdinal*, typename Node::device_type>::const_type
 
   51      local_inds_device_view_type;
 
   52  typedef typename local_inds_device_view_type::host_mirror_type::const_type
 
   53      local_inds_host_view_type;
 
   54  typedef typename local_inds_device_view_type::host_mirror_type
 
   55      nonconst_local_inds_host_view_type;
 
   57  typedef typename Kokkos::View<GlobalOrdinal*, typename Node::device_type>::const_type
 
   58      global_inds_device_view_type;
 
   59  typedef typename global_inds_device_view_type::host_mirror_type::const_type
 
   60      global_inds_host_view_type;
 
   61  typedef typename global_inds_device_view_type::host_mirror_type
 
   62      nonconst_global_inds_host_view_type;
 
   64  typedef typename Kokkos::View<const size_t*, typename Node::device_type>::const_type
 
   65      row_ptrs_device_view_type;
 
   66  typedef typename row_ptrs_device_view_type::host_mirror_type::const_type
 
   67      row_ptrs_host_view_type;
 
   76  virtual Teuchos::RCP<const Teuchos::Comm<int> >
 
   80  virtual Teuchos::RCP<const Map<LocalOrdinal, GlobalOrdinal, Node> >
 
   84  virtual Teuchos::RCP<const Map<LocalOrdinal, GlobalOrdinal, Node> >
 
   88  virtual Teuchos::RCP<const Map<LocalOrdinal, GlobalOrdinal, Node> >
 
   92  virtual Teuchos::RCP<const Map<LocalOrdinal, GlobalOrdinal, Node> >
 
   96  virtual Teuchos::RCP<const Import<LocalOrdinal, GlobalOrdinal, Node> >
 
  100  virtual Teuchos::RCP<const Export<LocalOrdinal, GlobalOrdinal, Node> >
 
  172                   nonconst_global_inds_host_view_type& 
gblColInds,
 
  193                  nonconst_local_inds_host_view_type& 
lclColInds,
 
  235                  local_inds_host_view_type& 
lclColInds) 
const = 0;
 
  254                   global_inds_host_view_type& 
gblColInds) 
const = 0;
 
  263       Teuchos::Array<GlobalOrdinal>& exports,
 
 
Declaration of Tpetra::Packable.
 
Forward declaration of Tpetra::RowGraph.
 
Struct that holds views of the contents of a CrsMatrix.
 
Abstract base class for objects that can be the source of an Import or Export operation,...
 
An abstract interface for graphs accessed by rows.
 
virtual bool isFillComplete() const =0
Whether fillComplete() has been called (without an intervening resumeFill()).
 
virtual size_t getGlobalMaxNumRowEntries() const =0
Returns the maximum number of entries across all rows/columns on all nodes.
 
virtual void getLocalRowCopy(const LocalOrdinal lclRow, nonconst_local_inds_host_view_type &lclColInds, size_t &numColInds) const =0
Get a copy of the local column indices in a given row of the graph.
 
virtual size_t getLocalNumEntries() const =0
Returns the local number of entries in the graph.
 
virtual bool hasColMap() const =0
Whether the graph has a well-defined column Map.
 
LocalOrdinal local_ordinal_type
The type of local indices in the graph.
 
virtual size_t getNumEntriesInLocalRow(LocalOrdinal localRow) const =0
Returns the current number of entries on this node in the specified local row.
 
virtual bool isGloballyIndexed() const =0
If graph indices are in the global range, this function returns true. Otherwise, this function return...
 
virtual void pack(const Teuchos::ArrayView< const LocalOrdinal > &exportLIDs, Teuchos::Array< GlobalOrdinal > &exports, const Teuchos::ArrayView< size_t > &numPacketsPerLID, size_t &constantNumPackets) const
Pack this object's data for Import or Export.
 
Node node_type
The Kokkos Node type.
 
virtual Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > getRowMap() const =0
The Map that describes this graph's distribution of rows over processes.
 
virtual global_size_t getGlobalNumCols() const =0
Returns the number of global columns in the graph.
 
virtual Teuchos::RCP< const Export< LocalOrdinal, GlobalOrdinal, Node > > getExporter() const =0
This graph's Export object.
 
virtual GlobalOrdinal getIndexBase() const =0
Returns the index base for global indices for this graph.
 
virtual size_t getLocalNumRows() const =0
Returns the number of rows owned on the calling node.
 
virtual void getGlobalRowView(const GlobalOrdinal gblRow, global_inds_host_view_type &gblColInds) const =0
Get a const, non-persisting view of the given global row's global column indices, as a Teuchos::Array...
 
virtual size_t getLocalNumCols() const =0
Returns the number of columns connected to the locally owned rows of this graph.
 
virtual global_size_t getGlobalNumRows() const =0
Returns the number of global rows in the graph.
 
virtual Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > getDomainMap() const =0
The Map associated with the domain of this graph.
 
GlobalOrdinal global_ordinal_type
The type of global indices in the graph.
 
virtual void getGlobalRowCopy(const GlobalOrdinal gblRow, nonconst_global_inds_host_view_type &gblColInds, size_t &numColInds) const =0
Get a copy of the global column indices in a given row of the graph.
 
virtual ~RowGraph()
Destructor (virtual for memory safety of derived classes).
 
virtual global_size_t getGlobalNumEntries() const =0
Returns the global number of entries in the graph.
 
virtual Teuchos::RCP< const Import< LocalOrdinal, GlobalOrdinal, Node > > getImporter() const =0
This graph's Import object.
 
virtual Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > getRangeMap() const =0
The Map associated with the range of this graph.
 
virtual void getLocalRowView(const LocalOrdinal lclRow, local_inds_host_view_type &lclColInds) const =0
Get a constant, nonpersisting, locally indexed view of the given row of the graph.
 
virtual bool isLocallyIndexed() const =0
If graph indices are in the local range, this function returns true. Otherwise, this function returns...
 
virtual Teuchos::RCP< const Teuchos::Comm< int > > getComm() const =0
The communicator over which this graph is distributed.
 
virtual bool supportsRowViews() const
Whether this class implements getLocalRowView() and getGlobalRowView().
 
virtual size_t getLocalMaxNumRowEntries() const =0
Returns the maximum number of entries across all rows/columns on this node.
 
virtual size_t getNumEntriesInGlobalRow(GlobalOrdinal globalRow) const =0
Returns the current number of entries on this node in the specified global row.
 
virtual Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > getColMap() const =0
The Map that describes this graph's distribution of columns over processes.
 
Namespace Tpetra contains the class and methods constituting the Tpetra library.