10 #ifndef XPETRA_CRSMATRIXFACTORY_HPP
11 #define XPETRA_CRSMATRIXFACTORY_HPP
17 #ifdef HAVE_XPETRA_TPETRA
18 #include "Xpetra_TpetraCrsMatrix.hpp"
19 #include "Xpetra_TpetraBlockCrsMatrix.hpp"
22 #ifdef HAVE_XPETRA_EPETRA
30 template <
class Scalar,
33 class Node = Tpetra::KokkosClassic::DefaultNode::DefaultNodeType>
41 static RCP<CrsMatrix<Scalar, LocalOrdinal, GlobalOrdinal, Node>>
43 TEUCHOS_TEST_FOR_EXCEPTION(rowMap->lib() ==
UseEpetra, std::logic_error,
44 "Can't create Xpetra::EpetraCrsMatrix with these scalar/LO/GO types");
45 #ifdef HAVE_XPETRA_TPETRA
54 static RCP<CrsMatrix<Scalar, LocalOrdinal, GlobalOrdinal, Node>>
56 size_t maxNumEntriesPerRow,
57 const Teuchos::RCP<Teuchos::ParameterList>& plist = Teuchos::null) {
60 #ifdef HAVE_XPETRA_TPETRA
70 static RCP<CrsMatrix<Scalar, LocalOrdinal, GlobalOrdinal, Node>>
72 const ArrayRCP<const size_t>& NumEntriesPerRowToAlloc,
73 const Teuchos::RCP<Teuchos::ParameterList>& plist = Teuchos::null) {
74 #ifdef HAVE_XPETRA_TPETRA
84 static RCP<CrsMatrix<Scalar, LocalOrdinal, GlobalOrdinal, Node>>
87 size_t maxNumEntriesPerRow,
88 const Teuchos::RCP<Teuchos::ParameterList>& plist = Teuchos::null) {
91 #ifdef HAVE_XPETRA_TPETRA
101 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,
const Teuchos::RCP<Teuchos::ParameterList>& plist = Teuchos::null) {
104 #ifdef HAVE_XPETRA_TPETRA
117 #ifdef HAVE_XPETRA_TPETRA
118 if (graph->getRowMap()->lib() ==
UseTpetra)
127 static RCP<CrsMatrix<Scalar, LocalOrdinal, GlobalOrdinal, Node>>
Build(
const Teuchos::RCP<
const CrsGraph<LocalOrdinal, GlobalOrdinal, Node>>& graph,
typename Xpetra::CrsMatrix<Scalar, LocalOrdinal, GlobalOrdinal, Node>::local_matrix_type::values_type& values,
const Teuchos::RCP<Teuchos::ParameterList>& plist = Teuchos::null) {
130 #ifdef HAVE_XPETRA_TPETRA
131 if (graph->getRowMap()->lib() ==
UseTpetra)
139 static RCP<CrsMatrix<Scalar, LocalOrdinal, GlobalOrdinal, Node>>
Build(
144 const Teuchos::RCP<Teuchos::ParameterList>& params = Teuchos::null) {
147 #ifdef HAVE_XPETRA_TPETRA
148 if (sourceMatrix->getRowMap()->lib() ==
UseTpetra)
156 static RCP<CrsMatrix<Scalar, LocalOrdinal, GlobalOrdinal, Node>>
Build(
161 const Teuchos::RCP<Teuchos::ParameterList>& params = Teuchos::null) {
164 #ifdef HAVE_XPETRA_TPETRA
165 if (sourceMatrix->getRowMap()->lib() ==
UseTpetra)
173 static RCP<CrsMatrix<Scalar, LocalOrdinal, GlobalOrdinal, Node>>
Build(
179 const Teuchos::RCP<Teuchos::ParameterList>& params) {
182 #ifdef HAVE_XPETRA_TPETRA
183 if (sourceMatrix->getRowMap()->lib() ==
UseTpetra)
191 static RCP<CrsMatrix<Scalar, LocalOrdinal, GlobalOrdinal, Node>>
Build(
197 const Teuchos::RCP<Teuchos::ParameterList>& params) {
200 #ifdef HAVE_XPETRA_TPETRA
201 if (sourceMatrix->getRowMap()->lib() ==
UseTpetra)
209 static RCP<CrsMatrix<Scalar, LocalOrdinal, GlobalOrdinal, Node>>
Build(
213 const Teuchos::RCP<Teuchos::ParameterList>& params = null) {
216 #ifdef HAVE_XPETRA_TPETRA
225 static RCP<CrsMatrix<Scalar, LocalOrdinal, GlobalOrdinal, Node>>
Build(
231 const Teuchos::RCP<Teuchos::ParameterList>& params = null) {
234 #ifdef HAVE_XPETRA_TPETRA
243 static RCP<CrsMatrix<Scalar, LocalOrdinal, GlobalOrdinal, Node>>
Build(
251 const Teuchos::RCP<Teuchos::ParameterList>& params = null) {
254 #ifdef HAVE_XPETRA_TPETRA
256 return rcp(
new TpetraCrsMatrix<Scalar, LocalOrdinal, GlobalOrdinal, Node>(lclMatrix, rowMap, colMap, domainMap, rangeMap, importer, exporter, params));
259 TEUCHOS_TEST_FOR_EXCEPTION(rowMap->lib() ==
UseEpetra, std::logic_error,
"Epetra doesn't support this matrix constructor");
265 static RCP<CrsMatrix<Scalar, LocalOrdinal, GlobalOrdinal, Node>>
BuildBlock(
269 LocalOrdinal blockSize) {
272 #ifdef HAVE_XPETRA_TPETRA
277 TEUCHOS_TEST_FOR_EXCEPTION(domainMap->lib() ==
UseEpetra, std::logic_error,
"Epetra doesn't support this matrix constructor");
284 #if (defined(HAVE_XPETRA_EPETRA) && !defined(XPETRA_EPETRA_NO_32BIT_GLOBAL_INDICES))
301 static RCP<CrsMatrix<Scalar, LocalOrdinal, GlobalOrdinal, Node>>
304 #ifdef HAVE_XPETRA_TPETRA
314 static RCP<CrsMatrix<Scalar, LocalOrdinal, GlobalOrdinal, Node>>
Build(
const RCP<
const Map<LocalOrdinal, GlobalOrdinal, Node>>& rowMap,
size_t maxNumEntriesPerRow,
const Teuchos::RCP<Teuchos::ParameterList>& plist = Teuchos::null) {
317 #ifdef HAVE_XPETRA_TPETRA
328 static RCP<CrsMatrix<Scalar, LocalOrdinal, GlobalOrdinal, Node>>
Build(
const Teuchos::RCP<
const Map<LocalOrdinal, GlobalOrdinal, Node>>& rowMap,
const ArrayRCP<const size_t>& NumEntriesPerRowToAlloc,
const Teuchos::RCP<Teuchos::ParameterList>& plist = Teuchos::null) {
331 #ifdef HAVE_XPETRA_TPETRA
343 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,
const Teuchos::RCP<Teuchos::ParameterList>& plist = Teuchos::null) {
346 #ifdef HAVE_XPETRA_TPETRA
358 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,
const Teuchos::RCP<Teuchos::ParameterList>& plist = Teuchos::null) {
361 #ifdef HAVE_XPETRA_TPETRA
376 #ifdef HAVE_XPETRA_TPETRA
377 if (graph->getRowMap()->lib() ==
UseTpetra)
381 if (graph->getRowMap()->lib() ==
UseEpetra)
388 static RCP<CrsMatrix<Scalar, LocalOrdinal, GlobalOrdinal, Node>>
Build(
const Teuchos::RCP<
const CrsGraph<LocalOrdinal, GlobalOrdinal, Node>>& graph,
typename Xpetra::CrsMatrix<Scalar, LocalOrdinal, GlobalOrdinal, Node>::local_matrix_type::values_type& values,
const Teuchos::RCP<Teuchos::ParameterList>& plist = Teuchos::null) {
391 #ifdef HAVE_XPETRA_TPETRA
392 if (graph->getRowMap()->lib() ==
UseTpetra)
401 static RCP<CrsMatrix<Scalar, LocalOrdinal, GlobalOrdinal, Node>>
Build(
406 const Teuchos::RCP<Teuchos::ParameterList>& params = Teuchos::null) {
409 #ifdef HAVE_XPETRA_TPETRA
410 if (sourceMatrix->getRowMap()->lib() ==
UseTpetra)
414 if (sourceMatrix->getRowMap()->lib() ==
UseEpetra)
421 static RCP<CrsMatrix<Scalar, LocalOrdinal, GlobalOrdinal, Node>>
Build(
426 const Teuchos::RCP<Teuchos::ParameterList>& params = Teuchos::null) {
429 #ifdef HAVE_XPETRA_TPETRA
430 if (sourceMatrix->getRowMap()->lib() ==
UseTpetra)
434 if (sourceMatrix->getRowMap()->lib() ==
UseEpetra)
441 static RCP<CrsMatrix<Scalar, LocalOrdinal, GlobalOrdinal, Node>>
Build(
447 const Teuchos::RCP<Teuchos::ParameterList>& params) {
450 #ifdef HAVE_XPETRA_TPETRA
451 if (sourceMatrix->getRowMap()->lib() ==
UseTpetra)
455 if (sourceMatrix->getRowMap()->lib() ==
UseEpetra)
462 static RCP<CrsMatrix<Scalar, LocalOrdinal, GlobalOrdinal, Node>>
Build(
468 const Teuchos::RCP<Teuchos::ParameterList>& params) {
471 #ifdef HAVE_XPETRA_TPETRA
472 if (sourceMatrix->getRowMap()->lib() ==
UseTpetra)
476 if (sourceMatrix->getRowMap()->lib() ==
UseEpetra)
482 static RCP<CrsMatrix<Scalar, LocalOrdinal, GlobalOrdinal, Node>>
Build(
486 const Teuchos::RCP<Teuchos::ParameterList>& params = null) {
489 #ifdef HAVE_XPETRA_TPETRA
500 static RCP<CrsMatrix<Scalar, LocalOrdinal, GlobalOrdinal, Node>>
Build(
506 const Teuchos::RCP<Teuchos::ParameterList>& params = null) {
509 #ifdef HAVE_XPETRA_TPETRA
520 static RCP<CrsMatrix<Scalar, LocalOrdinal, GlobalOrdinal, Node>>
Build(
528 const Teuchos::RCP<Teuchos::ParameterList>& params = null) {
531 #ifdef HAVE_XPETRA_TPETRA
533 return rcp(
new TpetraCrsMatrix<Scalar, LocalOrdinal, GlobalOrdinal, Node>(lclMatrix, rowMap, colMap, domainMap, rangeMap, importer, exporter, params));
536 TEUCHOS_TEST_FOR_EXCEPTION(rowMap->lib() ==
UseEpetra, std::logic_error,
"Epetra doesn't support this matrix constructor");
542 static RCP<CrsMatrix<Scalar, LocalOrdinal, GlobalOrdinal, Node>>
BuildBlock(
548 #ifdef HAVE_XPETRA_TPETRA
552 TEUCHOS_TEST_FOR_EXCEPTION(domainMap->lib() ==
UseEpetra, std::logic_error,
"Epetra doesn't support this matrix constructor");
560 #if (defined(HAVE_XPETRA_EPETRA) && !defined(XPETRA_EPETRA_NO_64BIT_GLOBAL_INDICES))
575 static RCP<CrsMatrix<Scalar, LocalOrdinal, GlobalOrdinal, Node>>
578 #ifdef HAVE_XPETRA_TPETRA
582 #ifdef HAVE_XPETRA_EPETRA
589 static RCP<CrsMatrix<Scalar, LocalOrdinal, GlobalOrdinal, Node>>
Build(
const RCP<
const Map<LocalOrdinal, GlobalOrdinal, Node>>& rowMap,
size_t maxNumEntriesPerRow,
const Teuchos::RCP<Teuchos::ParameterList>& plist = Teuchos::null) {
592 #ifdef HAVE_XPETRA_TPETRA
603 static RCP<CrsMatrix<Scalar, LocalOrdinal, GlobalOrdinal, Node>>
Build(
const Teuchos::RCP<
const Map<LocalOrdinal, GlobalOrdinal, Node>>& rowMap,
const ArrayRCP<const size_t>& NumEntriesPerRowToAlloc,
const Teuchos::RCP<Teuchos::ParameterList>& plist = Teuchos::null) {
606 #ifdef HAVE_XPETRA_TPETRA
618 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,
const Teuchos::RCP<Teuchos::ParameterList>& plist = Teuchos::null) {
621 #ifdef HAVE_XPETRA_TPETRA
633 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,
const Teuchos::RCP<Teuchos::ParameterList>& plist = Teuchos::null) {
636 #ifdef HAVE_XPETRA_TPETRA
651 #ifdef HAVE_XPETRA_TPETRA
652 if (graph->getRowMap()->lib() ==
UseTpetra)
656 if (graph->getRowMap()->lib() ==
UseEpetra)
663 static RCP<CrsMatrix<Scalar, LocalOrdinal, GlobalOrdinal, Node>>
Build(
const Teuchos::RCP<
const CrsGraph<LocalOrdinal, GlobalOrdinal, Node>>& graph,
typename Xpetra::CrsMatrix<Scalar, LocalOrdinal, GlobalOrdinal, Node>::local_matrix_type::values_type& values,
const Teuchos::RCP<Teuchos::ParameterList>& plist = Teuchos::null) {
666 #ifdef HAVE_XPETRA_TPETRA
667 if (graph->getRowMap()->lib() ==
UseTpetra) {
677 static RCP<CrsMatrix<Scalar, LocalOrdinal, GlobalOrdinal, Node>>
Build(
682 const Teuchos::RCP<Teuchos::ParameterList>& params = Teuchos::null) {
685 #ifdef HAVE_XPETRA_TPETRA
686 if (sourceMatrix->getRowMap()->lib() ==
UseTpetra)
690 if (sourceMatrix->getRowMap()->lib() ==
UseEpetra)
697 static RCP<CrsMatrix<Scalar, LocalOrdinal, GlobalOrdinal, Node>>
Build(
702 const Teuchos::RCP<Teuchos::ParameterList>& params = Teuchos::null) {
705 #ifdef HAVE_XPETRA_TPETRA
706 if (sourceMatrix->getRowMap()->lib() ==
UseTpetra)
710 if (sourceMatrix->getRowMap()->lib() ==
UseEpetra)
717 static RCP<CrsMatrix<Scalar, LocalOrdinal, GlobalOrdinal, Node>>
Build(
723 const Teuchos::RCP<Teuchos::ParameterList>& params) {
726 #ifdef HAVE_XPETRA_TPETRA
727 if (sourceMatrix->getRowMap()->lib() ==
UseTpetra)
731 if (sourceMatrix->getRowMap()->lib() ==
UseEpetra)
738 static RCP<CrsMatrix<Scalar, LocalOrdinal, GlobalOrdinal, Node>>
Build(
744 const Teuchos::RCP<Teuchos::ParameterList>& params) {
747 #ifdef HAVE_XPETRA_TPETRA
748 if (sourceMatrix->getRowMap()->lib() ==
UseTpetra)
752 if (sourceMatrix->getRowMap()->lib() ==
UseEpetra)
758 static RCP<CrsMatrix<Scalar, LocalOrdinal, GlobalOrdinal, Node>>
Build(
762 const Teuchos::RCP<Teuchos::ParameterList>& params = null) {
765 #ifdef HAVE_XPETRA_TPETRA
775 static RCP<CrsMatrix<Scalar, LocalOrdinal, GlobalOrdinal, Node>>
Build(
781 const Teuchos::RCP<Teuchos::ParameterList>& params = null) {
784 #ifdef HAVE_XPETRA_TPETRA
796 static RCP<CrsMatrix<Scalar, LocalOrdinal, GlobalOrdinal, Node>>
BuildBlock(
803 #ifdef HAVE_XPETRA_TPETRA
808 TEUCHOS_TEST_FOR_EXCEPTION(domainMap->lib() ==
UseEpetra, std::logic_error,
"Epetra doesn't support this matrix constructor");
817 #define XPETRA_CRSMATRIXFACTORY_SHORT
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, 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.
static RCP< CrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node > > Build(const Teuchos::RCP< const CrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >> &sourceMatrix, const Export< LocalOrdinal, GlobalOrdinal, Node > &RowExporter, const RCP< const Export< LocalOrdinal, GlobalOrdinal, Node >> DomainExporter, const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node >> &domainMap, const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node >> &rangeMap, const Teuchos::RCP< Teuchos::ParameterList > ¶ms)
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 typename Xpetra::CrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >::local_matrix_type &lclMatrix, const Teuchos::RCP< Teuchos::ParameterList > ¶ms=null)
static RCP< CrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node > > Build(const typename Xpetra::CrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >::local_matrix_type &lclMatrix, const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node >> &rowMap, const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node >> &colMap, const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node >> &domainMap, const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node >> &rangeMap, const Teuchos::RCP< const Import< LocalOrdinal, GlobalOrdinal, Node >> &importer, const Teuchos::RCP< const Export< LocalOrdinal, GlobalOrdinal, Node >> &exporter, const Teuchos::RCP< Teuchos::ParameterList > ¶ms=null)
static RCP< CrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node > > Build(const Teuchos::RCP< const CrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >> &sourceMatrix, const Export< LocalOrdinal, GlobalOrdinal, Node > &RowExporter, const RCP< const Export< LocalOrdinal, GlobalOrdinal, Node >> DomainExporter, const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node >> &domainMap, const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node >> &rangeMap, const Teuchos::RCP< Teuchos::ParameterList > ¶ms)
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, const typename Xpetra::CrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >::local_matrix_type &lclMatrix, const Teuchos::RCP< Teuchos::ParameterList > ¶ms=null)
static RCP< CrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node > > Build(const Teuchos::RCP< const CrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >> &sourceMatrix, const Import< LocalOrdinal, GlobalOrdinal, Node > &RowImporter, const RCP< const Import< LocalOrdinal, GlobalOrdinal, Node >> DomainImporter, const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node >> &domainMap, const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node >> &rangeMap, const Teuchos::RCP< Teuchos::ParameterList > ¶ms)
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, const Teuchos::RCP< Teuchos::ParameterList > &plist=Teuchos::null)
Constructor specifying column Map and number of entries in each row.
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 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 RCP< const Map< LocalOrdinal, GlobalOrdinal, Node >> &rowMap)
Constructor for empty matrix (intended use is an import/export target - can't insert entries directly...
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.
static RCP< CrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node > > Build(const typename Xpetra::CrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >::local_matrix_type &lclMatrix, const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node >> &rowMap, const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node >> &colMap, const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node >> &domainMap=Teuchos::null, const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node >> &rangeMap=Teuchos::null, const Teuchos::RCP< Teuchos::ParameterList > ¶ms=null)
static RCP< CrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node > > BuildBlock(const Teuchos::RCP< const Xpetra::CrsGraph< LocalOrdinal, GlobalOrdinal, Node >> &blockGraph, const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node >> &domainMap, const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node >> &rangeMap, LocalOrdinal blockSize)
Build a BlockCrsMatrix.
#define XPETRA_FACTORY_ERROR_IF_EPETRA(lib)
static RCP< CrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node > > Build(const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node >> &rowMap, const ArrayRCP< const size_t > &NumEntriesPerRowToAlloc, 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, const Teuchos::RCP< Teuchos::ParameterList > &plist=Teuchos::null)
Constructor specifying column Map and number of entries in each row.
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, 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 Import< LocalOrdinal, GlobalOrdinal, Node > &RowImporter, const RCP< const Import< LocalOrdinal, GlobalOrdinal, Node >> DomainImporter, const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node >> &domainMap, const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node >> &rangeMap, const Teuchos::RCP< Teuchos::ParameterList > ¶ms)
Constructor using FusedImport.
static RCP< CrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node > > Build(const Teuchos::RCP< const CrsGraph< LocalOrdinal, GlobalOrdinal, Node >> &graph, typename Xpetra::CrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >::local_matrix_type::values_type &values, const Teuchos::RCP< Teuchos::ParameterList > &plist=Teuchos::null)
Constructor specifying a previously constructed graph and values array.
CrsMatrixFactory()
Private constructor. This is a static class.
CrsMatrixFactory()
Private constructor. This is a static class.
static RCP< CrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node > > Build(const Teuchos::RCP< const CrsGraph< LocalOrdinal, GlobalOrdinal, Node >> &graph, typename Xpetra::CrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >::local_matrix_type::values_type &values, const Teuchos::RCP< Teuchos::ParameterList > &plist=Teuchos::null)
Constructor specifying a previously constructed graph and values array.
static RCP< CrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node > > Build(const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node >> &rowMap, size_t maxNumEntriesPerRow, 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, size_t maxNumEntriesPerRow, 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 > > BuildBlock(const Teuchos::RCP< const Xpetra::CrsGraph< LocalOrdinal, GlobalOrdinal, Node >> &blockGraph, const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node >> &domainMap, const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node >> &rangeMap, LocalOrdinal blockSize)
static RCP< CrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node > > Build(const typename Xpetra::CrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >::local_matrix_type &lclMatrix, const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node >> &rowMap, const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node >> &colMap, const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node >> &domainMap=Teuchos::null, const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node >> &rangeMap=Teuchos::null, const Teuchos::RCP< Teuchos::ParameterList > ¶ms=null)
CrsMatrixFactory()
Private constructor. This is a static class.
static RCP< CrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node > > Build(const Teuchos::RCP< const CrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >> &sourceMatrix, const Export< LocalOrdinal, GlobalOrdinal, Node > &RowExporter, const RCP< const Export< LocalOrdinal, GlobalOrdinal, Node >> DomainExporter, const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node >> &domainMap, const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node >> &rangeMap, const Teuchos::RCP< Teuchos::ParameterList > ¶ms)
Constructor using FusedExport.
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.
static RCP< CrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node > > Build(const typename Xpetra::CrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >::local_matrix_type &lclMatrix, const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node >> &rowMap, const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node >> &colMap, const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node >> &domainMap, const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node >> &rangeMap, const Teuchos::RCP< const Import< LocalOrdinal, GlobalOrdinal, Node >> &importer, const Teuchos::RCP< const Export< LocalOrdinal, GlobalOrdinal, Node >> &exporter, const Teuchos::RCP< Teuchos::ParameterList > ¶ms=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)
static RCP< CrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node > > Build(const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node >> &rowMap)
Constructor for empty matrix (intended use is an import/export target - can't insert entries directly...
static RCP< CrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node > > Build(const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node >> &rowMap, size_t maxNumEntriesPerRow, const Teuchos::RCP< Teuchos::ParameterList > &plist=Teuchos::null)
static RCP< CrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node > > Build(const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node >> &rowMap)
Constructor for empty matrix (intended use is an import/export target - can't insert entries directly...
#define XPETRA_FACTORY_END
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 CrsGraph< LocalOrdinal, GlobalOrdinal, Node >> &graph, typename Xpetra::CrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >::local_matrix_type::values_type &values, const Teuchos::RCP< Teuchos::ParameterList > &plist=Teuchos::null)
Constructor specifying a previously constructed graph and values array.
static RCP< CrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node > > Build(const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node >> &rowMap, const ArrayRCP< const size_t > &NumEntriesPerRowToAlloc, const Teuchos::RCP< Teuchos::ParameterList > &plist=Teuchos::null)
Constructor specifying (possibly different) number of entries in each row.
Tpetra::KokkosCompat::KokkosSerialWrapperNode EpetraNode
static RCP< CrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node > > Build(const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node >> &rowMap, size_t maxNumEntriesPerRow, 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 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)
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 typename Xpetra::CrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >::local_matrix_type &lclMatrix, const Teuchos::RCP< Teuchos::ParameterList > ¶ms=null)
#define XPETRA_MONITOR(funcName)
static RCP< CrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node > > Build(const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node >> &rowMap, const ArrayRCP< const size_t > &NumEntriesPerRowToAlloc, 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, size_t maxNumEntriesPerRow, const Teuchos::RCP< Teuchos::ParameterList > &plist=Teuchos::null)
Constructor specifying column Map and fixed number of entries for each row.
KokkosSparse::CrsMatrix< impl_scalar_type, LocalOrdinal, execution_space, void, typename local_graph_type::size_type > local_matrix_type
The specialization of Kokkos::CrsMatrix that represents the part of the sparse matrix on each MPI pro...
static RCP< CrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node > > Build(const Teuchos::RCP< const CrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >> &sourceMatrix, const Import< LocalOrdinal, GlobalOrdinal, Node > &RowImporter, const RCP< const Import< LocalOrdinal, GlobalOrdinal, Node >> DomainImporter, const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node >> &domainMap, const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node >> &rangeMap, const Teuchos::RCP< Teuchos::ParameterList > ¶ms)
Constructor using FusedImport.
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 > > BuildBlock(const Teuchos::RCP< const Xpetra::CrsGraph< LocalOrdinal, GlobalOrdinal, Node >> &blockGraph, const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node >> &domainMap, const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node >> &rangeMap, LocalOrdinal blockSize)
Build a BlockCrsMatrix.
static RCP< CrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node > > Build(const typename Xpetra::CrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >::local_matrix_type &lclMatrix, const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node >> &rowMap, const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node >> &colMap, const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node >> &domainMap=Teuchos::null, const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node >> &rangeMap=Teuchos::null, const Teuchos::RCP< Teuchos::ParameterList > ¶ms=null)