46 #ifndef XPETRA_EPETRACRSGRAPH_HPP 47 #define XPETRA_EPETRACRSGRAPH_HPP 60 #include <Epetra_CrsGraph.h> 65 template<
class GlobalOrdinal>
66 RCP< const CrsGraph<int, GlobalOrdinal> >
67 toXpetra (
const Epetra_CrsGraph& graph);
69 template<
class GlobalOrdinal>
70 const Epetra_CrsGraph&
71 toEpetra (
const RCP<
const CrsGraph<int, GlobalOrdinal> > &graph);
73 template<
class EpetraGlobalOrdinal>
75 :
public CrsGraph<int, EpetraGlobalOrdinal>
269 TEUCHOS_TEST_FOR_EXCEPTION(!graph->RowMap().GlobalIndicesIsType<GlobalOrdinal>(), std::runtime_error,
"Xpetra::EpetraCrsGraphT: GlobalOrdinal mismatch.");
283 #ifndef XPETRA_EPETRA_NO_32BIT_GLOBAL_INDICES 287 #ifndef XPETRA_EPETRA_NO_64BIT_GLOBAL_INDICES 293 #endif // XPETRA_EPETRACRSGRAPH_HPP
void getLocalRowView(LocalOrdinal LocalRow, ArrayView< const LocalOrdinal > &indices) const
Return a const, nonpersisting view of local indices in the given row.
RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > getRowMap() const
Returns the Map that describes the row distribution in this graph.
void getGlobalRowView(GlobalOrdinal GlobalRow, ArrayView< const GlobalOrdinal > &Indices) const
Return a const, nonpersisting view of global indices in the given row.
const Epetra_CrsGraph & toEpetra(const RCP< const CrsGraph< int, GlobalOrdinal > > &graph)
bool isFillComplete() const
Whether fillComplete() has been called and the graph is in compute mode.
void removeLocalIndices(LocalOrdinal localRow)
Remove all graph indices from the specified local row.
bool isUpperTriangular() const
Whether the graph is locally upper triangular.
CrsGraph< LocalOrdinal, GlobalOrdinal >::node_type Node
bool isStorageOptimized() const
Returns true if storage has been optimized.
RCP< const Import< LocalOrdinal, GlobalOrdinal, Node > > getImporter() const
Returns the importer associated with this graph.
GlobalOrdinal getIndexBase() const
Returns the index base for global indices for this graph.
EpetraCrsGraphT(const RCP< const map_type > &rowMap, size_t maxNumEntriesPerRow, ProfileType pftype=DynamicProfile, const RCP< ParameterList > ¶ms=null)
Constructor specifying fixed number of entries for each row.
virtual ~EpetraCrsGraphT()
Destructor.
#define TEUCHOS_TEST_FOR_EXCEPTION(throw_exception_test, Exception, msg)
bool isLowerTriangular() const
Whether the graph is locally lower triangular.
size_t getNumAllocatedEntriesInGlobalRow(GlobalOrdinal globalRow) const
Returns the current number of allocated entries for this node in the specified global row ...
global_size_t getGlobalNumCols() const
Returns the number of global columns in the graph.
RCP< const Comm< int > > getComm() const
Returns the communicator.
size_t getNodeNumRows() const
Returns the number of graph rows owned on the calling node.
RCP< const CrsGraph< int, GlobalOrdinal > > toXpetra(const Epetra_CrsGraph &g)
Map< LocalOrdinal, GlobalOrdinal, Node > map_type
The specialization of Map used by this class.
size_t getNumEntriesInLocalRow(LocalOrdinal localRow) const
Returns the current number of entries on this node in the specified local row.
std::string description() const
Return a simple one-line description of this object.
size_t getNodeNumCols() const
Returns the number of columns connected to the locally owned rows of this graph.
size_t getNumAllocatedEntriesInLocalRow(LocalOrdinal localRow) const
Returns the current number of allocated entries on this node in the specified local row...
EpetraCrsGraphT< int > EpetraCrsGraph
RCP< const Epetra_CrsGraph > getEpetra_CrsGraph() const
Get the underlying Epetra graph.
RCP< Epetra_CrsGraph > graph_
bool isGloballyIndexed() const
Whether column indices are stored using global indices on the calling process.
void insertGlobalIndices(GlobalOrdinal globalRow, const ArrayView< const GlobalOrdinal > &indices)
Insert global indices into the graph.
EpetraGlobalOrdinal GlobalOrdinal
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.
RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > getColMap() const
Returns the Map that describes the column distribution in this graph.
EpetraCrsGraphT< long long > EpetraCrsGraph64
void doImport(const DistObject< GlobalOrdinal, LocalOrdinal, GlobalOrdinal, Node > &source, const Import< LocalOrdinal, GlobalOrdinal, Node > &importer, CombineMode CM)
Import.
bool isLocallyIndexed() const
Whether column indices are stored using local indices on the calling process.
size_t getNodeNumEntries() const
Returns the local number of entries in the graph.
global_size_t getGlobalNumEntries() const
Returns the global number of entries in the graph.
size_t global_size_t
Global size_t object.
static const EVerbosityLevel verbLevel_default
RCP< const Export< LocalOrdinal, GlobalOrdinal, Node > > getExporter() const
Returns the exporter associated with this graph.
void fillComplete(const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &domainMap, const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &rangeMap, const RCP< ParameterList > ¶ms=null)
Signal that data entry is complete, specifying domain and range maps.
void doExport(const DistObject< GlobalOrdinal, LocalOrdinal, GlobalOrdinal, Node > &dest, const Import< LocalOrdinal, GlobalOrdinal, Node > &importer, CombineMode CM)
Export.
EpetraCrsGraphT(const Teuchos::RCP< Epetra_CrsGraph > &graph)
EpetraCrsGraphT constructor to wrap a Epetra_CrsGraph object.
CombineMode
Xpetra::Combine Mode enumerable type.
global_size_t getGlobalNumRows() const
Returns the number of global rows in the graph.
#define XPETRA_MONITOR(funcName)
size_t getGlobalMaxNumRowEntries() const
Maximum number of entries in all rows over all processes.
global_size_t getGlobalNumDiags() const
Returns the number of global diagonal entries, based on global row/column index comparisons.
size_t getNodeMaxNumRowEntries() const
Maximum number of entries in all rows owned by the calling process.
bool hasColMap() const
Whether the graph has a column Map.
void insertLocalIndices(const LocalOrdinal localRow, const ArrayView< const LocalOrdinal > &indices)
Insert local indices into the graph.
RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > getRangeMap() const
Returns the Map associated with the domain of this graph.
Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > getMap() const
Implements DistObject interface.
size_t getNumEntriesInGlobalRow(GlobalOrdinal globalRow) const
Returns the current number of entries on this node in the specified global row.
RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > getDomainMap() const
Returns the Map associated with the domain of this graph.
size_t getNodeNumDiags() const
Returns the number of local diagonal entries, based on global row/column index comparisons.