All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Xpetra_EpetraCrsGraph.cpp
Go to the documentation of this file.
1 // @HEADER
2 //
3 // ***********************************************************************
4 //
5 // Xpetra: A linear algebra interface package
6 // Copyright 2012 Sandia Corporation
7 //
8 // Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
9 // the U.S. Government retains certain rights in this software.
10 //
11 // Redistribution and use in source and binary forms, with or without
12 // modification, are permitted provided that the following conditions are
13 // met:
14 //
15 // 1. Redistributions of source code must retain the above copyright
16 // notice, this list of conditions and the following disclaimer.
17 //
18 // 2. Redistributions in binary form must reproduce the above copyright
19 // notice, this list of conditions and the following disclaimer in the
20 // documentation and/or other materials provided with the distribution.
21 //
22 // 3. Neither the name of the Corporation nor the names of the
23 // contributors may be used to endorse or promote products derived from
24 // this software without specific prior written permission.
25 //
26 // THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
27 // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
28 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
29 // PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
30 // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
31 // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
32 // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
33 // PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
34 // LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
35 // NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
36 // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
37 //
38 // Questions? Contact
39 // Jonathan Hu (jhu@sandia.gov)
40 // Andrey Prokopenko (aprokop@sandia.gov)
41 // Ray Tuminaro (rstumin@sandia.gov)
42 //
43 // ***********************************************************************
44 //
45 // @HEADER
47 
48 #include "Xpetra_Exceptions.hpp"
49 #include "Xpetra_Utils.hpp"
50 #include "Xpetra_EpetraExport.hpp"
51 #include "Xpetra_EpetraImport.hpp"
52 
53 namespace Xpetra {
54 
55  // TODO: move that elsewhere
56  template<class GlobalOrdinal, class Node>
59  return *(epetraGraph->getEpetra_CrsGraph());
60  }
61 
62 #if 0
63  template<class EpetraGlobalOrdinal, class Node>
64  EpetraCrsGraphT<EpetraGlobalOrdinal, Node>::EpetraCrsGraphT(const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &rowMap, size_t maxNumEntriesPerRow, ProfileType pftype, const Teuchos::RCP< Teuchos::ParameterList > &plist)
65  : graph_(Teuchos::rcp(new Epetra_CrsGraph(Copy, toEpetra<EpetraGlobalOrdinal,Node>(rowMap), maxNumEntriesPerRow, toEpetra(pftype)))) { }
66 #endif
67  // TODO: convert array size_t to int
68  // template<class EpetraGlobalOrdinal>
69  // EpetraCrsGraphT<EpetraGlobalOrdinal>::EpetraCrsGraphT(const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &rowMap, const ArrayRCP< const size_t > &NumEntriesPerRowToAlloc, ProfileType pftype)
70  // : graph_(Teuchos::rcp(new Epetra_CrsGraph(Copy, toEpetra(rowMap), NumEntriesPerRowToAlloc.getRawPtr(), toEpetra(pftype)))) { }
71 #if 0
72  template<class EpetraGlobalOrdinal, class Node>
73  EpetraCrsGraphT<EpetraGlobalOrdinal, Node>::EpetraCrsGraphT(const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &rowMap, const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &colMap, size_t maxNumEntriesPerRow, ProfileType pftype, const Teuchos::RCP< Teuchos::ParameterList > &plist)
74  : graph_(Teuchos::rcp(new Epetra_CrsGraph(Copy, toEpetra<EpetraGlobalOrdinal,Node>(rowMap), toEpetra<EpetraGlobalOrdinal,Node>(colMap), maxNumEntriesPerRow, toEpetra(pftype)))) { }
75 #endif
76  // TODO: convert array size_t to int
77  // template<class EpetraGlobalOrdinal>
78  // EpetraCrsGraphT<EpetraGlobalOrdinal>::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)
79  // : graph_(Teuchos::rcp(new Epetra_CrsGraph(Copy, toEpetra<EpetraGlobalOrdinal,Node>(rowMap), toEpetra<EpetraGlobalOrdinal,Node>(colMap), NumEntriesPerRowToAlloc.getRawPtr(), toEpetra(pftype)))) { }
80 #if 0
81  template<class EpetraGlobalOrdinal, class Node>
82  void EpetraCrsGraphT<EpetraGlobalOrdinal, Node>::insertGlobalIndices(GlobalOrdinal globalRow, const ArrayView<const GlobalOrdinal> &indices) {
83  XPETRA_MONITOR("EpetraCrsGraphT::insertGlobalIndices");
84 
85  GlobalOrdinal* indices_rawPtr = const_cast<GlobalOrdinal*>(indices.getRawPtr()); // there is no const in the Epetra interface :(
86  XPETRA_ERR_CHECK(graph_->InsertGlobalIndices(globalRow, indices.size(), indices_rawPtr));
87  }
88 #endif
89 
90 #if 0
91  template<class EpetraGlobalOrdinal, class Node>
92  void EpetraCrsGraphT<EpetraGlobalOrdinal, Node>::insertLocalIndices(int localRow, const ArrayView<const int> &indices) {
93  XPETRA_MONITOR("EpetraCrsGraphT::insertLocalIndices");
94 
95  int* indices_rawPtr = const_cast<int*>(indices.getRawPtr()); // there is no const in the Epetra interface :(
96  XPETRA_ERR_CHECK(graph_->InsertMyIndices(localRow, indices.size(), indices_rawPtr));
97  }
98 #endif
99 #if 0
100  template<class EpetraGlobalOrdinal, class Node>
101  void EpetraCrsGraphT<EpetraGlobalOrdinal, Node>::getGlobalRowView(GlobalOrdinal GlobalRow, ArrayView<const GlobalOrdinal> &Indices) const {
102  XPETRA_MONITOR("EpetraCrsGraphT::getGlobalRowView");
103 
104  int numEntries;
105  GlobalOrdinal * eIndices;
106 
107  XPETRA_ERR_CHECK(graph_->ExtractGlobalRowView(GlobalRow, numEntries, eIndices));
108  if (numEntries == 0) { eIndices = NULL; } // Cf. TEUCHOS_TEST_FOR_EXCEPT( p == 0 && size_in != 0 ) in Teuchos ArrayView constructor.
109 
110  Indices = ArrayView<const GlobalOrdinal>(eIndices, numEntries);
111  }
112 #endif
113 #if 0
114  template<class EpetraGlobalOrdinal, class Node>
115  void EpetraCrsGraphT<EpetraGlobalOrdinal, Node>::getLocalRowView(int LocalRow, ArrayView<const int> &indices) const {
116  XPETRA_MONITOR("EpetraCrsGraphT::getLocalRowView");
117 
118  int numEntries;
119  int * eIndices;
120 
121  XPETRA_ERR_CHECK(graph_->ExtractMyRowView(LocalRow, numEntries, eIndices));
122  if (numEntries == 0) { eIndices = NULL; } // Cf. TEUCHOS_TEST_FOR_EXCEPT( p == 0 && size_in != 0 ) in Teuchos ArrayView constructor.
123 
124  indices = ArrayView<const int>(eIndices, numEntries);
125  }
126 #endif
127 #if 0
128  template<class EpetraGlobalOrdinal, class Node>
129  void EpetraCrsGraphT<EpetraGlobalOrdinal, Node>::fillComplete(const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &domainMap, const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &rangeMap, const RCP< ParameterList > &params){
130  XPETRA_MONITOR("EpetraCrsGraphT::fillComplete");
131 
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();
136  }
137 #endif
138 #if 0
139  template<class EpetraGlobalOrdinal, class Node>
140  void EpetraCrsGraphT<EpetraGlobalOrdinal, Node>::fillComplete(const RCP< ParameterList > &params) {
141  XPETRA_MONITOR("EpetraCrsGraphT::fillComplete");
142 
143  graph_->FillComplete();
144  bool doOptimizeStorage = true;
145  if (params != null && params->get("Optimize Storage",true) == false) doOptimizeStorage = false;
146  if (doOptimizeStorage) graph_->OptimizeStorage();
147  }
148 #endif
149 #if 0
150  template<class EpetraGlobalOrdinal, class Node>
151  std::string EpetraCrsGraphT<EpetraGlobalOrdinal, Node>::description() const { XPETRA_MONITOR("EpetraCrsGraphT::description"); return "NotImplemented"; }
152 
153  template<class EpetraGlobalOrdinal, class Node>
154  void EpetraCrsGraphT<EpetraGlobalOrdinal, Node>::describe(Teuchos::FancyOStream &out, const Teuchos::EVerbosityLevel verbLevel) const {
155  XPETRA_MONITOR("EpetraCrsGraphT::describe");
156 
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;
160  rowmap.Print(out);
161  graph_->Print(out);
162  }
163 #endif
164 
165  // TODO: move that elsewhere
166  template<class GlobalOrdinal, class Node>
167  RCP<const CrsGraph<int, GlobalOrdinal, Node> >
169  {
170  RCP<const Epetra_CrsGraph> const_graph = rcp (new Epetra_CrsGraph (g));
171  RCP<Epetra_CrsGraph> graph =
172  Teuchos::rcp_const_cast<Epetra_CrsGraph> (const_graph);
174  }
175  //
176 #if 0
177  // TODO: use toEpetra()
178  template<class EpetraGlobalOrdinal, class Node>
179  void EpetraCrsGraphT<EpetraGlobalOrdinal, Node>::doImport(const DistObject<GlobalOrdinal, LocalOrdinal, GlobalOrdinal, Node> &source,
180  const Import<LocalOrdinal, GlobalOrdinal, Node> &importer, CombineMode CM) {
181  XPETRA_MONITOR("EpetraCrsGraphT::doImport");
182 
183  XPETRA_DYNAMIC_CAST(const EpetraCrsGraphT<GlobalOrdinal XPETRA_COMMA Node>, source, tSource, "Xpetra::EpetraCrsGraphT::doImport only accept Xpetra::EpetraCrsGraphT as input arguments.");
184  XPETRA_DYNAMIC_CAST(const EpetraImportT<GlobalOrdinal XPETRA_COMMA Node>, importer, tImporter, "Xpetra::EpetraCrsGraphT::doImport only accept Xpetra::EpetraImportT as input arguments.");
185 
186  RCP<const Epetra_CrsGraph> v = tSource.getEpetra_CrsGraph();
187  int err = graph_->Import(*v, *tImporter.getEpetra_Import(), toEpetra(CM));
188  TEUCHOS_TEST_FOR_EXCEPTION(err != 0, std::runtime_error, "Catch error code returned by Epetra.");
189  }
190 #endif
191 #if 0
192  template<class EpetraGlobalOrdinal,class Node>
193  void EpetraCrsGraphT<EpetraGlobalOrdinal,Node>::doExport(const DistObject<GlobalOrdinal, LocalOrdinal, GlobalOrdinal, Node> &dest,
194  const Import<LocalOrdinal, GlobalOrdinal, Node>& importer, CombineMode CM) {
195  XPETRA_MONITOR("EpetraCrsGraphT::doExport");
196 
197  XPETRA_DYNAMIC_CAST(const EpetraCrsGraphT<GlobalOrdinal XPETRA_COMMA Node>, dest, tDest, "Xpetra::EpetraCrsGraphT::doImport only accept Xpetra::EpetraCrsGraphT as input arguments.");
198  XPETRA_DYNAMIC_CAST(const EpetraImportT<GlobalOrdinal XPETRA_COMMA Node>, importer, tImporter, "Xpetra::EpetraCrsGraphT::doImport only accept Xpetra::EpetraImportT as input arguments.");
199 
200  RCP<const Epetra_CrsGraph> v = tDest.getEpetra_CrsGraph();
201  int err = graph_->Export(*v, *tImporter.getEpetra_Import(), toEpetra(CM));
202  TEUCHOS_TEST_FOR_EXCEPTION(err != 0, std::runtime_error, "Catch error code returned by Epetra.");
203  }
204 #endif
205 #if 0
206  template<class EpetraGlobalOrdinal, class Node>
207  void EpetraCrsGraphT<EpetraGlobalOrdinal,Node>::doImport(const DistObject<GlobalOrdinal, LocalOrdinal, GlobalOrdinal, Node> &source,
208  const Export<LocalOrdinal, GlobalOrdinal, Node>& exporter, CombineMode CM) {
209  XPETRA_MONITOR("EpetraCrsGraphT::doImport");
210 
211  XPETRA_DYNAMIC_CAST(const EpetraCrsGraphT<GlobalOrdinal XPETRA_COMMA Node>, source, tSource, "Xpetra::EpetraCrsGraphT::doImport only accept Xpetra::EpetraCrsGraphT as input arguments.");
212  XPETRA_DYNAMIC_CAST(const EpetraExportT<GlobalOrdinal XPETRA_COMMA Node>, exporter, tExporter, "Xpetra::EpetraCrsGraphT::doImport only accept Xpetra::EpetraImportT as input arguments.");
213 
214  RCP<const Epetra_CrsGraph> v = tSource.getEpetra_CrsGraph();
215  int err = graph_->Import(*v, *tExporter.getEpetra_Export(), toEpetra(CM));
216  TEUCHOS_TEST_FOR_EXCEPTION(err != 0, std::runtime_error, "Catch error code returned by Epetra.");
217 
218  }
219 #endif
220 #if 0
221  template<class EpetraGlobalOrdinal,class Node>
222  void EpetraCrsGraphT<EpetraGlobalOrdinal,Node>::doExport(const DistObject<GlobalOrdinal, LocalOrdinal, GlobalOrdinal, Node> &dest,
223  const Export<LocalOrdinal, GlobalOrdinal, Node>& exporter, CombineMode CM) {
224  XPETRA_MONITOR("EpetraCrsGraphT::doExport");
225 
226  XPETRA_DYNAMIC_CAST(const EpetraCrsGraphT<GlobalOrdinal XPETRA_COMMA Node>, dest, tDest, "Xpetra::EpetraCrsGraphT::doImport only accept Xpetra::EpetraCrsGraphT as input arguments.");
227  XPETRA_DYNAMIC_CAST(const EpetraExportT<GlobalOrdinal XPETRA_COMMA Node>, exporter, tExporter, "Xpetra::EpetraCrsGraphT::doImport only accept Xpetra::EpetraImportT as input arguments.");
228 
229  RCP<const Epetra_CrsGraph> v = tDest.getEpetra_CrsGraph();
230  int err = graph_->Export(*v, *tExporter.getEpetra_Export(), toEpetra(CM));
231  TEUCHOS_TEST_FOR_EXCEPTION(err != 0, std::runtime_error, "Catch error code returned by Epetra.");
232  }
233 #endif
234 
235 #ifndef XPETRA_EPETRA_NO_32BIT_GLOBAL_INDICES
236 #ifdef HAVE_XPETRA_TPETRA
237 #include "TpetraCore_config.h"
238 #if ((defined(EPETRA_HAVE_OMP) && !defined(HAVE_TPETRA_INST_OPENMP)) || \
239  (!defined(EPETRA_HAVE_OMP) && !defined(HAVE_TPETRA_INST_SERIAL)))
240  template class EpetraCrsGraphT<int, Xpetra::EpetraNode >;
241  template RCP< const CrsGraph<int, int, Xpetra::EpetraNode > > toXpetra<int, Xpetra::EpetraNode>(const Epetra_CrsGraph &g);
242  template const Epetra_CrsGraph & toEpetra<int, Xpetra::EpetraNode >(const RCP< const CrsGraph<int, int, Xpetra::EpetraNode > > &graph);
243 #endif
244 #ifdef HAVE_TPETRA_INST_SERIAL
245 template class EpetraCrsGraphT<int, Kokkos::Compat::KokkosSerialWrapperNode >;
246 template RCP< const CrsGraph<int, int, Kokkos::Compat::KokkosSerialWrapperNode > > toXpetra<int, Kokkos::Compat::KokkosSerialWrapperNode>(const Epetra_CrsGraph &g);
247 template const Epetra_CrsGraph & toEpetra<int, Kokkos::Compat::KokkosSerialWrapperNode >(const RCP< const CrsGraph<int, int, Kokkos::Compat::KokkosSerialWrapperNode > > &graph);
248 #endif
249 #ifdef HAVE_TPETRA_INST_PTHREAD
250 template class EpetraCrsGraphT<int, Kokkos::Compat::KokkosThreadsWrapperNode>;
251 template RCP< const CrsGraph<int, int, Kokkos::Compat::KokkosThreadsWrapperNode > > toXpetra<int, Kokkos::Compat::KokkosThreadsWrapperNode>(const Epetra_CrsGraph &g);
252 template const Epetra_CrsGraph & toEpetra<int, Kokkos::Compat::KokkosThreadsWrapperNode >(const RCP< const CrsGraph<int, int, Kokkos::Compat::KokkosThreadsWrapperNode > > &graph);
253 #endif
254 #ifdef HAVE_TPETRA_INST_OPENMP
255 template class EpetraCrsGraphT<int, Kokkos::Compat::KokkosOpenMPWrapperNode >;
256 template RCP< const CrsGraph<int, int, Kokkos::Compat::KokkosOpenMPWrapperNode > > toXpetra<int, Kokkos::Compat::KokkosOpenMPWrapperNode>(const Epetra_CrsGraph &g);
257 template const Epetra_CrsGraph & toEpetra<int, Kokkos::Compat::KokkosOpenMPWrapperNode >(const RCP< const CrsGraph<int, int, Kokkos::Compat::KokkosOpenMPWrapperNode > > &graph);
258 #endif
259 #ifdef HAVE_TPETRA_INST_CUDA
260 typedef Kokkos::Compat::KokkosCudaWrapperNode default_node_type;
261 template class EpetraCrsGraphT<int, default_node_type >;
262 template RCP< const CrsGraph<int, int, default_node_type > > toXpetra<int, default_node_type>(const Epetra_CrsGraph &g);
263 template const Epetra_CrsGraph & toEpetra<int, default_node_type >(const RCP< const CrsGraph<int, int, default_node_type > > &graph);
264 #endif
265 #else
266 // Tpetra is disabled and Kokkos not available: use dummy node type
267 typedef Xpetra::EpetraNode default_node_type;
268 template class EpetraCrsGraphT<int, default_node_type >;
269 template RCP< const CrsGraph<int, int, default_node_type > > toXpetra<int, default_node_type>(const Epetra_CrsGraph &g);
270 template const Epetra_CrsGraph & toEpetra<int, default_node_type >(const RCP< const CrsGraph<int, int, default_node_type > > &graph);
271 #endif // HAVE_XPETRA_TPETRA
272 #endif
273 
274 #ifndef XPETRA_EPETRA_NO_64BIT_GLOBAL_INDICES
275 #ifdef HAVE_XPETRA_TPETRA
276 #include "TpetraCore_config.h"
277 #if ((defined(EPETRA_HAVE_OMP) && !defined(HAVE_TPETRA_INST_OPENMP)) || \
278  (!defined(EPETRA_HAVE_OMP) && !defined(HAVE_TPETRA_INST_SERIAL)))
279  template class EpetraCrsGraphT<long long, Xpetra::EpetraNode >;
280  template RCP< const CrsGraph<int, long long, Xpetra::EpetraNode > > toXpetra<long long, Xpetra::EpetraNode>(const Epetra_CrsGraph &g);
281  template const Epetra_CrsGraph & toEpetra<long long, Xpetra::EpetraNode >(const RCP< const CrsGraph<int, long long, Xpetra::EpetraNode > > &graph);
282 #endif
283 #ifdef HAVE_TPETRA_INST_SERIAL
284 template class EpetraCrsGraphT<long long, Kokkos::Compat::KokkosSerialWrapperNode >;
285 template RCP< const CrsGraph<int, long long, Kokkos::Compat::KokkosSerialWrapperNode > > toXpetra<long long, Kokkos::Compat::KokkosSerialWrapperNode>(const Epetra_CrsGraph &g);
286 template const Epetra_CrsGraph & toEpetra<long long, Kokkos::Compat::KokkosSerialWrapperNode >(const RCP< const CrsGraph<int, long long, Kokkos::Compat::KokkosSerialWrapperNode > > &graph);
287 #endif
288 #ifdef HAVE_TPETRA_INST_PTHREAD
289 template class EpetraCrsGraphT<long long, Kokkos::Compat::KokkosThreadsWrapperNode>;
290 template RCP< const CrsGraph<int, long long, Kokkos::Compat::KokkosThreadsWrapperNode > > toXpetra<long long, Kokkos::Compat::KokkosThreadsWrapperNode>(const Epetra_CrsGraph &g);
291 template const Epetra_CrsGraph & toEpetra<long long, Kokkos::Compat::KokkosThreadsWrapperNode >(const RCP< const CrsGraph<int, long long, Kokkos::Compat::KokkosThreadsWrapperNode > > &graph);
292 #endif
293 #ifdef HAVE_TPETRA_INST_OPENMP
294 template class EpetraCrsGraphT<long long, Kokkos::Compat::KokkosOpenMPWrapperNode >;
295 template RCP< const CrsGraph<int, long long, Kokkos::Compat::KokkosOpenMPWrapperNode > > toXpetra<long long, Kokkos::Compat::KokkosOpenMPWrapperNode>(const Epetra_CrsGraph &g);
296 template const Epetra_CrsGraph & toEpetra<long long, Kokkos::Compat::KokkosOpenMPWrapperNode >(const RCP< const CrsGraph<int, long long, Kokkos::Compat::KokkosOpenMPWrapperNode > > &graph);
297 #endif
298 #ifdef HAVE_TPETRA_INST_CUDA
299 typedef Kokkos::Compat::KokkosCudaWrapperNode default_node_type;
300 template class EpetraCrsGraphT<long long, default_node_type >;
301 template RCP< const CrsGraph<int, long long, default_node_type > > toXpetra<long long, default_node_type>(const Epetra_CrsGraph &g);
302 template const Epetra_CrsGraph & toEpetra<long long, default_node_type >(const RCP< const CrsGraph<int, long long, default_node_type > > &graph);
303 #endif
304 #else
305 // Tpetra is disabled and Kokkos not available: use dummy node type
306 typedef Xpetra::EpetraNode default_node_type;
307 template class EpetraCrsGraphT<long long, default_node_type >;
308 template RCP< const CrsGraph<int, long long, default_node_type > > toXpetra<long long, default_node_type>(const Epetra_CrsGraph &g);
309 template const Epetra_CrsGraph & toEpetra<long long, default_node_type >(const RCP< const CrsGraph<int, long long, default_node_type > > &graph);
310 #endif // HAVE_XPETRA_TPETRA
311 #endif
312 
313 } // namespace Xpetra
#define TEUCHOS_TEST_FOR_EXCEPTION(throw_exception_test, Exception, msg)
const Epetra_CrsGraph & toEpetra(const RCP< const CrsGraph< int, GlobalOrdinal, Node > > &graph)
virtual int MyPID() const =0
TEUCHOS_DEPRECATED RCP< T > rcp(T *p, Dealloc_T dealloc, bool owns_mem)
#define XPETRA_ERR_CHECK(arg)
#define XPETRA_DYNAMIC_CAST(type, obj, newObj, exceptionMsg)
const Epetra_Comm & Comm() const
#define XPETRA_RCP_DYNAMIC_CAST(type, obj, newObj, exceptionMsg)
RCP< const CrsGraph< int, GlobalOrdinal, Node > > toXpetra(const Epetra_CrsGraph &g)
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)
virtual void Print(std::ostream &os) const