All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines
Public Member Functions | Private Types | Private Attributes
Xpetra::EpetraCrsGraph Class Reference

#include <Xpetra_EpetraCrsGraph.hpp>

Inheritance diagram for Xpetra::EpetraCrsGraph:
Xpetra::CrsGraph< int, int > Xpetra::DistObject< Packet, LocalOrdinal, GlobalOrdinal, Node > Describable

List of all members.

Public Member Functions

const Teuchos::RCP< const Map
< LocalOrdinal, GlobalOrdinal,
Node > > 
getMap () const
 Implements DistObject interface.
void doImport (const DistObject< GlobalOrdinal, LocalOrdinal, GlobalOrdinal, Node > &source, const Import< LocalOrdinal, GlobalOrdinal, Node > &importer, CombineMode CM)
 Import.
void doExport (const DistObject< GlobalOrdinal, LocalOrdinal, GlobalOrdinal, Node > &dest, const Import< LocalOrdinal, GlobalOrdinal, Node > &importer, CombineMode CM)
 Export.
void doImport (const DistObject< GlobalOrdinal, LocalOrdinal, GlobalOrdinal, Node > &source, const Export< LocalOrdinal, GlobalOrdinal, Node > &exporter, CombineMode CM)
 Import (using an Exporter).
void doExport (const DistObject< GlobalOrdinal, LocalOrdinal, GlobalOrdinal, Node > &dest, const Export< LocalOrdinal, GlobalOrdinal, Node > &exporter, CombineMode CM)
 Export (using an Importer).

Private Types

typedef int LocalOrdinal
typedef int GlobalOrdinal
typedef
Kokkos::DefaultNode::DefaultNodeType 
Node
typedef Map< LocalOrdinal,
GlobalOrdinal, Node
map_type
 The specialization of Map used by this class.

Private Attributes

RCP< Epetra_CrsGraph > graph_

Constructor/Destructor Methods

 EpetraCrsGraph (const RCP< const map_type > &rowMap, size_t maxNumEntriesPerRow, ProfileType pftype=DynamicProfile, const RCP< ParameterList > &params=null)
 Constructor specifying fixed number of entries for each row.
 EpetraCrsGraph (const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &rowMap, const ArrayRCP< const size_t > &NumEntriesPerRowToAlloc, ProfileType pftype=DynamicProfile, const RCP< ParameterList > &params=null)
 Constructor specifying (possibly different) number of entries in each row.
 EpetraCrsGraph (const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &rowMap, const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &colMap, size_t maxNumEntriesPerRow, ProfileType pftype=DynamicProfile, const RCP< ParameterList > &params=null)
 Constructor specifying column Map and fixed number of entries for each row.
 EpetraCrsGraph (const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &rowMap, const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &colMap, const ArrayRCP< const size_t > &NumEntriesPerRowToAlloc, ProfileType pftype=DynamicProfile, const RCP< ParameterList > &params=null)
 Constructor specifying column Map and number of entries in each row.
virtual ~EpetraCrsGraph ()
 Destructor.

Insertion/Removal Methods

void insertGlobalIndices (GlobalOrdinal globalRow, const ArrayView< const GlobalOrdinal > &indices)
 Insert graph indices, using global IDs.
void insertLocalIndices (LocalOrdinal localRow, const ArrayView< const LocalOrdinal > &indices)
 Insert graph indices, using local IDs.
void removeLocalIndices (LocalOrdinal localRow)
 Remove all graph indices from the specified local row.

Transformational Methods

void fillComplete (const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &domainMap, const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &rangeMap, const RCP< ParameterList > &params=null)
 Signal that data entry is complete, specifying domain and range maps.
void fillComplete (const RCP< ParameterList > &params=null)
 Signal that data entry is complete.

Methods implementing RowGraph.

const RCP< const Comm< int > > getComm () const
 Returns the communicator.
const RCP< const Map
< LocalOrdinal, GlobalOrdinal,
Node > > 
getRowMap () const
 Returns the Map that describes the row distribution in this graph.
const RCP< const Map
< LocalOrdinal, GlobalOrdinal,
Node > > 
getColMap () const
 Returns the Map that describes the column distribution in this graph.
