56 template<
class GlobalOrdinal,
class Node>
59 return *(epetraGraph->getEpetra_CrsGraph());
63 template<
class EpetraGlobalOrdinal,
class Node>
65 : graph_(
Teuchos::rcp(
new Epetra_CrsGraph(
Copy, toEpetra<EpetraGlobalOrdinal,Node>(rowMap), maxNumEntriesPerRow,
toEpetra(pftype)))) { }
72 template<
class EpetraGlobalOrdinal,
class Node>
74 : graph_(
Teuchos::rcp(
new Epetra_CrsGraph(
Copy, toEpetra<EpetraGlobalOrdinal,Node>(rowMap), toEpetra<EpetraGlobalOrdinal,Node>(colMap), maxNumEntriesPerRow,
toEpetra(pftype)))) { }
81 template<
class EpetraGlobalOrdinal,
class Node>
85 GlobalOrdinal* indices_rawPtr =
const_cast<GlobalOrdinal*
>(indices.
getRawPtr());
91 template<
class EpetraGlobalOrdinal,
class Node>
95 int* indices_rawPtr =
const_cast<int*
>(indices.
getRawPtr());
100 template<
class EpetraGlobalOrdinal,
class Node>
105 GlobalOrdinal * eIndices;
107 XPETRA_ERR_CHECK(graph_->ExtractGlobalRowView(GlobalRow, numEntries, eIndices));
108 if (numEntries == 0) { eIndices = NULL; }
114 template<
class EpetraGlobalOrdinal,
class Node>
122 if (numEntries == 0) { eIndices = NULL; }
128 template<
class EpetraGlobalOrdinal,
class Node>
132 graph_->FillComplete(toEpetra<EpetraGlobalOrdinal,Node>(domainMap), toEpetra<EpetraGlobalOrdinal,Node>(rangeMap));
133 bool doOptimizeStorage =
true;
134 if (params != null && params->
get(
"Optimize Storage",
true) ==
false) doOptimizeStorage =
false;
135 if (doOptimizeStorage) graph_->OptimizeStorage();
139 template<
class EpetraGlobalOrdinal,
class Node>
143 graph_->FillComplete();
144 bool doOptimizeStorage =
true;
145 if (params != null && params->
get(
"Optimize Storage",
true) ==
false) doOptimizeStorage =
false;
146 if (doOptimizeStorage) graph_->OptimizeStorage();
150 template<
class EpetraGlobalOrdinal,
class Node>
153 template<
class EpetraGlobalOrdinal,
class Node>
157 out <<
"EpetraCrsGraphT::describe : Warning, verbosity level is ignored by this method." << std::endl;
158 const Epetra_BlockMap rowmap = graph_->RowMap();
159 if (rowmap.Comm().MyPID() == 0) out <<
"** EpetraCrsGraphT **\n\nrowmap" << std::endl;
166 template<
class GlobalOrdinal,
class Node>
172 Teuchos::rcp_const_cast<Epetra_CrsGraph> (const_graph);
178 template<
class EpetraGlobalOrdinal,
class Node>
187 int err = graph_->Import(*v, *tImporter.getEpetra_Import(),
toEpetra(CM));
192 template<
class EpetraGlobalOrdinal,
class Node>
201 int err = graph_->Export(*v, *tImporter.getEpetra_Import(),
toEpetra(CM));
206 template<
class EpetraGlobalOrdinal,
class Node>
215 int err = graph_->Import(*v, *tExporter.getEpetra_Export(),
toEpetra(CM));
221 template<
class EpetraGlobalOrdinal,
class Node>
230 int err = graph_->Export(*v, *tExporter.getEpetra_Export(),
toEpetra(CM));
235 #ifndef XPETRA_EPETRA_NO_32BIT_GLOBAL_INDICES 237 #ifdef HAVE_XPETRA_TPETRA 238 #ifdef HAVE_XPETRA_SERIAL 243 #ifdef HAVE_XPETRA_PTHREAD 248 #ifdef HAVE_XPETRA_OPENMP 253 #ifdef HAVE_XPETRA_CUDA 254 typedef Kokkos::Compat::KokkosCudaWrapperNode default_node_type;
265 #endif // HAVE_XPETRA_TPETRA 268 #ifndef XPETRA_EPETRA_NO_64BIT_GLOBAL_INDICES 269 #ifdef HAVE_XPETRA_TPETRA 270 #ifdef HAVE_XPETRA_SERIAL 275 #ifdef HAVE_XPETRA_PTHREAD 280 #ifdef HAVE_XPETRA_OPENMP 285 #ifdef HAVE_XPETRA_CUDA 286 typedef Kokkos::Compat::KokkosCudaWrapperNode default_node_type;
297 #endif // HAVE_XPETRA_TPETRA
T & get(const std::string &name, T def_value)
#define TEUCHOS_TEST_FOR_EXCEPTION(throw_exception_test, Exception, msg)
const Epetra_CrsGraph & toEpetra(const RCP< const CrsGraph< int, GlobalOrdinal, Node > > &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.
void insertLocalIndices(const LocalOrdinal localRow, const ArrayView< const LocalOrdinal > &indices)
Insert local indices into the graph.
TEUCHOS_DEPRECATED RCP< T > rcp(T *p, Dealloc_T dealloc, bool owns_mem)
#define XPETRA_ERR_CHECK(arg)
void getLocalRowView(LocalOrdinal LocalRow, ArrayView< const LocalOrdinal > &indices) const
Return a const, nonpersisting view of local indices in the given row.
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.
#define XPETRA_DYNAMIC_CAST(type, obj, newObj, exceptionMsg)
void doExport(const DistObject< GlobalOrdinal, LocalOrdinal, GlobalOrdinal, Node > &dest, const Import< LocalOrdinal, GlobalOrdinal, Node > &importer, CombineMode CM)
Export.
#define XPETRA_RCP_DYNAMIC_CAST(type, obj, newObj, exceptionMsg)
RCP< const CrsGraph< int, GlobalOrdinal, Node > > toXpetra(const Epetra_CrsGraph &g)
std::string description() const
Return a simple one-line description of this object.
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.
CombineMode
Xpetra::Combine Mode enumerable type.
#define XPETRA_MONITOR(funcName)
void getGlobalRowView(GlobalOrdinal GlobalRow, ArrayView< const GlobalOrdinal > &Indices) const
Return a const, nonpersisting view of global indices in the given row.
void doImport(const DistObject< GlobalOrdinal, LocalOrdinal, GlobalOrdinal, Node > &source, const Import< LocalOrdinal, GlobalOrdinal, Node > &importer, CombineMode CM)
Import.