46 #ifndef XPETRA_EPETRACRSGRAPH_HPP
47 #define XPETRA_EPETRACRSGRAPH_HPP
61 #include <Epetra_CrsGraph.h>
66 template<
class GlobalOrdinal,
class Node>
67 RCP< const CrsGraph<int, GlobalOrdinal, Node> >
70 template<
class GlobalOrdinal,
class Node>
72 toEpetra (
const RCP<
const CrsGraph<int, GlobalOrdinal, Node> > &graph);
74 template<
class GlobalOrdinal,
class Node>
76 :
public CrsGraph<int, GlobalOrdinal, Node>
83 #ifdef HAVE_XPETRA_KOKKOS_REFACTOR
84 #ifdef HAVE_XPETRA_TPETRA
87 typedef typename node_type::execution_space execution_space;
98 "Xpetra::EpetraCrsGraph only available for GO=int or GO=long long with EpetraNode (Serial or OpenMP depending on configuration)");
104 "Xpetra::EpetraCrsGraph only available for GO=int or GO=long long with EpetraNode (Serial or OpenMP depending on configuration)");
111 "Xpetra::EpetraCrsGraph only available for GO=int or GO=long long with EpetraNode (Serial or OpenMP depending on configuration)");
114 #ifdef HAVE_XPETRA_KOKKOS_REFACTOR
115 #ifdef HAVE_XPETRA_TPETRA
119 const typename local_graph_type::row_map_type& rowPointers,
120 const typename local_graph_type::entries_type::non_const_type& columnIndices,
123 "Xpetra::EpetraCrsGraph only available for GO=int or GO=long long with EpetraNode (Serial or OpenMP depending on configuration)");
127 EpetraCrsGraphT(
const RCP<
const Map< LocalOrdinal, GlobalOrdinal, Node > > &rowMap,
128 const RCP<
const Map< LocalOrdinal, GlobalOrdinal, Node > > &colMap,
129 const local_graph_type& lclGraph,
130 const RCP< Teuchos::ParameterList > &plist=Teuchos::null) {
132 "Xpetra::EpetraCrsGraph only available for GO=int or GO=long long with EpetraNode (Serial or OpenMP depending on configuration)");
137 const RCP<
const Map< LocalOrdinal, GlobalOrdinal, Node > > &rowMap,
138 const RCP<
const Map< LocalOrdinal, GlobalOrdinal, Node > > &colMap,
141 const RCP< Teuchos::ParameterList > &plist=Teuchos::null) {
143 "Xpetra::EpetraCrsGraph only available for GO=int or GO=long long with EpetraNode (Serial or OpenMP depending on configuration)");
182 return Teuchos::null;
263 #ifdef HAVE_XPETRA_KOKKOS_REFACTOR
264 #ifdef HAVE_XPETRA_TPETRA
265 local_graph_type getLocalGraph ()
const {
267 "Xpetra::EpetraCrsGraph only available for GO=int or GO=long long with EpetraNode (Serial or OpenMP depending on configuration)");
272 #warning "Xpetra Kokkos interface for CrsGraph is enabled (HAVE_XPETRA_KOKKOS_REFACTOR) but Tpetra is disabled. The Kokkos interface needs Tpetra to be enabled, too."
323 "Xpetra::EpetraCrsGraph only available for GO=int or GO=long long with EpetraNode (Serial or OpenMP depending on configuration)");
336 #ifndef XPETRA_EPETRA_NO_32BIT_GLOBAL_INDICES
339 :
public virtual CrsGraph<int, int, EpetraNode>
348 #ifdef HAVE_XPETRA_KOKKOS_REFACTOR
349 #ifdef HAVE_XPETRA_TPETRA
352 typedef typename node_type::execution_space execution_space;
380 #ifdef HAVE_XPETRA_KOKKOS_REFACTOR
381 #ifdef HAVE_XPETRA_TPETRA
385 const typename local_graph_type::row_map_type& ,
386 const typename local_graph_type::entries_type::non_const_type& ,
389 "Epetra does not support CrsGraph constructors using Kokkos Views!");
393 EpetraCrsGraphT(
const RCP<
const Map< LocalOrdinal, GlobalOrdinal, Node > > &,
394 const RCP<
const Map< LocalOrdinal, GlobalOrdinal, Node > > &,
395 const local_graph_type& ,
396 const RCP< Teuchos::ParameterList > &=Teuchos::null) {
398 "Epetra does not support CrsGraph constructors using a local graph!");
403 const RCP<
const Map< LocalOrdinal, GlobalOrdinal, Node > > &,
404 const RCP<
const Map< LocalOrdinal, GlobalOrdinal, Node > > &,
407 const RCP< Teuchos::ParameterList > &=Teuchos::null) {
409 "Epetra does not support CrsGraph constructors using a local graph!");
434 int* indices_rawPtr =
const_cast<int*
>(indices.
getRawPtr());
450 graph_->FillComplete(toEpetra<GlobalOrdinal,Node>(domainMap), toEpetra<GlobalOrdinal,Node>(rangeMap));
451 bool doOptimizeStorage =
true;
452 if (params != null && params->get(
"Optimize Storage",
true) ==
false) doOptimizeStorage =
false;
453 if (doOptimizeStorage) graph_->OptimizeStorage();
460 graph_->FillComplete();
461 bool doOptimizeStorage =
true;
462 if (params != null && params->get(
"Optimize Storage",
true) ==
false) doOptimizeStorage =
false;
463 if (doOptimizeStorage) graph_->OptimizeStorage();
555 XPETRA_ERR_CHECK(graph_->ExtractGlobalRowView(GlobalRow, numEntries, eIndices));
556 if (numEntries == 0) { eIndices = NULL; }
569 if (numEntries == 0) { eIndices = NULL; }
574 #ifdef HAVE_XPETRA_KOKKOS_REFACTOR
575 #ifdef HAVE_XPETRA_TPETRA
576 local_graph_type getLocalGraph ()
const {
578 "Epetra does not support Kokkos::StaticCrsGraph!");
583 #warning "Xpetra Kokkos interface for CrsGraph is enabled (HAVE_XPETRA_KOKKOS_REFACTOR) but Tpetra is disabled. The Kokkos interface needs Tpetra to be enabled, too."
606 out <<
"EpetraCrsGraphT::describe : Warning, verbosity level is ignored by this method." << std::endl;
608 if (rowmap.
Comm().
MyPID() == 0) out <<
"** EpetraCrsGraphT **\n\nrowmap" << std::endl;
630 int err = graph_->Import(*v, *tImporter.getEpetra_Import(),
toEpetra(CM));
643 int err = graph_->Export(*v, *tImporter.getEpetra_Import(),
toEpetra(CM));
656 int err = graph_->Import(*v, *tExporter.getEpetra_Export(),
toEpetra(CM));
670 int err = graph_->Export(*v, *tExporter.getEpetra_Export(),
toEpetra(CM));
695 #endif // specialization on Node=EpetraNode and GO=int
698 #ifndef XPETRA_EPETRA_NO_64BIT_GLOBAL_INDICES
701 :
public virtual CrsGraph<int, long long, EpetraNode>
710 #ifdef HAVE_XPETRA_KOKKOS_REFACTOR
711 #ifdef HAVE_XPETRA_TPETRA
714 typedef typename node_type::execution_space execution_space;
742 #ifdef HAVE_XPETRA_KOKKOS_REFACTOR
743 #ifdef HAVE_XPETRA_TPETRA
747 const typename local_graph_type::row_map_type& ,
748 const typename local_graph_type::entries_type::non_const_type& ,
751 "Epetra does not support CrsGraph constructors using Kokkos Views!");
755 EpetraCrsGraphT(
const RCP<
const Map< LocalOrdinal, GlobalOrdinal, Node > > &,
756 const RCP<
const Map< LocalOrdinal, GlobalOrdinal, Node > > &,
757 const local_graph_type& ,
758 const RCP< Teuchos::ParameterList > &=Teuchos::null) {
760 "Epetra does not support CrsGraph constructors using a local graph!");
765 const RCP<
const Map< LocalOrdinal, GlobalOrdinal, Node > > &,
766 const RCP<
const Map< LocalOrdinal, GlobalOrdinal, Node > > &,
769 const RCP< Teuchos::ParameterList > &=Teuchos::null) {
771 "Epetra does not support CrsGraph constructors using a local graph!");
796 int* indices_rawPtr =
const_cast<int*
>(indices.
getRawPtr());
812 graph_->FillComplete(toEpetra<GlobalOrdinal,Node>(domainMap), toEpetra<GlobalOrdinal,Node>(rangeMap));
813 bool doOptimizeStorage =
true;
814 if (params != null && params->get(
"Optimize Storage",
true) ==
false) doOptimizeStorage =
false;
815 if (doOptimizeStorage) graph_->OptimizeStorage();
822 graph_->FillComplete();
823 bool doOptimizeStorage =
true;
824 if (params != null && params->get(
"Optimize Storage",
true) ==
false) doOptimizeStorage =
false;
825 if (doOptimizeStorage) graph_->OptimizeStorage();
917 XPETRA_ERR_CHECK(graph_->ExtractGlobalRowView(GlobalRow, numEntries, eIndices));
918 if (numEntries == 0) { eIndices = NULL; }
931 if (numEntries == 0) { eIndices = NULL; }
936 #ifdef HAVE_XPETRA_KOKKOS_REFACTOR
937 #ifdef HAVE_XPETRA_TPETRA
938 local_graph_type getLocalGraph ()
const {
940 "Epetra does not support Kokkos::StaticCrsGraph!");
945 #warning "Xpetra Kokkos interface for CrsGraph is enabled (HAVE_XPETRA_KOKKOS_REFACTOR) but Tpetra is disabled. The Kokkos interface needs Tpetra to be enabled, too."
966 out <<
"EpetraCrsGraphT::describe : Warning, verbosity level is ignored by this method." << std::endl;
968 if (rowmap.
Comm().
MyPID() == 0) out <<
"** EpetraCrsGraphT **\n\nrowmap" << std::endl;
990 int err = graph_->Import(*v, *tImporter.getEpetra_Import(),
toEpetra(CM));
1003 int err = graph_->Export(*v, *tImporter.getEpetra_Import(),
toEpetra(CM));
1016 int err = graph_->Import(*v, *tExporter.getEpetra_Export(),
toEpetra(CM));
1030 int err = graph_->Export(*v, *tExporter.getEpetra_Export(),
toEpetra(CM));
1054 #endif // specialization on Node=EpetraNode and GO=int
1058 #endif // XPETRA_EPETRACRSGRAPH_HPP
void getGlobalRowView(GlobalOrdinal GlobalRow, ArrayView< const GlobalOrdinal > &Indices) const
Return a const, nonpersisting view of global indices in the given row.
global_size_t getGlobalNumCols() const
Returns the number of global columns in the graph.
size_t getGlobalMaxNumRowEntries() const
Maximum number of entries in all rows over all processes.
size_t getNodeNumRows() const
Returns the number of graph rows owned on the calling node.
void doImport(const DistObject< GlobalOrdinal, LocalOrdinal, GlobalOrdinal, Node > &source, const Export< LocalOrdinal, GlobalOrdinal, Node > &exporter, CombineMode CM)
Import (using an Exporter).
size_t getNodeNumRows() const
Returns the number of graph rows owned on the calling node.
global_size_t getGlobalNumRows() const
Returns the number of global rows in the graph.
Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > getMap() const
Implements DistObject interface.
void fillComplete(const RCP< ParameterList > ¶ms=null)
Signal that data entry is complete.
size_t getNumAllocatedEntriesInGlobalRow(GlobalOrdinal globalRow) const
Returns the current number of allocated entries for this node in the specified global row ...
bool isGloballyIndexed() const
Whether column indices are stored using global indices on the calling process.
void doImport(const DistObject< GlobalOrdinal, LocalOrdinal, GlobalOrdinal, Node > &source, const Import< LocalOrdinal, GlobalOrdinal, Node > &importer, CombineMode CM)
Import.
size_t getNumEntriesInLocalRow(LocalOrdinal localRow) const
Returns the current number of entries on this node in the specified local row.
void getLocalRowView(LocalOrdinal LocalRow, ArrayView< const LocalOrdinal > &indices) const
Return a const, nonpersisting view of local indices in the given row.
EpetraCrsGraphT(const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &rowMap, const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &colMap, size_t maxNumEntriesPerRow, ProfileType pftype=DynamicProfile, const Teuchos::RCP< Teuchos::ParameterList > &=null)
Constructor specifying column Map and fixed number of entries for each row.
EpetraCrsGraphT(const Teuchos::RCP< Epetra_CrsGraph > &graph)
EpetraCrsGraphT constructor to wrap a Epetra_CrsGraph object.
RCP< const Epetra_CrsGraph > getEpetra_CrsGraph() const
Get the underlying Epetra graph.
size_t getNodeMaxNumRowEntries() const
Maximum number of entries in all rows owned by the calling process.
RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > getRangeMap() const
Returns the Map associated with the domain of this graph.
void doExport(const DistObject< GlobalOrdinal, LocalOrdinal, GlobalOrdinal, Node > &dest, const Export< LocalOrdinal, GlobalOrdinal, Node > &exporter, CombineMode CM)
Export (using an Importer).
RCP< Epetra_CrsGraph > graph_
void fillComplete(const RCP< ParameterList > ¶ms=null)
Signal that data entry is complete.
EpetraCrsGraphT(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 > &=null)
virtual ~EpetraCrsGraphT()
Destructor.
size_t getNodeNumEntries() const
Returns the local number of entries in the graph.
#define TEUCHOS_TEST_FOR_EXCEPTION(throw_exception_test, Exception, msg)
RCP< const Export< LocalOrdinal, GlobalOrdinal, Node > > getExporter() const
Returns the exporter associated with this graph.
void removeLocalIndices(LocalOrdinal localRow)
Remove all graph indices from the specified local row.
RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > getDomainMap() const
Returns the Map associated with the domain of this graph.
EpetraCrsGraphT(const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &rowMap, const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &colMap, size_t maxNumEntriesPerRow, ProfileType pftype=DynamicProfile, const Teuchos::RCP< Teuchos::ParameterList > &plist=null)
Constructor specifying column Map and fixed number of entries for each row.
bool isLocallyIndexed() const
Whether column indices are stored using local indices on the calling process.
void removeLocalIndices(LocalOrdinal localRow)
Remove all graph indices from the specified local row.
void computeGlobalConstants()
Force the computation of global constants if we don't have them.
size_t getGlobalMaxNumRowEntries() const
Maximum number of entries in all rows over all processes.
EpetraCrsGraphT(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 > ¶ms=null)
bool isFillComplete() const
Whether fillComplete() has been called and the graph is in compute mode.
RCP< const Import< LocalOrdinal, GlobalOrdinal, Node > > getImporter() const
Returns the importer associated with this graph.
bool hasColMap() const
Whether the graph has a column Map.
Exception throws to report errors in the internal logical of the program.
void doExport(const DistObject< GlobalOrdinal, LocalOrdinal, GlobalOrdinal, Node > &dest, const Import< LocalOrdinal, GlobalOrdinal, Node > &importer, CombineMode CM)
Export.
const Epetra_CrsGraph & toEpetra(const RCP< const CrsGraph< int, GlobalOrdinal, Node > > &graph)
RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > getRowMap() const
Returns the Map that describes the row distribution in this graph.
RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > getRangeMap() const
Returns the Map associated with the domain of this graph.
void doImport(const DistObject< GlobalOrdinal, LocalOrdinal, GlobalOrdinal, Node > &source, const Export< LocalOrdinal, GlobalOrdinal, Node > &exporter, CombineMode CM)
Import (using an Exporter).
void insertGlobalIndices(GlobalOrdinal globalRow, const ArrayView< const GlobalOrdinal > &indices)
Insert global indices into the graph.
RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > getColMap() const
Returns the Map that describes the column distribution in this graph.
void insertGlobalIndices(GlobalOrdinal globalRow, const ArrayView< const GlobalOrdinal > &indices)
Insert global indices into the 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.
size_t getNodeNumEntries() const
Returns the local number of entries in the graph.
RCP< const Comm< int > > getComm() const
Returns the communicator.
size_t getNumEntriesInLocalRow(LocalOrdinal localRow) const
Returns the current number of entries on this node in the specified local row.
void computeGlobalConstants()
Force the computation of global constants if we don't have them.
size_t getNumAllocatedEntriesInGlobalRow(GlobalOrdinal globalRow) const
Returns the current number of allocated entries for this node in the specified global row ...
Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > getMap() const
Implements DistObject interface.
void insertLocalIndices(const LocalOrdinal localRow, const ArrayView< const LocalOrdinal > &indices)
Insert local indices into the graph.
size_t getNumEntriesInGlobalRow(GlobalOrdinal globalRow) const
Returns the current number of entries on this node in the specified global row.
virtual int MyPID() const =0
RCP< const Import< LocalOrdinal, GlobalOrdinal, Node > > getImporter() const
Returns the importer associated with this graph.
size_t getNumAllocatedEntriesInGlobalRow(GlobalOrdinal globalRow) const
Returns the current number of allocated entries for this node in the specified global row ...
Map< LocalOrdinal, GlobalOrdinal, Node > map_type
The specialization of Map used by this class.
bool isLocallyIndexed() const
Whether column indices are stored using local indices on the calling process.
EpetraCrsGraphT(const Teuchos::RCP< Epetra_CrsGraph > &graph)
EpetraCrsGraphT constructor to wrap a Epetra_CrsGraph object.
global_size_t getGlobalNumRows() const
Returns the number of global rows in the graph.
bool isGloballyIndexed() const
Whether column indices are stored using global indices on the calling process.
global_size_t getGlobalNumEntries() const
Returns the global number of entries in the graph.
void insertLocalIndices(const LocalOrdinal localRow, const ArrayView< const LocalOrdinal > &indices)
Insert local indices into the graph.
RCP< const Comm< int > > getComm() const
Returns the communicator.
size_t getNumAllocatedEntriesInLocalRow(LocalOrdinal localRow) const
Returns the current number of allocated entries on this node in the specified local row...
void getGlobalRowView(GlobalOrdinal GlobalRow, ArrayView< const GlobalOrdinal > &Indices) const
Return a const, nonpersisting view of global indices in the given row.
global_size_t getGlobalNumCols() const
Returns the number of global columns in the graph.
TEUCHOS_DEPRECATED RCP< T > rcp(T *p, Dealloc_T dealloc, bool owns_mem)
void insertLocalIndices(const LocalOrdinal localRow, const ArrayView< const LocalOrdinal > &indices)
Insert local indices into the graph.
#define XPETRA_ERR_CHECK(arg)
global_size_t getGlobalNumEntries() const
Returns the global number of entries in the graph.
size_t getNodeNumCols() const
Returns the number of columns connected to the locally owned rows of this graph.
bool hasColMap() const
Whether the graph has a column Map.
RCP< const Epetra_CrsGraph > getEpetra_CrsGraph() const
Get the underlying Epetra graph.
void getLocalRowView(LocalOrdinal LocalRow, ArrayView< const LocalOrdinal > &indices) const
Return a const, nonpersisting view of local indices in the given row.
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.
size_t getGlobalMaxNumRowEntries() const
Maximum number of entries in all rows over all processes.
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.
size_t getNumEntriesInGlobalRow(GlobalOrdinal globalRow) const
Returns the current number of entries on this node in the specified global row.
RCP< const Export< LocalOrdinal, GlobalOrdinal, Node > > getExporter() const
Returns the exporter associated with this graph.
void fillComplete(const RCP< ParameterList > ¶ms=null)
Signal that data entry is complete.
global_size_t getGlobalNumEntries() const
Returns the global number of entries in the graph.
bool isLocallyIndexed() const
Whether column indices are stored using local indices on the calling process.
const Epetra_BlockMap & RowMap() const
bool isStorageOptimized() const
Returns true if storage has been optimized.
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.
RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > getColMap() const
Returns the Map that describes the column distribution in this graph.
RCP< const Comm< int > > getComm() const
Returns the communicator.
Exception throws when you call an unimplemented method of Xpetra.
bool isGloballyIndexed() const
Whether column indices are stored using global indices on the calling process.
#define XPETRA_DYNAMIC_CAST(type, obj, newObj, exceptionMsg)
RCP< Epetra_CrsGraph > graph_
const Epetra_Comm & Comm() const
EpetraCrsGraphT(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 > &=null)
size_t global_size_t
Global size_t object.
std::string description() const
Return a simple one-line description of this object.
Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > getMap() const
Implements DistObject interface.
void doExport(const DistObject< GlobalOrdinal, LocalOrdinal, GlobalOrdinal, Node > &dest, const Import< LocalOrdinal, GlobalOrdinal, Node > &importer, CombineMode CM)
Export.
GlobalOrdinal getIndexBase() const
Returns the index base for global indices for this graph.
static const EVerbosityLevel verbLevel_default
void removeLocalIndices(LocalOrdinal localRow)
Remove all graph indices from the specified local row.
void getLocalRowView(LocalOrdinal LocalRow, ArrayView< const LocalOrdinal > &indices) const
Return a const, nonpersisting view of local indices in the given row.
virtual ~EpetraCrsGraphT()
Destructor.
RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > getDomainMap() const
Returns the Map associated with the domain of this graph.
GlobalOrdinal getIndexBase() const
Returns the index base for global indices for this graph.
size_t getNodeMaxNumRowEntries() const
Maximum number of entries in all rows owned by the calling process.
RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > getRowMap() const
Returns the Map that describes the row distribution in this graph.
global_size_t getGlobalNumRows() const
Returns the number of global rows in the graph.
RCP< const CrsGraph< int, GlobalOrdinal, Node > > toXpetra(const Epetra_CrsGraph &g)
RCP< const Export< LocalOrdinal, GlobalOrdinal, Node > > getExporter() const
Returns the exporter associated with this graph.
std::string description() const
Return a simple one-line description of this object.
#define TEUCHOS_UNREACHABLE_RETURN(dummyReturnVal)
bool isFillComplete() const
Whether fillComplete() has been called and the graph is in compute mode.
size_t getNodeMaxNumRowEntries() const
Maximum number of entries in all rows owned by the calling process.
size_t getNumEntriesInLocalRow(LocalOrdinal localRow) const
Returns the current number of entries on this node in the specified local row.
EpetraCrsGraphT(const RCP< const map_type > &rowMap, size_t maxNumEntriesPerRow, ProfileType pftype=DynamicProfile, const RCP< Teuchos::ParameterList > &plist=Teuchos::null)
Constructor specifying fixed number of entries for each row.
GlobalOrdinal getIndexBase() const
Returns the index base for global indices for this graph.
RCP< const Epetra_CrsGraph > getEpetra_CrsGraph() const
Get the underlying Epetra graph.
virtual ~EpetraCrsGraphT()
Destructor.
size_t getNumAllocatedEntriesInLocalRow(LocalOrdinal localRow) const
Returns the current number of allocated entries on this node in the specified local row...
RCP< const Import< LocalOrdinal, GlobalOrdinal, Node > > getImporter() const
Returns the importer associated with this graph.
size_t getNodeNumCols() const
Returns the number of columns connected to the locally owned rows of this graph.
Map< LocalOrdinal, GlobalOrdinal, Node > map_type
The specialization of Map used by this class.
global_size_t getGlobalNumCols() const
Returns the number of global columns in the graph.
EpetraCrsGraphT(const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &rowMap, const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &colMap, size_t maxNumEntriesPerRow, ProfileType pftype=DynamicProfile, const Teuchos::RCP< Teuchos::ParameterList > &=null)
Constructor specifying column Map and fixed number of entries for each row.
bool hasColMap() const
Whether the graph has a column Map.
Map< LocalOrdinal, GlobalOrdinal, Node > map_type
The specialization of Map used by this class.
CombineMode
Xpetra::Combine Mode enumerable type.
void doExport(const DistObject< GlobalOrdinal, LocalOrdinal, GlobalOrdinal, Node > &dest, const Export< LocalOrdinal, GlobalOrdinal, Node > &exporter, CombineMode CM)
Export (using an Importer).
#define XPETRA_MONITOR(funcName)
void computeGlobalConstants()
Force the computation of global constants if we don't have them.
RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > getDomainMap() const
Returns the Map associated with the domain of this graph.
void getGlobalRowView(GlobalOrdinal GlobalRow, ArrayView< const GlobalOrdinal > &Indices) const
Return a const, nonpersisting view of global indices in the given row.
void doExport(const DistObject< GlobalOrdinal, LocalOrdinal, GlobalOrdinal, Node > &dest, const Import< LocalOrdinal, GlobalOrdinal, Node > &importer, CombineMode CM)
Export.
size_t getNumEntriesInGlobalRow(GlobalOrdinal globalRow) const
Returns the current number of entries on this node in the specified global row.
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.
RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > getRowMap() const
Returns the Map that describes the row distribution in this graph.
RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > getRangeMap() const
Returns the Map associated with the domain of this graph.
bool isStorageOptimized() const
Returns true if storage has been optimized.
void describe(Teuchos::FancyOStream &out, const Teuchos::EVerbosityLevel=Teuchos::Describable::verbLevel_default) const
Print the object with some verbosity level to an FancyOStream object.
virtual void Print(std::ostream &os) const
void doImport(const DistObject< GlobalOrdinal, LocalOrdinal, GlobalOrdinal, Node > &source, const Import< LocalOrdinal, GlobalOrdinal, Node > &importer, CombineMode CM)
Import.
EpetraCrsGraphT(const Teuchos::RCP< Epetra_CrsGraph > &graph)
EpetraCrsGraphT constructor to wrap a Epetra_CrsGraph object.
void doImport(const DistObject< GlobalOrdinal, LocalOrdinal, GlobalOrdinal, Node > &source, const Import< LocalOrdinal, GlobalOrdinal, Node > &importer, CombineMode CM)
Import.
RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > getColMap() const
Returns the Map that describes the column distribution in this graph.
size_t getNumAllocatedEntriesInLocalRow(LocalOrdinal localRow) const
Returns the current number of allocated entries on this node in the specified local row...
bool isFillComplete() const
Whether fillComplete() has been called and the graph is in compute mode.
void doExport(const DistObject< GlobalOrdinal, LocalOrdinal, GlobalOrdinal, Node > &dest, const Export< LocalOrdinal, GlobalOrdinal, Node > &exporter, CombineMode CM)
Export (using an Importer).
void doImport(const DistObject< GlobalOrdinal, LocalOrdinal, GlobalOrdinal, Node > &source, const Export< LocalOrdinal, GlobalOrdinal, Node > &exporter, CombineMode CM)
Import (using an Exporter).
void insertGlobalIndices(GlobalOrdinal globalRow, const ArrayView< const GlobalOrdinal > &indices)
Insert global indices into the graph.
size_t getNodeNumEntries() const
Returns the local number of entries in the graph.
bool isStorageOptimized() const
Returns true if storage has been optimized.
void describe(Teuchos::FancyOStream &out, const Teuchos::EVerbosityLevel=Teuchos::Describable::verbLevel_default) const
Print the object with some verbosity level to an FancyOStream object.