const RCP< const Map
< LocalOrdinal, GlobalOrdinal,
Node > > 
getDomainMap () const
 Returns the Map associated with the domain of this graph.
const RCP< const Map
< LocalOrdinal, GlobalOrdinal,
Node > > 
getRangeMap () const
 Returns the Map associated with the domain of this graph.
RCP< const Import
< LocalOrdinal, GlobalOrdinal,
Node > > 
getImporter () const
 Returns the importer associated with this graph.
global_size_t getGlobalNumRows () const
 Returns the number of global rows in the graph.
global_size_t getGlobalNumCols () const
 Returns the number of global columns in the graph.
size_t getNodeNumRows () const
 Returns the number of graph rows owned on the calling node.
size_t getNodeNumCols () const
 Returns the number of columns connected to the locally owned rows of this graph.
GlobalOrdinal getIndexBase () const
 Returns the index base for global indices for this graph.
global_size_t getGlobalNumEntries () const
 Returns the global number of entries in the graph.
size_t getNodeNumEntries () const
 Returns the local number of entries in the graph.
size_t getNumEntriesInGlobalRow (GlobalOrdinal globalRow) const
 Returns the current number of entries on this node in the specified global row.
size_t getNumEntriesInLocalRow (LocalOrdinal localRow) const
 Returns the current number of entries on this node in the specified local row.
size_t getNumAllocatedEntriesInGlobalRow (GlobalOrdinal globalRow) const
 Returns the current number of allocated entries for this node in the specified global row .
size_t getNumAllocatedEntriesInLocalRow (LocalOrdinal localRow) const
 Returns the current number of allocated entries on this node in the specified local row.
global_size_t getGlobalNumDiags () const
 Returns the number of global diagonal entries, based on global row/column index comparisons.
size_t getNodeNumDiags () const
 Returns the number of local diagonal entries, based on global row/column index comparisons.
size_t getGlobalMaxNumRowEntries () const
 Returns the maximum number of entries across all rows/columns on all nodes.
size_t getNodeMaxNumRowEntries () const
 Returns the maximum number of entries across all rows/columns on this node.
bool hasColMap () const
 Indicates whether the graph has a well-defined column map.
bool isLowerTriangular () const
 Indicates whether the graph is lower triangular.
bool isUpperTriangular () const
 Indicates whether the graph is upper triangular.
bool isLocallyIndexed () const
 If graph indices are in the local range, this function returns true. Otherwise, this function returns false. */.
bool isGloballyIndexed () const
 If graph indices are in the global range, this function returns true. Otherwise, this function returns false. */.
bool isFillComplete () const
 Returns true if fillComplete() has been called and the graph is in compute mode.
bool isStorageOptimized () const
 Returns true if storage has been optimized.
void getGlobalRowView (GlobalOrdinal GlobalRow, ArrayView< const GlobalOrdinal > &Indices) const
 Extract a const, non-persisting view of global indices in a specified row of the graph.
void getLocalRowView (LocalOrdinal LocalRow, ArrayView< const LocalOrdinal > &indices) const
 Extract a const, non-persisting view of local indices in a specified row of the graph.

Overridden from Teuchos::Describable

std::string description () const
 Return a simple one-line description of this object.
void describe (Teuchos::FancyOStream &out, const Teuchos::EVerbosityLevel verbLevel=Teuchos::Describable::verbLevel_default) const
 Print the object with some verbosity level to an FancyOStream object.

Xpetra specific

 EpetraCrsGraph (const Teuchos::RCP< Epetra_CrsGraph > &graph)
 EpetraCrsGraph constructor to wrap a Epetra_CrsGraph object.
RCP< const Epetra_CrsGraph > getEpetra_CrsGraph () const
 Get the underlying Epetra graph.

Detailed Description

Definition at line 74 of file Xpetra_EpetraCrsGraph.hpp.


Member Typedef Documentation

typedef int Xpetra::EpetraCrsGraph::LocalOrdinal [private]

Definition at line 78 of file Xpetra_EpetraCrsGraph.hpp.

Definition at line 79 of file Xpetra_EpetraCrsGraph.hpp.

Definition at line 80 of file Xpetra_EpetraCrsGraph.hpp.

The specialization of Map used by this class.

