46 #ifndef XPETRA_CRSGRAPHFACTORY_HPP
47 #define XPETRA_CRSGRAPHFACTORY_HPP
53 #ifdef HAVE_XPETRA_TPETRA
54 #include "Xpetra_TpetraCrsGraph.hpp"
57 #ifdef HAVE_XPETRA_EPETRA
65 template <
class LocalOrdinal,
79 "Can't create Xpetra::EpetraCrsMatrix with these scalar/LO/GO types");
80 #ifdef HAVE_XPETRA_TPETRA
93 #ifdef HAVE_XPETRA_TPETRA
107 size_t maxNumEntriesPerRow,
111 #ifdef HAVE_XPETRA_TPETRA
130 #ifdef HAVE_XPETRA_TPETRA
148 #ifdef HAVE_XPETRA_TPETRA
149 if (sourceGraph->getRowMap()->lib() ==
UseTpetra)
160 #ifdef HAVE_XPETRA_KOKKOS_REFACTOR
161 #ifdef HAVE_XPETRA_TPETRA
219 const Teuchos::RCP<
const Map<LocalOrdinal, GlobalOrdinal, Node> >& colMap,
225 return rcp(
new TpetraCrsGraph<LocalOrdinal, GlobalOrdinal, Node>(rowMap,
259 const Teuchos::RCP<
const Map<LocalOrdinal, GlobalOrdinal, Node> >& rowMap,
260 const Teuchos::RCP<
const Map<LocalOrdinal, GlobalOrdinal, Node> >& colMap,
261 const Teuchos::RCP<
const Map<LocalOrdinal, GlobalOrdinal, Node> >& domainMap = Teuchos::null,
262 const Teuchos::RCP<
const Map<LocalOrdinal, GlobalOrdinal, Node> >& rangeMap = Teuchos::null,
267 return rcp(
new TpetraCrsGraph<LocalOrdinal, GlobalOrdinal, Node>(lclGraph,
319 #if (defined(HAVE_XPETRA_EPETRA) && !defined(XPETRA_EPETRA_NO_32BIT_GLOBAL_INDICES))
338 #ifdef HAVE_XPETRA_TPETRA
342 #ifdef HAVE_XPETRA_EPETRA
353 #ifdef HAVE_XPETRA_TPETRA
369 #ifdef HAVE_XPETRA_TPETRA
385 size_t maxNumEntriesPerRow,
389 #ifdef HAVE_XPETRA_TPETRA
408 #ifdef HAVE_XPETRA_TPETRA
409 if (sourceGraph->getRowMap()->lib() ==
UseTpetra)
412 if (sourceGraph->getRowMap()->lib() ==
UseEpetra)
419 #ifdef HAVE_XPETRA_KOKKOS_REFACTOR
420 #ifdef HAVE_XPETRA_TPETRA
478 const Teuchos::RCP<
const Map<LocalOrdinal, GlobalOrdinal, Node> >& colMap,
484 return rcp(
new TpetraCrsGraph<LocalOrdinal, GlobalOrdinal, Node>(rowMap,
518 const Teuchos::RCP<
const Map<LocalOrdinal, GlobalOrdinal, Node> >& rowMap,
519 const Teuchos::RCP<
const Map<LocalOrdinal, GlobalOrdinal, Node> >& colMap,
520 const Teuchos::RCP<
const Map<LocalOrdinal, GlobalOrdinal, Node> >& domainMap = Teuchos::null,
521 const Teuchos::RCP<
const Map<LocalOrdinal, GlobalOrdinal, Node> >& rangeMap = Teuchos::null,
526 return rcp(
new TpetraCrsGraph<LocalOrdinal, GlobalOrdinal, Node>(lclGraph,
579 #if (defined(HAVE_XPETRA_EPETRA) && !defined(XPETRA_EPETRA_NO_64BIT_GLOBAL_INDICES))
598 #ifdef HAVE_XPETRA_TPETRA
602 #ifdef HAVE_XPETRA_EPETRA
613 #ifdef HAVE_XPETRA_TPETRA
629 #ifdef HAVE_XPETRA_TPETRA
645 size_t maxNumEntriesPerRow,
649 #ifdef HAVE_XPETRA_TPETRA
667 #ifdef HAVE_XPETRA_TPETRA
668 if (sourceGraph->getRowMap()->lib() ==
UseTpetra)
671 if (sourceGraph->getRowMap()->lib() ==
UseTpetra)
679 #ifdef HAVE_XPETRA_KOKKOS_REFACTOR
680 #ifdef HAVE_XPETRA_TPETRA
738 const Teuchos::RCP<
const Map<LocalOrdinal, GlobalOrdinal, Node> >& colMap,
744 return rcp(
new TpetraCrsGraph<LocalOrdinal, GlobalOrdinal, Node>(rowMap,
778 const Teuchos::RCP<
const Map<LocalOrdinal, GlobalOrdinal, Node> >& rowMap,
779 const Teuchos::RCP<
const Map<LocalOrdinal, GlobalOrdinal, Node> >& colMap,
780 const Teuchos::RCP<
const Map<LocalOrdinal, GlobalOrdinal, Node> >& domainMap = Teuchos::null,
781 const Teuchos::RCP<
const Map<LocalOrdinal, GlobalOrdinal, Node> >& rangeMap = Teuchos::null,
786 return rcp(
new TpetraCrsGraph<LocalOrdinal, GlobalOrdinal, Node>(lclGraph,
839 #define XPETRA_CRSGRAPHFACTORY_SHORT
#define XPETRA_MONITOR(funcName)
#define XPETRA_FACTORY_ERROR_IF_EPETRA(lib)
#define XPETRA_FACTORY_END
static Teuchos::RCP< CrsGraph< LocalOrdinal, GlobalOrdinal, Node > > Build(const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &rowMap, const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &colMap, const Teuchos::ArrayRCP< size_t > &rowPointers, const Teuchos::ArrayRCP< LocalOrdinal > &columnIndices, const Teuchos::RCP< Teuchos::ParameterList > &plist=Teuchos::null)
Constructor specifying column Map and arrays containing the graph in sorted, local ids.
static Teuchos::RCP< CrsGraph< LocalOrdinal, GlobalOrdinal, Node > > Build(const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &rowMap, const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &colMap, size_t maxNumEntriesPerRow, const Teuchos::RCP< Teuchos::ParameterList > &plist=Teuchos::null)
Constructor specifying column Map and number of entries per row.
CrsGraphFactory()
Private constructor. This is a static class.
static RCP< CrsGraph< LocalOrdinal, GlobalOrdinal, Node > > Build(const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &map, size_t maxNumEntriesPerRow)
static RCP< CrsGraph< LocalOrdinal, GlobalOrdinal, Node > > Build(const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &rowMap)
Constructor for empty graph (intended use is an import/export target - can't insert entries directly)
static Teuchos::RCP< CrsGraph< LocalOrdinal, GlobalOrdinal, Node > > Build(const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &rowMap, const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &colMap, const ArrayRCP< const size_t > &NumEntriesPerRowToAlloc, const Teuchos::RCP< Teuchos::ParameterList > &plist=Teuchos::null)
static Teuchos::RCP< CrsGraph< LocalOrdinal, GlobalOrdinal, Node > > Build(const RCP< const CrsGraph< LocalOrdinal, GlobalOrdinal, Node > > &sourceGraph, const Import< LocalOrdinal, GlobalOrdinal, Node > &importer, const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node >> &domainMap=Teuchos::null, const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &rangeMap=Teuchos::null, const RCP< Teuchos::ParameterList > ¶ms=Teuchos::null)
Constructor using fused import.
static RCP< CrsGraph< LocalOrdinal, GlobalOrdinal, Node > > Build(const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &rowMap)
Constructor for empty graph (intended use is an import/export target - can't insert entries directly)
static Teuchos::RCP< CrsGraph< LocalOrdinal, GlobalOrdinal, Node > > Build(const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &rowMap, const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &colMap, size_t maxNumEntriesPerRow, const Teuchos::RCP< Teuchos::ParameterList > &plist=Teuchos::null)
Constructor specifying column Map and number of entries per row.
static Teuchos::RCP< CrsGraph< LocalOrdinal, GlobalOrdinal, Node > > Build(const RCP< const CrsGraph< LocalOrdinal, GlobalOrdinal, Node > > &sourceGraph, const Import< LocalOrdinal, GlobalOrdinal, Node > &importer, const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node >> &domainMap=Teuchos::null, const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &rangeMap=Teuchos::null, const RCP< Teuchos::ParameterList > ¶ms=Teuchos::null)
Constructor using fused import.
static Teuchos::RCP< CrsGraph< LocalOrdinal, GlobalOrdinal, Node > > Build(const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &rowMap, const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &colMap, const Teuchos::ArrayRCP< size_t > &rowPointers, const Teuchos::ArrayRCP< LocalOrdinal > &columnIndices, const Teuchos::RCP< Teuchos::ParameterList > &plist=Teuchos::null)
Constructor specifying column Map and arrays containing the graph in sorted, local ids.
static Teuchos::RCP< CrsGraph< LocalOrdinal, GlobalOrdinal, Node > > Build(const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &rowMap, const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &colMap, const ArrayRCP< const size_t > &NumEntriesPerRowToAlloc, const Teuchos::RCP< Teuchos::ParameterList > &plist=Teuchos::null)
static RCP< CrsGraph< LocalOrdinal, GlobalOrdinal, Node > > Build(const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &map, size_t maxNumEntriesPerRow)
CrsGraphFactory()
Private constructor. This is a static class.
CrsGraphFactory()
Private constructor. This is a static class.
static Teuchos::RCP< CrsGraph< LocalOrdinal, GlobalOrdinal, Node > > Build(const RCP< const CrsGraph< LocalOrdinal, GlobalOrdinal, Node > > &sourceGraph, const Import< LocalOrdinal, GlobalOrdinal, Node > &importer, const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node >> &domainMap=Teuchos::null, const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &rangeMap=Teuchos::null, const RCP< Teuchos::ParameterList > ¶ms=Teuchos::null)
Constructor using fused import.
static Teuchos::RCP< CrsGraph< LocalOrdinal, GlobalOrdinal, Node > > Build(const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &map, size_t maxNumEntriesPerRow)
Constructor specifying the number of non-zeros for all rows.
static Teuchos::RCP< CrsGraph< LocalOrdinal, GlobalOrdinal, Node > > Build(const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &rowMap)
Constructor for empty graph (intended use is an import/export target - can't insert entries directly)
static Teuchos::RCP< CrsGraph< LocalOrdinal, GlobalOrdinal, Node > > Build(const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &rowMap, const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &colMap, size_t maxNumEntriesPerRow, const Teuchos::RCP< Teuchos::ParameterList > &plist=Teuchos::null)
Constructor specifying column Map and number of entries per row.
static Teuchos::RCP< CrsGraph< LocalOrdinal, GlobalOrdinal, Node > > Build(const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &rowMap, const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &colMap, const Teuchos::ArrayRCP< size_t > &rowPointers, const Teuchos::ArrayRCP< LocalOrdinal > &columnIndices, const Teuchos::RCP< Teuchos::ParameterList > &plist=Teuchos::null)
Constructor specifying column Map and arrays containing the graph in sorted, local ids.
static Teuchos::RCP< CrsGraph< LocalOrdinal, GlobalOrdinal, Node > > Build(const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &rowMap, const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &colMap, const ArrayRCP< const size_t > &NumEntriesPerRowToAlloc, const Teuchos::RCP< Teuchos::ParameterList > &plist=Teuchos::null)
Constructor specifying column Map and number of entries in each row.
#define TEUCHOS_TEST_FOR_EXCEPTION(throw_exception_test, Exception, msg)
#define TEUCHOS_UNREACHABLE_RETURN(dummyReturnVal)
TEUCHOS_DEPRECATED RCP< T > rcp(T *p, Dealloc_T dealloc, bool owns_mem)