46 #ifndef XPETRA_CRSMATRIXFACTORY_HPP 47 #define XPETRA_CRSMATRIXFACTORY_HPP 53 #ifdef HAVE_XPETRA_TPETRA 57 #ifdef HAVE_XPETRA_EPETRA 65 template <class Scalar = CrsMatrix<>::scalar_type,
81 size_t maxNumEntriesPerRow,
87 #ifdef HAVE_XPETRA_TPETRA 103 #ifdef HAVE_XPETRA_TPETRA 116 size_t maxNumEntriesPerRow,
122 #ifdef HAVE_XPETRA_TPETRA 132 static RCP<CrsMatrix<Scalar, 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,
ProfileType pftype=
DynamicProfile,
const Teuchos::RCP< Teuchos::ParameterList > &plist=Teuchos::null) {
135 #ifdef HAVE_XPETRA_TPETRA 148 #ifdef HAVE_XPETRA_TPETRA 149 if (graph->getRowMap()->lib() ==
UseTpetra)
158 static RCP<CrsMatrix<Scalar, LocalOrdinal, GlobalOrdinal, Node> >
Build(
const Teuchos::RCP<
const CrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node > > &sourceMatrix,
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 Teuchos::RCP<Teuchos::ParameterList>& params = Teuchos::null) {
161 #ifdef HAVE_XPETRA_TPETRA 162 if (sourceMatrix->getRowMap()->lib() ==
UseTpetra)
170 static RCP<CrsMatrix<Scalar, LocalOrdinal, GlobalOrdinal, Node> >
Build(
const Teuchos::RCP<
const CrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node > > &sourceMatrix,
const Export<LocalOrdinal,GlobalOrdinal,Node> &exporter,
const RCP<
Map<LocalOrdinal,GlobalOrdinal,Scalar> > & domainMap = Teuchos::null,
const RCP<
Map<LocalOrdinal,GlobalOrdinal,Scalar> > & rangeMap = Teuchos::null,
const Teuchos::RCP<Teuchos::ParameterList>& params = Teuchos::null) {
173 #ifdef HAVE_XPETRA_TPETRA 174 if (sourceMatrix->getRowMap()->lib() ==
UseTpetra)
182 #ifdef HAVE_XPETRA_KOKKOS_REFACTOR 190 #ifdef HAVE_XPETRA_TPETRA 218 #ifdef HAVE_XPETRA_TPETRA 223 #ifdef HAVE_XPETRA_EPETRA 224 #ifndef XPETRA_EPETRA_NO_32BIT_GLOBAL_INDICES 236 #ifdef HAVE_XPETRA_TPETRA 241 #ifdef HAVE_XPETRA_EPETRA 242 #ifndef XPETRA_EPETRA_NO_32BIT_GLOBAL_INDICES 252 static RCP<CrsMatrix<Scalar, 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,
ProfileType pftype=
DynamicProfile,
const Teuchos::RCP< Teuchos::ParameterList > &plist=Teuchos::null) {
255 #ifdef HAVE_XPETRA_TPETRA 260 #ifdef HAVE_XPETRA_EPETRA 261 #ifndef XPETRA_EPETRA_NO_32BIT_GLOBAL_INDICES 271 static RCP<CrsMatrix<Scalar, 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,
ProfileType pftype=
DynamicProfile,
const Teuchos::RCP< Teuchos::ParameterList > &plist=Teuchos::null) {
274 #ifdef HAVE_XPETRA_TPETRA 279 #ifdef HAVE_XPETRA_EPETRA 280 #ifndef XPETRA_EPETRA_NO_32BIT_GLOBAL_INDICES 293 #ifdef HAVE_XPETRA_TPETRA 294 if (graph->getRowMap()->lib() ==
UseTpetra)
298 #ifdef HAVE_XPETRA_EPETRA 299 #ifndef XPETRA_EPETRA_NO_32BIT_GLOBAL_INDICES 300 if (graph->getRowMap()->lib() ==
UseEpetra)
310 static RCP<CrsMatrix<Scalar, LocalOrdinal, GlobalOrdinal, Node> >
Build(
const Teuchos::RCP<
const CrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node > > &sourceMatrix,
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 Teuchos::RCP<Teuchos::ParameterList>& params = Teuchos::null) {
313 #ifdef HAVE_XPETRA_TPETRA 314 if (sourceMatrix->getRowMap()->lib() ==
UseTpetra)
319 #ifdef HAVE_XPETRA_EPETRA 320 #ifndef XPETRA_EPETRA_NO_32BIT_GLOBAL_INDICES 321 if (sourceMatrix->getRowMap()->lib() ==
UseEpetra)
330 static RCP<CrsMatrix<Scalar, LocalOrdinal, GlobalOrdinal, Node> >
Build(
const Teuchos::RCP<
const CrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node > > &sourceMatrix,
const Export<LocalOrdinal,GlobalOrdinal,Node> &exporter,
const RCP<
const Map<LocalOrdinal,GlobalOrdinal,Node> > & domainMap = Teuchos::null,
const RCP<
const Map<LocalOrdinal,GlobalOrdinal,Node> > & rangeMap = Teuchos::null,
const Teuchos::RCP<Teuchos::ParameterList>& params = Teuchos::null) {
333 #ifdef HAVE_XPETRA_TPETRA 334 if (sourceMatrix->getRowMap()->lib() ==
UseTpetra)
339 #ifdef HAVE_XPETRA_EPETRA 340 #ifndef XPETRA_EPETRA_NO_32BIT_GLOBAL_INDICES 341 if (sourceMatrix->getRowMap()->lib() ==
UseEpetra)
349 #ifdef HAVE_XPETRA_KOKKOS_REFACTOR 357 #ifdef HAVE_XPETRA_TPETRA 362 #ifdef HAVE_XPETRA_EPETRA 363 #ifndef XPETRA_EPETRA_NO_32BIT_GLOBAL_INDICES 374 #ifdef HAVE_XPETRA_INT_LONG_LONG 391 #ifdef HAVE_XPETRA_TPETRA 396 #ifdef HAVE_XPETRA_EPETRA 397 #ifndef XPETRA_EPETRA_NO_64BIT_GLOBAL_INDICES 409 #ifdef HAVE_XPETRA_TPETRA 414 #ifdef HAVE_XPETRA_EPETRA 415 #ifndef XPETRA_EPETRA_NO_64BIT_GLOBAL_INDICES 425 static RCP<CrsMatrix<Scalar, 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,
ProfileType pftype=
DynamicProfile,
const Teuchos::RCP< Teuchos::ParameterList > &plist=Teuchos::null) {
428 #ifdef HAVE_XPETRA_TPETRA 433 #ifdef HAVE_XPETRA_EPETRA 434 #ifndef XPETRA_EPETRA_NO_64BIT_GLOBAL_INDICES 444 static RCP<CrsMatrix<Scalar, 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,
ProfileType pftype=
DynamicProfile,
const Teuchos::RCP< Teuchos::ParameterList > &plist=Teuchos::null) {
447 #ifdef HAVE_XPETRA_TPETRA 452 #ifdef HAVE_XPETRA_EPETRA 453 #ifndef XPETRA_EPETRA_NO_64BIT_GLOBAL_INDICES 466 #ifdef HAVE_XPETRA_TPETRA 467 if (graph->getRowMap()->lib() ==
UseTpetra)
471 #ifdef HAVE_XPETRA_EPETRA 472 #ifndef XPETRA_EPETRA_NO_64BIT_GLOBAL_INDICES 473 if (graph->getRowMap()->lib() ==
UseEpetra)
483 static RCP<CrsMatrix<Scalar, LocalOrdinal, GlobalOrdinal, Node> >
Build(
const Teuchos::RCP<
const CrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node > > &sourceMatrix,
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 Teuchos::RCP<Teuchos::ParameterList>& params = Teuchos::null) {
486 #ifdef HAVE_XPETRA_TPETRA 487 if (sourceMatrix->getRowMap()->lib() ==
UseTpetra)
492 #ifdef HAVE_XPETRA_EPETRA 493 #ifndef XPETRA_EPETRA_NO_64BIT_GLOBAL_INDICES 494 if (sourceMatrix->getRowMap()->lib() ==
UseEpetra)
503 static RCP<CrsMatrix<Scalar, LocalOrdinal, GlobalOrdinal, Node> >
Build(
const Teuchos::RCP<
const CrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node > > &sourceMatrix,
const Export<LocalOrdinal,GlobalOrdinal,Node> &exporter,
const RCP<
const Map<LocalOrdinal,GlobalOrdinal,Node> > & domainMap = Teuchos::null,
const RCP<
const Map<LocalOrdinal,GlobalOrdinal,Node> > & rangeMap = Teuchos::null,
const Teuchos::RCP<Teuchos::ParameterList>& params = Teuchos::null) {
506 #ifdef HAVE_XPETRA_TPETRA 507 if (sourceMatrix->getRowMap()->lib() ==
UseTpetra)
512 #ifdef HAVE_XPETRA_EPETRA 513 #ifndef XPETRA_EPETRA_NO_64BIT_GLOBAL_INDICES 514 if (sourceMatrix->getRowMap()->lib() ==
UseEpetra)
522 #ifdef HAVE_XPETRA_KOKKOS_REFACTOR 530 #ifdef HAVE_XPETRA_TPETRA 535 #ifdef HAVE_XPETRA_EPETRA 536 #ifndef XPETRA_EPETRA_NO_32BIT_GLOBAL_INDICES 546 #endif // HAVE_XPETRA_INT_LONG_LONG 550 #define XPETRA_CRSMATRIXFACTORY_SHORT
static RCP< CrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node > > Build(const Teuchos::RCP< const CrsGraph< LocalOrdinal, GlobalOrdinal, Node > > &graph, const Teuchos::RCP< Teuchos::ParameterList > &plist=Teuchos::null)
Constructor specifying a previously constructed graph.
static RCP< CrsMatrix< Scalar, 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, ProfileType pftype=DynamicProfile, const Teuchos::RCP< Teuchos::ParameterList > &plist=Teuchos::null)
Constructor specifying column Map and number of entries in each row.
GlobalOrdinal global_ordinal_type
static RCP< CrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node > > Build(const Teuchos::RCP< const CrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node > > &sourceMatrix, 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 Teuchos::RCP< Teuchos::ParameterList > ¶ms=Teuchos::null)
CrsMatrixFactory()
Private constructor. This is a static class.
static RCP< CrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node > > Build(const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &rowMap, size_t maxNumEntriesPerRow, Xpetra::ProfileType pftype=Xpetra::DynamicProfile, const Teuchos::RCP< Teuchos::ParameterList > &plist=Teuchos::null)
Constructor specifying fixed number of entries for each row.
static RCP< CrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node > > Build(const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &rowMap, const ArrayRCP< const size_t > &NumEntriesPerRowToAlloc, ProfileType pftype=Xpetra::DynamicProfile, const Teuchos::RCP< Teuchos::ParameterList > &plist=Teuchos::null)
LocalOrdinal local_ordinal_type
#define XPETRA_FACTORY_ERROR_IF_EPETRA(lib)
static RCP< CrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node > > Build(const Teuchos::RCP< const CrsGraph< LocalOrdinal, GlobalOrdinal, Node > > &graph, const Teuchos::RCP< Teuchos::ParameterList > &plist=Teuchos::null)
Constructor specifying a previously constructed graph.
CrsMatrixFactory()
Private constructor. This is a static class.
TEUCHOS_DEPRECATED RCP< T > rcp(T *p, Dealloc_T dealloc, bool owns_mem)
static RCP< CrsMatrix< Scalar, 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, ProfileType pftype=DynamicProfile, const Teuchos::RCP< Teuchos::ParameterList > &plist=Teuchos::null)
Constructor specifying column Map and fixed number of entries for each row.
static RCP< CrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node > > Build(const Teuchos::RCP< const CrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node > > &sourceMatrix, const Export< LocalOrdinal, GlobalOrdinal, Node > &exporter, const RCP< Map< LocalOrdinal, GlobalOrdinal, Scalar > > &domainMap=Teuchos::null, const RCP< Map< LocalOrdinal, GlobalOrdinal, Scalar > > &rangeMap=Teuchos::null, const Teuchos::RCP< Teuchos::ParameterList > ¶ms=Teuchos::null)
static RCP< CrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node > > Build(const Teuchos::RCP< const CrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node > > &sourceMatrix, 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 Teuchos::RCP< Teuchos::ParameterList > ¶ms=Teuchos::null)
Constructor using FusedImport.
#define XPETRA_FACTORY_END
CrsMatrix< double, int, GlobalOrdinal >::node_type Node
static RCP< CrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node > > Build(const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &rowMap, size_t maxNumEntriesPerRow, Xpetra::ProfileType pftype=Xpetra::DynamicProfile, const Teuchos::RCP< Teuchos::ParameterList > &plist=Teuchos::null)
static RCP< CrsMatrix< Scalar, 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, ProfileType pftype=DynamicProfile, const Teuchos::RCP< Teuchos::ParameterList > &plist=Teuchos::null)
Constructor specifying column Map and number of entries in each row.
#define XPETRA_MONITOR(funcName)
static RCP< CrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node > > Build(const Teuchos::RCP< const CrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node > > &sourceMatrix, const Export< LocalOrdinal, GlobalOrdinal, Node > &exporter, const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &domainMap=Teuchos::null, const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &rangeMap=Teuchos::null, const Teuchos::RCP< Teuchos::ParameterList > ¶ms=Teuchos::null)
Constructor using FusedExport.
static RCP< CrsMatrix< Scalar, 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, ProfileType pftype=DynamicProfile, const Teuchos::RCP< Teuchos::ParameterList > &plist=Teuchos::null)
Constructor specifying column Map and fixed number of entries for each row.
static RCP< CrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node > > Build(const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &rowMap, const ArrayRCP< const size_t > &NumEntriesPerRowToAlloc, ProfileType pftype=Xpetra::DynamicProfile, const Teuchos::RCP< Teuchos::ParameterList > &plist=Teuchos::null)
Constructor specifying (possibly different) number of entries in each row.