Definition at line 82 of file Xpetra_EpetraCrsGraph.hpp.


Constructor & Destructor Documentation

Xpetra::EpetraCrsGraph::EpetraCrsGraph ( const RCP< const map_type > &  rowMap,
size_t  maxNumEntriesPerRow,
ProfileType  pftype = DynamicProfile,
const RCP< ParameterList > &  params = null 
)

Constructor specifying fixed number of entries for each row.

Xpetra::EpetraCrsGraph::EpetraCrsGraph ( const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &  rowMap,
const ArrayRCP< const size_t > &  NumEntriesPerRowToAlloc,
ProfileType  pftype = DynamicProfile,
const RCP< ParameterList > &  params = null 
)

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

Xpetra::EpetraCrsGraph::EpetraCrsGraph ( const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &  rowMap,
const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &  colMap,
size_t  maxNumEntriesPerRow,
ProfileType  pftype = DynamicProfile,
const RCP< ParameterList > &  params = null 
)

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

Xpetra::EpetraCrsGraph::EpetraCrsGraph ( const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &  rowMap,
const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &  colMap,
const ArrayRCP< const size_t > &  NumEntriesPerRowToAlloc,
ProfileType  pftype = DynamicProfile,
const RCP< ParameterList > &  params = null 
)

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

virtual Xpetra::EpetraCrsGraph::~EpetraCrsGraph ( ) [inline, virtual]

Destructor.

Definition at line 102 of file Xpetra_EpetraCrsGraph.hpp.

Xpetra::EpetraCrsGraph::EpetraCrsGraph ( const Teuchos::RCP< Epetra_CrsGraph > &  graph) [inline]

EpetraCrsGraph constructor to wrap a Epetra_CrsGraph object.

Definition at line 261 of file Xpetra_EpetraCrsGraph.hpp.


Member Function Documentation

void Xpetra::EpetraCrsGraph::insertGlobalIndices ( GlobalOrdinal  globalRow,
const ArrayView< const GlobalOrdinal > &  indices 
) [virtual]

Insert graph indices, using global IDs.

Implements Xpetra::CrsGraph< int, int >.

Definition at line 75 of file Xpetra_EpetraCrsGraph.cpp.

void Xpetra::EpetraCrsGraph::insertLocalIndices ( LocalOrdinal  localRow,
const ArrayView< const LocalOrdinal > &  indices 
) [virtual]

Insert graph indices, using local IDs.

Implements Xpetra::CrsGraph< int, int >.

Definition at line 82 of file Xpetra_EpetraCrsGraph.cpp.

void Xpetra::EpetraCrsGraph::removeLocalIndices ( LocalOrdinal  localRow) [inline, virtual]

Remove all graph indices from the specified local row.

Implements Xpetra::CrsGraph< int, int >.

Definition at line 116 of file Xpetra_EpetraCrsGraph.hpp.

void Xpetra::EpetraCrsGraph::fillComplete ( const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &  domainMap,
const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &  rangeMap,
const RCP< ParameterList > &  params = null 
) [virtual]

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

Implements Xpetra::CrsGraph< int, int >.

Definition at line 113 of file Xpetra_EpetraCrsGraph.cpp.

void Xpetra::EpetraCrsGraph::fillComplete ( const RCP< ParameterList > &  params = null) [virtual]

Signal that data entry is complete.

Implements Xpetra::CrsGraph< int, int >.

Definition at line 122 of file Xpetra_EpetraCrsGraph.cpp.

const RCP< const Comm< int > > Xpetra::EpetraCrsGraph::getComm ( ) const [inline, virtual]

Returns the communicator.

Implements Xpetra::CrsGraph< int, int >.

Definition at line 135 of file Xpetra_EpetraCrsGraph.hpp.

const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > Xpetra::EpetraCrsGraph::getRowMap ( ) const [inline, virtual]

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

Implements Xpetra::CrsGraph< int, int >.

Definition at line 138 of file Xpetra_EpetraCrsGraph.hpp.

const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > Xpetra::EpetraCrsGraph::getColMap ( ) const [inline, virtual]

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

Implements Xpetra::CrsGraph< int, int >.

Definition at line 141 of file Xpetra_EpetraCrsGraph.hpp.

