58 return *(epetraGraph->getEpetra_CrsGraph());
78 int* indices_rawPtr =
const_cast<int*
>(indices.
getRawPtr());
85 int* indices_rawPtr =
const_cast<int*
>(indices.
getRawPtr());
96 if (numEntries == 0) { eIndices = NULL; }
108 if (numEntries == 0) { eIndices = NULL; }
117 bool doOptimizeStorage =
true;
118 if (params != null && params->
get(
"Optimize Storage",
true) ==
false) doOptimizeStorage =
false;
119 if (doOptimizeStorage)
graph_->OptimizeStorage();
126 bool doOptimizeStorage =
true;
127 if (params != null && params->
get(
"Optimize Storage",
true) ==
false) doOptimizeStorage =
false;
128 if (doOptimizeStorage)
graph_->OptimizeStorage();
136 out <<
"EpetraCrsGraph::describe : Warning, verbosity level is ignored by this method." << std::endl;
137 const Epetra_BlockMap rowmap =
graph_->RowMap();
138 if (rowmap.Comm().MyPID() == 0) out <<
"** EpetraCrsGraph **\n\nrowmap" << std::endl;
154 const Import<int, int> &importer,
CombineMode CM) {
158 XPETRA_DYNAMIC_CAST(
const EpetraImport, importer, tImporter,
"Xpetra::EpetraCrsGraph::doImport only accept Xpetra::EpetraImport as input arguments.");
160 RCP<const Epetra_CrsGraph> v = tSource.getEpetra_CrsGraph();
161 int err =
graph_->Import(*v, *tImporter.getEpetra_Import(),
toEpetra(CM));
166 const Import<int, int>& importer,
CombineMode CM) {
170 XPETRA_DYNAMIC_CAST(
const EpetraImport, importer, tImporter,
"Xpetra::EpetraCrsGraph::doImport only accept Xpetra::EpetraImport as input arguments.");
172 RCP<const Epetra_CrsGraph> v = tDest.getEpetra_CrsGraph();
173 int err =
graph_->Export(*v, *tImporter.getEpetra_Import(),
toEpetra(CM));
178 const Export<int, int>& exporter,
CombineMode CM) {
182 XPETRA_DYNAMIC_CAST(
const EpetraExport, exporter, tExporter,
"Xpetra::EpetraCrsGraph::doImport only accept Xpetra::EpetraImport as input arguments.");
184 RCP<const Epetra_CrsGraph> v = tSource.getEpetra_CrsGraph();
185 int err =
graph_->Import(*v, *tExporter.getEpetra_Export(),
toEpetra(CM));
191 const Export<int, int>& exporter,
CombineMode CM) {
195 XPETRA_DYNAMIC_CAST(
const EpetraExport, exporter, tExporter,
"Xpetra::EpetraCrsGraph::doImport only accept Xpetra::EpetraImport as input arguments.");
197 RCP<const Epetra_CrsGraph> v = tDest.getEpetra_CrsGraph();
198 int err =
graph_->Export(*v, *tExporter.getEpetra_Export(),
toEpetra(CM));
void insertGlobalIndices(GlobalOrdinal globalRow, const ArrayView< const GlobalOrdinal > &indices)
Insert graph indices, using global IDs.
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.
T & get(const std::string &name, T def_value)
#define TEUCHOS_TEST_FOR_EXCEPTION(throw_exception_test, Exception, msg)
void insertLocalIndices(LocalOrdinal localRow, const ArrayView< const LocalOrdinal > &indices)
Insert graph indices, using local IDs.
std::string description() const
Return a simple one-line description of this object.
void doImport(const DistObject< GlobalOrdinal, LocalOrdinal, GlobalOrdinal, Node > &source, const Import< LocalOrdinal, GlobalOrdinal, Node > &importer, CombineMode CM)
Import.
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.
const Epetra_CrsGraph & toEpetra(const RCP< const CrsGraph< int, int > > &graph)
RCP< Epetra_CrsGraph > graph_
TEUCHOS_DEPRECATED RCP< T > rcp(T *p, Dealloc_T dealloc, bool owns_mem)
#define XPETRA_ERR_CHECK(arg)
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.
#define XPETRA_DYNAMIC_CAST(type, obj, newObj, exceptionMsg)
EpetraCrsGraph(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.
#define XPETRA_RCP_DYNAMIC_CAST(type, obj, newObj, exceptionMsg)
void doExport(const DistObject< GlobalOrdinal, LocalOrdinal, GlobalOrdinal, Node > &dest, const Import< LocalOrdinal, GlobalOrdinal, Node > &importer, CombineMode CM)
Export.
CombineMode
Xpetra::Combine Mode enumerable type.
#define XPETRA_MONITOR(funcName)
RCP< const CrsGraph< LocalOrdinal, GlobalOrdinal, Node, LocalMatOps > > toXpetra(RCP< const Tpetra::CrsGraph< LocalOrdinal, GlobalOrdinal, Node, LocalMatOps > >)
Convert an Epetra_Comm.to a Teuchos_Comm.
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.