const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > Xpetra::EpetraCrsGraph::getDomainMap ( ) const [inline, virtual]

Returns the Map associated with the domain of this graph.

Implements Xpetra::CrsGraph< int, int >.

Definition at line 144 of file Xpetra_EpetraCrsGraph.hpp.

const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > Xpetra::EpetraCrsGraph::getRangeMap ( ) const [inline, virtual]

Returns the Map associated with the domain of this graph.

Implements Xpetra::CrsGraph< int, int >.

Definition at line 147 of file Xpetra_EpetraCrsGraph.hpp.

RCP< const Import< LocalOrdinal, GlobalOrdinal, Node > > Xpetra::EpetraCrsGraph::getImporter ( ) const [inline, virtual]

Returns the importer associated with this graph.

Implements Xpetra::CrsGraph< int, int >.

Definition at line 150 of file Xpetra_EpetraCrsGraph.hpp.

Returns the number of global rows in the graph.

Implements Xpetra::CrsGraph< int, int >.

Definition at line 153 of file Xpetra_EpetraCrsGraph.hpp.

Returns the number of global columns in the graph.

Implements Xpetra::CrsGraph< int, int >.

Definition at line 156 of file Xpetra_EpetraCrsGraph.hpp.

size_t Xpetra::EpetraCrsGraph::getNodeNumRows ( ) const [inline, virtual]

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

Implements Xpetra::CrsGraph< int, int >.

Definition at line 159 of file Xpetra_EpetraCrsGraph.hpp.

size_t Xpetra::EpetraCrsGraph::getNodeNumCols ( ) const [inline, virtual]

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

Implements Xpetra::CrsGraph< int, int >.

Definition at line 162 of file Xpetra_EpetraCrsGraph.hpp.

Returns the index base for global indices for this graph.

Implements Xpetra::CrsGraph< int, int >.

Definition at line 165 of file Xpetra_EpetraCrsGraph.hpp.

Returns the global number of entries in the graph.

Implements Xpetra::CrsGraph< int, int >.

Definition at line 168 of file Xpetra_EpetraCrsGraph.hpp.

size_t Xpetra::EpetraCrsGraph::getNodeNumEntries ( ) const [inline, virtual]

Returns the local number of entries in the graph.

Implements Xpetra::CrsGraph< int, int >.

Definition at line 171 of file Xpetra_EpetraCrsGraph.hpp.

size_t Xpetra::EpetraCrsGraph::getNumEntriesInGlobalRow ( GlobalOrdinal  globalRow) const [inline, virtual]

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

Implements Xpetra::CrsGraph< int, int >.

Definition at line 174 of file Xpetra_EpetraCrsGraph.hpp.

size_t Xpetra::EpetraCrsGraph::getNumEntriesInLocalRow ( LocalOrdinal  localRow) const [inline, virtual]

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

Implements Xpetra::CrsGraph< int, int >.

Definition at line 177 of file Xpetra_EpetraCrsGraph.hpp.

size_t Xpetra::EpetraCrsGraph::getNumAllocatedEntriesInGlobalRow ( GlobalOrdinal  globalRow) const [inline, virtual]

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

Implements Xpetra::CrsGraph< int, int >.

Definition at line 180 of file Xpetra_EpetraCrsGraph.hpp.

size_t Xpetra::EpetraCrsGraph::getNumAllocatedEntriesInLocalRow ( LocalOrdinal  localRow) const [inline, virtual]

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

Implements Xpetra::CrsGraph< int, int >.

Definition at line 183 of file Xpetra_EpetraCrsGraph.hpp.

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

Implements Xpetra::CrsGraph< int, int >.

Definition at line 186 of file Xpetra_EpetraCrsGraph.hpp.

size_t Xpetra::EpetraCrsGraph::getNodeNumDiags ( ) const [inline, virtual]

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

Implements Xpetra::CrsGraph< int, int >.

Definition at line 189 of file Xpetra_EpetraCrsGraph.hpp.

size_t Xpetra::EpetraCrsGraph::getGlobalMaxNumRowEntries ( ) const [inline, virtual]

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

Implements Xpetra::CrsGraph< int, int >.

Definition at line 192 of file Xpetra_EpetraCrsGraph.hpp.

size_t Xpetra::EpetraCrsGraph::getNodeMaxNumRowEntries ( ) const [inline, virtual]

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

Implements Xpetra::CrsGraph< int, int >.

Definition at line 195 of file Xpetra_EpetraCrsGraph.hpp.

bool Xpetra::EpetraCrsGraph::hasColMap ( ) const [inline, virtual]

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

Implements Xpetra::CrsGraph< int, int >.

Definition at line 198 of file Xpetra_EpetraCrsGraph.hpp.

bool Xpetra::EpetraCrsGraph::isLowerTriangular ( ) const [inline, virtual]

Indicates whether the graph is lower triangular.

Implements Xpetra::CrsGraph< int, int >.

Definition at line 201 of file Xpetra_EpetraCrsGraph.hpp.

bool Xpetra::EpetraCrsGraph::isUpperTriangular ( ) const [inline, virtual]

Indicates whether the graph is upper triangular.

Implements Xpetra::CrsGraph< int, int >.

Definition at line 204 of file Xpetra_EpetraCrsGraph.hpp.

bool Xpetra::EpetraCrsGraph::isLocallyIndexed ( ) const [inline, virtual]

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

Implements Xpetra::CrsGraph< int, int >.

Definition at line 207 of file Xpetra_EpetraCrsGraph.hpp.

bool Xpetra::EpetraCrsGraph::isGloballyIndexed ( ) const [inline, virtual]

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

Implements Xpetra::CrsGraph< int, int >.

Definition at line 210 of file Xpetra_EpetraCrsGraph.hpp.

bool Xpetra::EpetraCrsGraph::isFillComplete ( ) const [inline, virtual]

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

Implements Xpetra::CrsGraph< int, int >.

Definition at line 213 of file Xpetra_EpetraCrsGraph.hpp.

bool Xpetra::EpetraCrsGraph::isStorageOptimized ( ) const [inline, virtual]

Returns true if storage has been optimized.

Implements Xpetra::CrsGraph< int, int >.

Definition at line 216 of file Xpetra_EpetraCrsGraph.hpp.

void Xpetra::EpetraCrsGraph::getGlobalRowView ( GlobalOrdinal  GlobalRow,
ArrayView< const GlobalOrdinal > &  Indices 
) const [virtual]

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

Implements Xpetra::CrsGraph< int, int >.

Definition at line 89 of file Xpetra_EpetraCrsGraph.cpp.

void Xpetra::EpetraCrsGraph::getLocalRowView ( LocalOrdinal  LocalRow,
ArrayView< const LocalOrdinal > &  indices 
) const [virtual]

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

Implements Xpetra::CrsGraph< int, int >.

Definition at line 101 of file Xpetra_EpetraCrsGraph.cpp.

std::string Xpetra::EpetraCrsGraph::description ( ) const [virtual]

Return a simple one-line description of this object.

Implements Xpetra::CrsGraph< int, int >.

Definition at line 131 of file Xpetra_EpetraCrsGraph.cpp.

void Xpetra::EpetraCrsGraph::describe ( Teuchos::FancyOStream &  out,
const Teuchos::EVerbosityLevel  verbLevel = Teuchos::Describable::verbLevel_default 
) const [virtual]

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

Implements Xpetra::CrsGraph< int, int >.

Definition at line 133 of file Xpetra_EpetraCrsGraph.cpp.

const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > Xpetra::EpetraCrsGraph::getMap ( ) const [inline, virtual]

Implements DistObject interface.

Access function for the Tpetra::Map this DistObject was constructed with.

Implements Xpetra::DistObject< Packet, LocalOrdinal, GlobalOrdinal, Node >.

Definition at line 241 of file Xpetra_EpetraCrsGraph.hpp.

Import (using an Exporter).

Export (using an Importer).

RCP< const Epetra_CrsGraph> Xpetra::EpetraCrsGraph::getEpetra_CrsGraph ( ) const [inline]

Get the underlying Epetra graph.

Definition at line 264 of file Xpetra_EpetraCrsGraph.hpp.


Member Data Documentation

RCP<Epetra_CrsGraph> Xpetra::EpetraCrsGraph::graph_ [private]

Definition at line 270 of file Xpetra_EpetraCrsGraph.hpp.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines