Go to the documentation of this file.
46 #ifndef XPETRA_TPETRABLOCKCRSMATRIX_DEF_HPP
47 #define XPETRA_TPETRABLOCKCRSMATRIX_DEF_HPP
55 template<
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
58 size_t maxNumEntriesPerRow,
62 throw std::runtime_error(
"Xpetra::TpetraBlockCrsMatrix function not implemented");
67 template<
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
74 throw std::runtime_error(
"Xpetra::TpetraBlockCrsMatrix function not implemented");
79 template<
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
83 size_t maxNumEntriesPerRow,
87 throw std::runtime_error(
"Xpetra::TpetraBlockCrsMatrix function not implemented");
92 template<
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
100 throw std::runtime_error(
"Xpetra::TpetraBlockCrsMatrix function not implemented");
105 template<
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
112 throw std::runtime_error(
"Xpetra::TpetraBlockCrsMatrix function not implemented");
117 template<
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
120 const LocalOrdinal blockSize)
121 : mtx_(
Teuchos::
rcp(new Tpetra::BlockCrsMatrix<Scalar, LocalOrdinal, GlobalOrdinal, Node>(*
toTpetra(graph), blockSize)))
126 template<
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
134 throw std::runtime_error(
"Xpetra::TpetraBlockCrsMatrix function not implemented");
139 template<
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
147 throw std::runtime_error(
"Xpetra::TpetraBlockCrsMatrix function not implemented");
152 template<
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
161 throw std::runtime_error(
"Xpetra::TpetraBlockCrsMatrix function not implemented");
166 template<
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
175 throw std::runtime_error(
"Xpetra::TpetraBlockCrsMatrix function not implemented");
180 template<
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
189 template<
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
196 throw std::runtime_error(
"Xpetra::TpetraBlockCrsMatrix function not implemented");
201 template<
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
208 throw std::runtime_error(
"Xpetra::TpetraBlockCrsMatrix function not implemented");
213 template<
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
220 throw std::runtime_error(
"Xpetra::TpetraBlockCrsMatrix function not implemented");
225 template<
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
236 template<
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
241 XPETRA_MONITOR(
"TpetraBlockCrsMatrix::setAllToScalar"); mtx_->setAllToScalar(alpha);
246 template<
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
249 scale(
const Scalar &alpha)
251 throw std::runtime_error(
"Xpetra::TpetraBlockCrsMatrix function not implemented");
257 template<
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
262 throw std::runtime_error(
"Xpetra::TpetraBlockCrsMatrix function not implemented");
267 template<
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
272 throw std::runtime_error(
"Xpetra::TpetraBlockCrsMatrix function not implemented");
277 template<
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
284 throw std::runtime_error(
"Xpetra::TpetraBlockCrsMatrix function not implemented");
294 template<
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
303 template<
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
314 template<
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
323 template<
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
329 throw std::runtime_error(
"Xpetra::TpetraBlockCrsMatrix function not implemented");
333 template<
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
342 throw std::runtime_error(
"Xpetra::TpetraBlockCrsMatrix function not implemented");
351 template<
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
360 template<
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
369 template<
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
374 throw std::runtime_error(
"Xpetra::TpetraBlockCrsMatrix function not implemented");
378 template<
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
382 {
XPETRA_MONITOR(
"TpetraBlockCrsMatrix::getGlobalNumRows");
return mtx_->getGlobalNumRows(); }
385 template<
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
389 {
XPETRA_MONITOR(
"TpetraBlockCrsMatrix::getGlobalNumCols");
return mtx_->getGlobalNumCols(); }
392 template<
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
396 {
XPETRA_MONITOR(
"TpetraBlockCrsMatrix::getNodeNumRows");
return mtx_->getNodeNumRows(); }
399 template<
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
403 {
XPETRA_MONITOR(
"TpetraBlockCrsMatrix::getNodeNumCols");
return mtx_->getNodeNumCols(); }
406 template<
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
410 {
XPETRA_MONITOR(
"TpetraBlockCrsMatrix::getGlobalNumEntries");
return mtx_->getGlobalNumEntries(); }
413 template<
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
417 {
XPETRA_MONITOR(
"TpetraBlockCrsMatrix::getNodeNumEntries");
return mtx_->getNodeNumEntries(); }
420 template<
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
424 {
XPETRA_MONITOR(
"TpetraBlockCrsMatrix::getNumEntriesInLocalRow");
return mtx_->getNumEntriesInLocalRow(localRow); }
427 template<
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
431 {
XPETRA_MONITOR(
"TpetraBlockCrsMatrix::getNumEntriesInGlobalRow");
return mtx_->getNumEntriesInGlobalRow(globalRow); }
434 template<
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
436 {
XPETRA_MONITOR(
"TpetraBlockCrsMatrix::getGlobalMaxNumRowEntries");
return mtx_->getGlobalMaxNumRowEntries(); }
439 template<
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
441 {
XPETRA_MONITOR(
"TpetraBlockCrsMatrix::getNodeMaxNumRowEntries");
return mtx_->getNodeMaxNumRowEntries(); }
444 template<
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
446 {
XPETRA_MONITOR(
"TpetraBlockCrsMatrix::isLocallyIndexed");
return mtx_->isLocallyIndexed(); }
449 template<
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
451 {
XPETRA_MONITOR(
"TpetraBlockCrsMatrix::isGloballyIndexed");
return mtx_->isGloballyIndexed(); }
454 template<
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
456 {
XPETRA_MONITOR(
"TpetraBlockCrsMatrix::isFillComplete");
return mtx_->isFillComplete(); }
459 template<
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
461 {
XPETRA_MONITOR(
"TpetraBlockCrsMatrix::isFillActive");
return false; }
464 template<
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
466 {
XPETRA_MONITOR(
"TpetraBlockCrsMatrix::getFrobeniusNorm");
return mtx_->getFrobeniusNorm(); }
469 template<
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
471 {
XPETRA_MONITOR(
"TpetraBlockCrsMatrix::supportsRowViews");
return mtx_->supportsRowViews(); }
474 template<
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
480 size_t &NumEntries)
const
483 mtx_->getLocalRowCopy(LocalRow, Indices, Values, NumEntries);
487 template<
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
495 mtx_->getGlobalRowView(GlobalRow, indices, values);
499 template<
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
505 size_t &numEntries)
const
508 mtx_->getGlobalRowCopy(GlobalRow, indices, values, numEntries);
512 template<
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
517 {
XPETRA_MONITOR(
"TpetraBlockCrsMatrix::getLocalRowView"); mtx_->getLocalRowView(LocalRow, indices, values); }
520 template<
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
527 template<
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
537 template<
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
544 template<
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
551 template<
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
555 {
XPETRA_MONITOR(
"TpetraBlockCrsMatrix::description");
return mtx_->description(); }
558 template<
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
565 mtx_->describe(out, verbLevel);
569 template<
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
576 mtx_->setObjectLabel(objectLabel);
579 #ifdef XPETRA_ENABLE_DEPRECATED_CODE
580 template<
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
589 throw std::runtime_error(
"Xpetra::TpetraBlockCrsMatrix function is deprecated.");
591 #endif // XPETRA_ENABLE_DEPRECATED_CODE
594 template<
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
603 "Xpetra::TpetraBlockCrsMatrix.getLocalDiagCopy() only accept Xpetra::TpetraVector as input arguments.");
604 mtx_->getLocalDiagCopy(*tDiag.getTpetra_Vector());
609 template<
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
615 throw std::runtime_error(
"Xpetra::TpetraBlockCrsMatrix function not implemented");
620 template<
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
627 const size_t lclNumRows = mtx_->getGraph()->getNodeNumRows();
628 if (
static_cast<size_t>(offsets.
size()) < lclNumRows)
630 offsets.
resize(lclNumRows);
636 typedef typename Node::device_type device_type;
637 typedef typename device_type::memory_space memory_space;
638 if (std::is_same<memory_space, Kokkos::HostSpace>::value)
643 typedef Kokkos::View<size_t*, device_type, Kokkos::MemoryUnmanaged> output_type;
644 output_type offsetsOut (offsets.
getRawPtr(), offsets.
size());
645 mtx_->getLocalDiagOffsets(offsetsOut);
649 Kokkos::View<size_t*, device_type> offsetsTmp (
"diagOffsets", offsets.
size());
650 mtx_->getLocalDiagOffsets(offsetsTmp);
651 typedef Kokkos::View<size_t*, Kokkos::HostSpace, Kokkos::MemoryUnmanaged> output_type;
653 Kokkos::deep_copy(offsetsOut, offsetsTmp);
658 template<
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
663 throw std::runtime_error(
"Xpetra::TpetraBlockCrsMatrix::replaceDiag: function not implemented");
667 template<
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
672 throw std::runtime_error(
"Xpetra::TpetraBlockCrsMatrix function not implemented");
676 template<
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
681 throw std::runtime_error(
"Xpetra::TpetraBlockCrsMatrix function not implemented");
685 template<
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
695 template<
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
701 throw std::runtime_error(
"Xpetra::TpetraBlockCrsMatrix function not implemented");
706 template<
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
712 throw std::runtime_error(
"Xpetra::TpetraBlockCrsMatrix function not implemented");
717 template<
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
723 throw std::runtime_error(
"Xpetra::TpetraBlockCrsMatrix function not implemented");
728 template<
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
734 throw std::runtime_error(
"Xpetra::TpetraBlockCrsMatrix function not implemented");
738 template<
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
743 throw std::runtime_error(
"Xpetra::TpetraBlockCrsMatrix function not implemented");
747 template<
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
752 return !mtx_.is_null();
756 template<
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
763 template<
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
773 template<
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
781 #ifdef HAVE_XPETRA_KOKKOS_REFACTOR
782 #ifdef HAVE_XPETRA_TPETRA
787 template<
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
792 throw std::runtime_error(
"Xpetra::TpetraBlockCrsMatrix does not support getLocalMatrix due to missing Kokkos::CrsMatrix in Tpetra's experimental implementation");
795 local_matrix_type ret;
802 template<
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
805 setAllValues (
const typename local_matrix_type::row_map_type& ptr,
806 const typename local_matrix_type::StaticCrsGraphType::entries_type::non_const_type& ind,
807 const typename local_matrix_type::values_type& val)
809 throw std::runtime_error(
"Xpetra::TpetraBlockCrsMatrix does not support setAllValues due to missing Kokkos::CrsMatrix in Tpetra's experimental implementation");
812 #endif // HAVE_XPETRA_TPETRA
813 #endif // HAVE_XPETRA_KOKKOS_REFACTOR
816 #ifdef HAVE_XPETRA_EPETRA
818 #if ((defined(EPETRA_HAVE_OMP) && (!defined(HAVE_TPETRA_INST_OPENMP) || !defined(HAVE_TPETRA_INST_INT_INT))) || \
819 (!defined(EPETRA_HAVE_OMP) && (!defined(HAVE_TPETRA_INST_SERIAL) || !defined(HAVE_TPETRA_INST_INT_INT))))
823 template <
class Scalar>
825 :
public CrsMatrix<Scalar,int,int,EpetraNode>
985 {
return Teuchos::null;}
1054 void apply(
const MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &X,
MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &Y,
Teuchos::ETransp mode=
Teuchos::NO_TRANS, Scalar alpha=
ScalarTraits< Scalar >::one(), Scalar beta=
ScalarTraits< Scalar >::zero())
const { }
1120 #ifdef XPETRA_ENABLE_DEPRECATED_CODE
1122 template<
class Node2>
1127 return Teuchos::null;
1129 #endif // XPETRA_ENABLE_DEPRECATED_CODE
1147 #ifdef HAVE_XPETRA_KOKKOS_REFACTOR
1148 #ifdef HAVE_XPETRA_TPETRA
1151 local_matrix_type getLocalMatrix ()
const {
1152 throw std::runtime_error(
"Xpetra::TpetraBlockCrsMatrix does not support getLocalMatrix due to missing Kokkos::CrsMatrix in Tpetra's experimental implementation");
1153 local_matrix_type ret;
1157 void setAllValues (
const typename local_matrix_type::row_map_type& ptr,
1158 const typename local_matrix_type::StaticCrsGraphType::entries_type::non_const_type& ind,
1159 const typename local_matrix_type::values_type& val)
1161 throw std::runtime_error(
"Xpetra::TpetraBlockCrsMatrix does not support setAllValues due to missing Kokkos::CrsMatrix in Tpetra's experimental implementation");
1163 #endif // HAVE_XPETRA_TPETRA
1164 #endif // HAVE_XPETRA_KOKKOS_REFACTOR
1169 #endif // #if ((defined(EPETRA_HAVE_OMP) && (!defined(HAVE_TPETRA_INST_OPENMP) || !defined(HAVE_TPETRA_INST_INT_INT)))
1174 #if ((defined(EPETRA_HAVE_OMP) && (!defined(HAVE_TPETRA_INST_OPENMP) || !defined(HAVE_TPETRA_INST_INT_LONG_LONG))) || \
1175 (!defined(EPETRA_HAVE_OMP) && (!defined(HAVE_TPETRA_INST_SERIAL) || !defined(HAVE_TPETRA_INST_INT_LONG_LONG))))
1178 template <
class Scalar>
1180 :
public CrsMatrix<Scalar,int,long long,EpetraNode>
1335 {
return Teuchos::null;}
1404 void apply(
const MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &X,
MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &Y,
Teuchos::ETransp mode=
Teuchos::NO_TRANS, Scalar alpha=
ScalarTraits< Scalar >::one(), Scalar beta=
ScalarTraits< Scalar >::zero())
const { }
1468 #ifdef XPETRA_ENABLE_DEPRECATED_CODE
1470 template<
class Node2>
1475 return Teuchos::null;
1477 #endif // XPETRA_ENABLE_DEPRECATED_CODE
1495 #ifdef HAVE_XPETRA_KOKKOS_REFACTOR
1496 #ifdef HAVE_XPETRA_TPETRA
1499 local_matrix_type getLocalMatrix ()
const {
1500 throw std::runtime_error(
"Xpetra::TpetraBlockCrsMatrix does not support getLocalMatrix due to missing Kokkos::CrsMatrix in Tpetra's experimental implementation");
1501 local_matrix_type ret;
1505 void setAllValues (
const typename local_matrix_type::row_map_type& ptr,
1506 const typename local_matrix_type::StaticCrsGraphType::entries_type::non_const_type& ind,
1507 const typename local_matrix_type::values_type& val)
1509 throw std::runtime_error(
"Xpetra::TpetraBlockCrsMatrix does not support setAllValues due to missing Kokkos::CrsMatrix in Tpetra's experimental implementation");
1511 #endif // HAVE_XPETRA_TPETRA
1512 #endif // HAVE_XPETRA_KOKKOS_REFACTOR
1517 #endif // IF ((defined(EPETRA_HAVE_OMP) && (!defined(HAVE_TPETRA_INST_OPENMP) || !defined(HAVE_TPETRA_INST_INT_LONG_LONG)))
1522 #endif // HAVE_XPETRA_EPETRA
1527 #endif // XPETRA_TPETRABLOCKCRSMATRIX_DEF_HPP
bool isLocallyIndexed() const
If matrix indices are in the local range, this function returns true. Otherwise, this function return...
void replaceDomainMapAndImporter(const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &newDomainMap, Teuchos::RCP< const Import< LocalOrdinal, GlobalOrdinal, Node > > &newImporter)
Replaces the current domainMap and importer with the user-specified objects.
RCP< const Tpetra::BlockCrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node > > getTpetra_BlockCrsMatrix() const
Get the underlying Tpetra matrix.
RCP< const CrsGraph< LocalOrdinal, GlobalOrdinal, Node > > getCrsGraph() const
Returns the CrsGraph associated with this matrix.
void getAllValues(ArrayRCP< const size_t > &rowptr, ArrayRCP< const LocalOrdinal > &colind, ArrayRCP< const Scalar > &values) const
Gets the 1D pointer arrays of the graph (not implemented)
global_size_t getGlobalNumRows() const
Number of global elements in the row map of this matrix.
void getLocalRowCopy(LocalOrdinal LocalRow, const ArrayView< LocalOrdinal > &Indices, const ArrayView< Scalar > &Values, size_t &NumEntries) const
Extract a list of entries in a specified local row of the matrix. Put into storage allocated by calli...
TpetraVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > TpetraVectorClass
global_size_t getGlobalNumCols() const
Number of global columns in the matrix.
virtual bool haveGlobalConstants() const
Returns true if globalConstants have been computed; false otherwise.
global_size_t getGlobalNumRows() const
Number of global elements in the row map of this matrix.
size_t getNodeNumRows() const
Returns the number of matrix rows owned on the calling node.
void allocateAllValues(size_t numNonZeros, ArrayRCP< size_t > &rowptr, ArrayRCP< LocalOrdinal > &colind, ArrayRCP< Scalar > &values)
Allocates and returns ArrayRCPs of the Crs arrays — This is an Xpetra-only routine.
bool supportsRowViews() const
Returns true if getLocalRowView() and getGlobalRowView() are valid for this class.
size_t getNumEntriesInGlobalRow(GlobalOrdinal globalRow) const
Returns the current number of entries in the (locally owned) global row.
std::string description() const
A simple one-line description of this object.
bool haveGlobalConstants() const
Returns true if globalConstants have been computed; false otherwise.
size_t getNodeNumCols() const
Returns the number of columns connected to the locally owned rows of this matrix.
bool hasMatrix() const
Does this have an underlying matrix.
TpetraBlockCrsMatrix(const Teuchos::RCP< const Tpetra::BlockCrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node > > &sourceMatrix, const Import< LocalOrdinal, GlobalOrdinal, Node > &RowImporter, const Teuchos::RCP< const Import< LocalOrdinal, GlobalOrdinal, Node > > DomainImporter, const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &domainMap, const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &rangeMap, const Teuchos::RCP< Teuchos::ParameterList > ¶ms)
Constructor for a fused import ( not implemented )
void insertLocalValues(LocalOrdinal localRow, const ArrayView< const LocalOrdinal > &cols, const ArrayView< const Scalar > &vals)
Insert matrix entries, using local IDs (not implemented)
void doExport(const DistObject< char, LocalOrdinal, GlobalOrdinal, Node > &dest, const Import< LocalOrdinal, GlobalOrdinal, Node > &importer, CombineMode CM)
Export.
void doImport(const DistObject< char, LocalOrdinal, GlobalOrdinal, Node > &source, const Export< LocalOrdinal, GlobalOrdinal, Node > &exporter, CombineMode CM)
Import (using an Exporter).
void scale(const Scalar &alpha)
Scale the current values of a matrix, this = alpha*this (not implemented)
TpetraBlockCrsMatrix(const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &rowMap, const ArrayRCP< const size_t > &NumEntriesPerRowToAlloc, ProfileType pftype=DynamicProfile, const Teuchos::RCP< Teuchos::ParameterList > ¶ms=Teuchos::null)
Constructor specifying (possibly different) number of entries in each row (not implemented)
void replaceDomainMapAndImporter(const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &newDomainMap, Teuchos::RCP< const Import< LocalOrdinal, GlobalOrdinal, Node > > &newImporter)
Replaces the current domainMap and importer with the user-specified objects.
TpetraBlockCrsMatrix(const Teuchos::RCP< const CrsGraph< LocalOrdinal, GlobalOrdinal, Node > > &graph, const Teuchos::RCP< Teuchos::ParameterList > ¶ms=Teuchos::null)
Constructor specifying a previously constructed graph ( not implemented )
void getGlobalRowView(GlobalOrdinal GlobalRow, ArrayView< const GlobalOrdinal > &indices, ArrayView< const Scalar > &values) const
Extract a const, non-persisting view of global indices in a specified row of the matrix.
void resumeFill(const RCP< ParameterList > ¶ms=null)
void scale(const Scalar &alpha)
Scale the current values of a matrix, this = alpha*this (not implemented)
size_t getNumEntriesInGlobalRow(GlobalOrdinal globalRow) const
Returns the current number of entries in the (locally owned) global row.
const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > getColMap() const
Returns the Map that describes the column distribution in this matrix.
size_t global_size_t
Global size_t object.
TpetraBlockCrsMatrix(const Teuchos::RCP< const Tpetra::BlockCrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node > > &sourceMatrix, const Export< LocalOrdinal, GlobalOrdinal, Node > &RowExporter, const Teuchos::RCP< const Export< LocalOrdinal, GlobalOrdinal, Node > > DomainExporter, const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &domainMap, const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &rangeMap, const Teuchos::RCP< Teuchos::ParameterList > ¶ms)
Constructor for a fused export (not implemented)
void getLocalRowCopy(LocalOrdinal LocalRow, const ArrayView< LocalOrdinal > &Indices, const ArrayView< Scalar > &Values, size_t &NumEntries) const
Extract a list of entries in a specified local row of the matrix. Put into storage allocated by calli...
void rightScale(const Vector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &x)
Right scale operator with given vector values.
const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > getDomainMap() const
Returns the Map associated with the domain of this operator. This will be null until fillComplete() i...
void getLocalDiagCopy(Vector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &diag) const
Get a copy of the diagonal entries owned by this node, with local row idices.
TpetraExport< LocalOrdinal, GlobalOrdinal, Node > TpetraExportClass
RCP< const Tpetra::CrsGraph< LocalOrdinal, GlobalOrdinal, Node > > toTpetra(const RCP< const CrsGraph< LocalOrdinal, GlobalOrdinal, Node > > &graph)
virtual void setObjectLabel(const std::string &objectLabel)
TpetraBlockCrsMatrix(const Teuchos::RCP< const Tpetra::BlockCrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node > > &sourceMatrix, const Export< LocalOrdinal, GlobalOrdinal, Node > &exporter, 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=Teuchos::null)
Constructor for a fused export (not implemented)
size_t getNumEntriesInLocalRow(LocalOrdinal localRow) const
Returns the current number of entries on this node in the specified local row.
static magnitudeType magnitude(T a)
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.
bool isLocallyIndexed() const
If matrix indices are in the local range, this function returns true. Otherwise, this function return...
void resumeFill(const RCP< ParameterList > ¶ms=null)
TpetraBlockCrsMatrix(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 > ¶ms=Teuchos::null)
Constructor specifying column Map and fixed number of entries for each row (not implemented)
TpetraBlockCrsMatrix(const Teuchos::RCP< const CrsGraph< LocalOrdinal, GlobalOrdinal, Node > > &graph, const LocalOrdinal blockSize)
Constructor specifying a previously constructed graph & blocksize.
TpetraImport< LocalOrdinal, GlobalOrdinal, Node > TpetraImportClass
void removeEmptyProcessesInPlace(const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &newMap)
void leftScale(const Vector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &x)
Left scale operator with given vector values.
#define XPETRA_DYNAMIC_CAST(type, obj, newObj, exceptionMsg)
ScalarTraits< Scalar >::magnitudeType getFrobeniusNorm() const
Returns the Frobenius norm of the matrix.
TpetraBlockCrsMatrix(const Teuchos::RCP< const Tpetra::BlockCrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node > > &sourceMatrix, const Import< LocalOrdinal, GlobalOrdinal, Node > &RowImporter, const Teuchos::RCP< const Import< LocalOrdinal, GlobalOrdinal, Node > > DomainImporter, const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &domainMap, const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &rangeMap, const Teuchos::RCP< Teuchos::ParameterList > ¶ms)
Constructor for a fused import (not implemented)
TpetraBlockCrsMatrix(const Teuchos::RCP< const Tpetra::BlockCrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node > > &sourceMatrix, const Import< LocalOrdinal, GlobalOrdinal, Node > &importer, 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=Teuchos::null)
Constructor for a fused import (not implemented)
void replaceDomainMapAndImporter(const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &newDomainMap, Teuchos::RCP< const Import< LocalOrdinal, GlobalOrdinal, Node > > &newImporter)
Replaces the current domainMap and importer with the user-specified objects.
void doImport(const DistObject< char, LocalOrdinal, GlobalOrdinal, Node > &source, const Import< LocalOrdinal, GlobalOrdinal, Node > &importer, CombineMode CM)
Import.
bool isLocallyIndexed() const
If matrix indices are in the local range, this function returns true. Otherwise, this function return...
void removeEmptyProcessesInPlace(const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &newMap)
Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > getMap() const
Implements DistObject interface.
void getGlobalRowCopy(GlobalOrdinal GlobalRow, const ArrayView< GlobalOrdinal > &indices, const ArrayView< Scalar > &values, size_t &numEntries) const
Extract a list of entries in a specified global row of this matrix. Put into pre-allocated storage.
void apply(const MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &X, MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &Y, Teuchos::ETransp mode=Teuchos::NO_TRANS, Scalar alpha=ScalarTraits< Scalar >::one(), Scalar beta=ScalarTraits< Scalar >::zero()) const
Computes the sparse matrix-multivector multiplication.
TpetraBlockCrsMatrix(const Teuchos::RCP< Tpetra::BlockCrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node > > &mtx)
TpetraBlockCrsMatrix constructor to wrap a Tpetra::BlockCrsMatrix object.
size_t getGlobalMaxNumRowEntries() const
Returns the maximum number of entries across all rows/columns on all nodes.
ScalarTraits< Scalar >::magnitudeType getFrobeniusNorm() const
Returns the Frobenius norm of the matrix.
void getAllValues(ArrayRCP< const size_t > &rowptr, ArrayRCP< const LocalOrdinal > &colind, ArrayRCP< const Scalar > &values) const
Gets the 1D pointer arrays of the graph (not implemented)
void setObjectLabel(const std::string &objectLabel)
void leftScale(const Vector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &x)
Left scale matrix using the given vector entries.
void getLocalRowCopy(LocalOrdinal LocalRow, const ArrayView< LocalOrdinal > &Indices, const ArrayView< Scalar > &Values, size_t &NumEntries) const
Extract a list of entries in a specified local row of the matrix. Put into storage allocated by calli...
size_t getNumEntriesInLocalRow(LocalOrdinal localRow) const
Returns the current number of entries on this node in the specified local row.
void replaceLocalValues(LocalOrdinal localRow, const ArrayView< const LocalOrdinal > &cols, const ArrayView< const Scalar > &vals)
Replace matrix entries, using local IDs.
const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > getColMap() const
Returns the Map that describes the column distribution in this matrix.
RCP< const CrsGraph< int, GlobalOrdinal, Node > > toXpetra(const Epetra_CrsGraph &g)
void getLocalRowView(LocalOrdinal LocalRow, ArrayView< const LocalOrdinal > &indices, ArrayView< const Scalar > &values) const
Extract a const, non-persisting view of local indices in a specified row of the matrix.
void replaceDiag(Vector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &diag) const
TpetraVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > TpetraVectorClass
void getGlobalRowView(GlobalOrdinal GlobalRow, ArrayView< const GlobalOrdinal > &indices, ArrayView< const Scalar > &values) const
Extract a const, non-persisting view of global indices in a specified row of the matrix.
TEUCHOS_DEPRECATED RCP< T > rcp(T *p, Dealloc_T dealloc, bool owns_mem)
void allocateAllValues(size_t numNonZeros, ArrayRCP< size_t > &rowptr, ArrayRCP< LocalOrdinal > &colind, ArrayRCP< Scalar > &values)
Allocates and returns ArrayRCPs of the Crs arrays — This is an Xpetra-only routine.
TpetraBlockCrsMatrix(const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &rowMap, size_t maxNumEntriesPerRow, ProfileType pftype=DynamicProfile, const Teuchos::RCP< Teuchos::ParameterList > ¶ms=Teuchos::null)
Constructor specifying fixed number of entries for each row (not implemented)
void insertGlobalValues(GlobalOrdinal globalRow, const ArrayView< const GlobalOrdinal > &cols, const ArrayView< const Scalar > &vals)
Insert matrix entries, using global IDs (not implemented)
void getLocalDiagCopy(Vector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &diag) const
Get a copy of the diagonal entries owned by this node, with local row idices.
bool hasMatrix() const
Does this have an underlying matrix.
bool isFillActive() const
Returns true if the matrix is in edit mode.
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 expertStaticFillComplete(const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &domainMap, const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &rangeMap, const RCP< const Import< LocalOrdinal, GlobalOrdinal, Node > > &importer=Teuchos::null, const RCP< const Export< LocalOrdinal, GlobalOrdinal, Node > > &exporter=Teuchos::null, const RCP< ParameterList > ¶ms=Teuchos::null)
Expert static fill complete.
const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > getRangeMap() const
size_t getNodeNumEntries() const
Returns the local number of entries in this matrix.
void getLocalDiagOffsets(Teuchos::ArrayRCP< size_t > &offsets) const
Get offsets of the diagonal entries in the matrix.
TpetraBlockCrsMatrix(const Teuchos::RCP< Tpetra::BlockCrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node > > &mtx)
TpetraBlockCrsMatrix constructor to wrap a Tpetra::BlockCrsMatrix object.
bool isGloballyIndexed() const
If matrix indices are in the global range, this function returns true. Otherwise, this function retur...
global_size_t getGlobalNumEntries() const
Returns the global number of entries in this matrix.
bool isFillComplete() const
Returns true if the matrix is in compute mode, i.e. if fillComplete() has been called.
const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > getColMap() const
Returns the Map that describes the column distribution in this matrix.
void doImport(const DistObject< char, LocalOrdinal, GlobalOrdinal, Node > &source, const Import< LocalOrdinal, GlobalOrdinal, Node > &importer, CombineMode CM)
Import.
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.
void replaceGlobalValues(GlobalOrdinal globalRow, const ArrayView< const GlobalOrdinal > &cols, const ArrayView< const Scalar > &vals)
Replace matrix entries, using global IDs (not implemented)
void setAllValues(const ArrayRCP< size_t > &rowptr, const ArrayRCP< LocalOrdinal > &colind, const ArrayRCP< Scalar > &values)
Sets the 1D pointer arrays of the graph (not impelmented)
size_t getNodeNumCols() const
Returns the number of columns connected to the locally owned rows of this matrix.
CombineMode
Xpetra::Combine Mode enumerable type.
size_t getGlobalMaxNumRowEntries() const
Returns the maximum number of entries across all rows/columns on all nodes.
void fillComplete(const RCP< ParameterList > ¶ms=null)
Signal that data entry is complete.
size_t getNumEntriesInLocalRow(LocalOrdinal localRow) const
Returns the current number of entries on this node in the specified local row.
void getGlobalRowView(GlobalOrdinal GlobalRow, ArrayView< const GlobalOrdinal > &indices, ArrayView< const Scalar > &values) const
Extract a const, non-persisting view of global indices in a specified row of the matrix.
bool haveGlobalConstants() const
Returns true if globalConstants have been computed; false otherwise.
size_t getNumEntriesInGlobalRow(GlobalOrdinal globalRow) const
Returns the current number of entries in the (locally owned) global row.
void setAllValues(const ArrayRCP< size_t > &rowptr, const ArrayRCP< LocalOrdinal > &colind, const ArrayRCP< Scalar > &values)
Sets the 1D pointer arrays of the graph (not impelmented)
TpetraBlockCrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node > TpetraBlockCrsMatrixClass
RCP< const CrsGraph< LocalOrdinal, GlobalOrdinal, Node > > getCrsGraph() const
Returns the CrsGraph associated with this matrix.
bool hasMatrix() const
Does this have an underlying matrix.
TpetraBlockCrsMatrix(const TpetraBlockCrsMatrix &matrix)
Deep copy constructor.
void rightScale(const Vector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &x)
Right scale matrix using the given vector entries.
size_t getNodeNumEntries() const
Returns the local number of entries in this matrix.
TpetraBlockCrsMatrix(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 > ¶ms=Teuchos::null)
Constructor specifying column Map and number of entries in each row (not implemented)
RCP< Map< LocalOrdinal, GlobalOrdinal, Node2 > > clone(const Map< LocalOrdinal, GlobalOrdinal, Node1 > &map, const RCP< Node2 > &node2)
void getLocalDiagOffsets(Teuchos::ArrayRCP< size_t > &offsets) const
Get offsets of the diagonal entries in the matrix.
size_t getNodeNumEntries() const
Returns the local number of entries in this matrix.
void resumeFill(const RCP< ParameterList > ¶ms=null)
void doImport(const DistObject< char, LocalOrdinal, GlobalOrdinal, Node > &source, const Export< LocalOrdinal, GlobalOrdinal, Node > &exporter, CombineMode CM)
Import (using an Exporter).
void replaceLocalValues(LocalOrdinal localRow, const ArrayView< const LocalOrdinal > &cols, const ArrayView< const Scalar > &vals)
Replace matrix entries, using local IDs.
void replaceGlobalValues(GlobalOrdinal globalRow, const ArrayView< const GlobalOrdinal > &cols, const ArrayView< const Scalar > &vals)
Replace matrix entries, using global IDs (not implemented)
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.
bool isFillActive() const
Returns true if the matrix is in edit mode.
const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > getRowMap() const
Returns the Map that describes the row distribution in this matrix.
global_size_t getGlobalNumEntries() const
Returns the global number of entries in this matrix.
bool isFillComplete() const
Returns true if the matrix is in compute mode, i.e. if fillComplete() has been called.
void apply(const MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &X, MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &Y, Teuchos::ETransp mode=Teuchos::NO_TRANS, Scalar alpha=ScalarTraits< Scalar >::one(), Scalar beta=ScalarTraits< Scalar >::zero()) const
Computes the sparse matrix-multivector multiplication.
const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > getRangeMap() const
void setAllToScalar(const Scalar &alpha)
Set all matrix entries equal to scalarThis.
bool isFillComplete() const
Returns true if the matrix is in compute mode, i.e. if fillComplete() has been called.
RCP< const Tpetra::BlockCrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node > > getTpetra_BlockCrsMatrix() const
Get the underlying Tpetra matrix.
void allocateAllValues(size_t numNonZeros, ArrayRCP< size_t > &rowptr, ArrayRCP< LocalOrdinal > &colind, ArrayRCP< Scalar > &values)
Allocates and returns ArrayRCPs of the Crs arrays — This is an Xpetra-only routine.
TpetraBlockCrsMatrix(const Teuchos::RCP< const CrsGraph< LocalOrdinal, GlobalOrdinal, Node > > &graph, const LocalOrdinal blockSize)
Constructor specifying a previously constructed graph & blocksize.
#define XPETRA_TPETRA_ETI_EXCEPTION(cl, obj, go, node)
size_t getNodeNumRows() const
Returns the number of matrix rows owned on the calling node.
void doImport(const DistObject< char, LocalOrdinal, GlobalOrdinal, Node > &source, const Import< LocalOrdinal, GlobalOrdinal, Node > &importer, CombineMode CM)
Import.
void setAllToScalar(const Scalar &alpha)
Set all matrix entries equal to scalarThis.
void insertGlobalValues(GlobalOrdinal globalRow, const ArrayView< const GlobalOrdinal > &cols, const ArrayView< const Scalar > &vals)
Insert matrix entries, using global IDs (not implemented)
TpetraBlockCrsMatrix(const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &rowMap, size_t maxNumEntriesPerRow, ProfileType pftype=DynamicProfile, const Teuchos::RCP< Teuchos::ParameterList > ¶ms=Teuchos::null)
Constructor specifying fixed number of entries for each row (not implemented)
TpetraBlockCrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node > TpetraBlockCrsMatrixClass
void apply(const MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &X, MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &Y, Teuchos::ETransp mode=Teuchos::NO_TRANS, Scalar alpha=ScalarTraits< Scalar >::one(), Scalar beta=ScalarTraits< Scalar >::zero()) const
Computes the sparse matrix-multivector multiplication.
void removeEmptyProcessesInPlace(const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &newMap)
Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > getMap() const
Implements DistObject interface.
size_t getNodeMaxNumRowEntries() const
Returns the maximum number of entries across all rows/columns on this node.
void rightScale(const Vector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &x)
Right scale matrix using the given vector entries.
RCP< const CrsGraph< LocalOrdinal, GlobalOrdinal, Node > > getCrsGraph() const
Returns the CrsGraph associated with this matrix.
global_size_t getGlobalNumCols() const
Number of global columns in the matrix.
TpetraBlockCrsMatrix(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 > ¶ms=Teuchos::null)
Constructor specifying column Map and number of entries in each row (not implemented)
virtual ~TpetraBlockCrsMatrix()
Destructor.
void doExport(const DistObject< char, LocalOrdinal, GlobalOrdinal, Node > &dest, const Import< LocalOrdinal, GlobalOrdinal, Node > &importer, CombineMode CM)
Export.
void insertGlobalValues(GlobalOrdinal globalRow, const ArrayView< const GlobalOrdinal > &cols, const ArrayView< const Scalar > &vals)
Insert matrix entries, using global IDs (not implemented)
global_size_t getGlobalNumCols() const
Number of global columns in the matrix.
ScalarTraits< Scalar >::magnitudeType getFrobeniusNorm() const
Returns the Frobenius norm of the matrix.
bool supportsRowViews() const
Returns true if getLocalRowView() and getGlobalRowView() are valid for this class.
void replaceLocalValues(LocalOrdinal localRow, const ArrayView< const LocalOrdinal > &cols, const ArrayView< const Scalar > &vals)
Replace matrix entries, using local IDs.
void insertLocalValues(LocalOrdinal localRow, const ArrayView< const LocalOrdinal > &cols, const ArrayView< const Scalar > &vals)
Insert matrix entries, using local IDs (not implemented)
TpetraExport< LocalOrdinal, GlobalOrdinal, Node > TpetraExportClass
Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > getMap() const
Implements DistObject interface.
void fillComplete(const RCP< ParameterList > ¶ms=null)
Signal that data entry is complete.
void getAllValues(ArrayRCP< const size_t > &rowptr, ArrayRCP< const LocalOrdinal > &colind, ArrayRCP< const Scalar > &values) const
Gets the 1D pointer arrays of the graph (not implemented)
TpetraBlockCrsMatrix(const Teuchos::RCP< const Tpetra::BlockCrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node > > &sourceMatrix, const Export< LocalOrdinal, GlobalOrdinal, Node > &RowExporter, const Teuchos::RCP< const Export< LocalOrdinal, GlobalOrdinal, Node > > DomainExporter, const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &domainMap, const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &rangeMap, const Teuchos::RCP< Teuchos::ParameterList > ¶ms)
Constructor for a fused export (not implemented(.
void resize(const size_type n, const T &val=T())
size_t getGlobalMaxNumRowEntries() const
Returns the maximum number of entries across all rows/columns on all nodes.
TpetraBlockCrsMatrix(const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &rowMap, size_t maxNumEntriesPerRow, ProfileType pftype=DynamicProfile, const Teuchos::RCP< Teuchos::ParameterList > ¶ms=Teuchos::null)
Constructor specifying fixed number of entries for each row (not implemented)
bool isGloballyIndexed() const
If matrix indices are in the global range, this function returns true. Otherwise, this function retur...
void doExport(const DistObject< char, LocalOrdinal, GlobalOrdinal, Node > &dest, const Export< LocalOrdinal, GlobalOrdinal, Node > &exporter, CombineMode CM)
Export (using an Importer).
const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > getDomainMap() const
Returns the Map associated with the domain of this operator. This will be null until fillComplete() i...
TpetraBlockCrsMatrix(const Teuchos::RCP< const Tpetra::BlockCrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node > > &sourceMatrix, const Import< LocalOrdinal, GlobalOrdinal, Node > &importer, 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=Teuchos::null)
Constructor for a fused import ( not implemented )
TpetraBlockCrsMatrix(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 > ¶ms=Teuchos::null)
Constructor specifying column Map and fixed number of entries for each row (not implemented)
const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > getRowMap() const
Returns the Map that describes the row distribution in this matrix.
TpetraImport< LocalOrdinal, GlobalOrdinal, Node > TpetraImportClass
void getLocalRowView(LocalOrdinal LocalRow, ArrayView< const LocalOrdinal > &indices, ArrayView< const Scalar > &values) const
Extract a const, non-persisting view of local indices in a specified row of the matrix.
bool isGloballyIndexed() const
If matrix indices are in the global range, this function returns true. Otherwise, this function retur...
global_size_t getGlobalNumRows() const
Number of global elements in the row map of this matrix.
void scale(const Scalar &alpha)
Scale the current values of a matrix, this = alpha*this (not implemented)
void doExport(const DistObject< char, LocalOrdinal, GlobalOrdinal, Node > &dest, const Import< LocalOrdinal, GlobalOrdinal, Node > &importer, CombineMode CM)
Export.
void getLocalRowView(LocalOrdinal LocalRow, ArrayView< const LocalOrdinal > &indices, ArrayView< const Scalar > &values) const
Extract a const, non-persisting view of local indices in a specified row of the matrix.
void expertStaticFillComplete(const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &domainMap, const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &rangeMap, const RCP< const Import< LocalOrdinal, GlobalOrdinal, Node > > &importer=Teuchos::null, const RCP< const Export< LocalOrdinal, GlobalOrdinal, Node > > &exporter=Teuchos::null, const RCP< ParameterList > ¶ms=Teuchos::null)
Expert static fill complete.
TpetraBlockCrsMatrix(const Teuchos::RCP< const Tpetra::BlockCrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node > > &sourceMatrix, const Export< LocalOrdinal, GlobalOrdinal, Node > &exporter, 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=Teuchos::null)
Constructor for a fused export (not implemented(.
void getLocalDiagCopy(Vector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &diag) const
Get a copy of the diagonal entries owned by this node, with local row idices.
void getLocalDiagCopy(Vector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &diag, const Teuchos::ArrayView< const size_t > &offsets) const
Get a copy of the diagonal entries owned by this node, with local row indices.
size_t getNodeMaxNumRowEntries() const
Returns the maximum number of entries across all rows/columns on this node.
~TpetraBlockCrsMatrix()
Destructor.
void replaceDiag(const Vector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &diag)
Replace the diagonal entries of the matrix.
RCP< Tpetra::BlockCrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node > > getTpetra_BlockCrsMatrixNonConst() const
Get the underlying Tpetra matrix.
RCP< const Tpetra::BlockCrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node > > getTpetra_BlockCrsMatrix() const
Get the underlying Tpetra matrix.
size_t getNodeNumRows() const
Returns the number of matrix rows owned on the calling node.
TpetraBlockCrsMatrix(const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &rowMap, const ArrayRCP< const size_t > &NumEntriesPerRowToAlloc, ProfileType pftype=DynamicProfile, const Teuchos::RCP< Teuchos::ParameterList > ¶ms=Teuchos::null)
Constructor specifying (possibly different) number of entries in each row (not implemented)
void getLocalDiagOffsets(Teuchos::ArrayRCP< size_t > &offsets) const
Get offsets of the diagonal entries in the matrix.
void getGlobalRowCopy(GlobalOrdinal GlobalRow, const ArrayView< GlobalOrdinal > &indices, const ArrayView< Scalar > &values, size_t &numEntries) const
Extract a list of entries in a specified global row of this matrix. Put into pre-allocated storage.
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.
void doExport(const DistObject< char, LocalOrdinal, GlobalOrdinal, Node > &dest, const Export< LocalOrdinal, GlobalOrdinal, Node > &exporter, CombineMode CM)
Export (using an Importer).
std::string description() const
A simple one-line description of this object.
RCP< Tpetra::BlockCrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node > > getTpetra_BlockCrsMatrixNonConst() const
Get the underlying Tpetra matrix.
void getLocalDiagCopy(Vector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &diag, const Teuchos::ArrayView< const size_t > &offsets) const
Get a copy of the diagonal entries owned by this node, with local row indices.
void replaceDiag(const Vector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &diag)
TpetraBlockCrsMatrix(const TpetraBlockCrsMatrix &matrix)
Deep copy constructor.
const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > getRowMap() const
Returns the Map that describes the row distribution in this matrix.
size_t getNodeNumCols() const
Returns the number of columns connected to the locally owned rows of this matrix.
void setAllValues(const ArrayRCP< size_t > &rowptr, const ArrayRCP< LocalOrdinal > &colind, const ArrayRCP< Scalar > &values)
Sets the 1D pointer arrays of the graph (not impelmented)
void getGlobalRowCopy(GlobalOrdinal GlobalRow, const ArrayView< GlobalOrdinal > &indices, const ArrayView< Scalar > &values, size_t &numEntries) const
Extract a list of entries in a specified global row of this matrix. Put into pre-allocated storage.
bool isFillActive() const
Returns true if the matrix is in edit mode.
bool supportsRowViews() const
Returns true if getLocalRowView() and getGlobalRowView() are valid for this class.
void setAllToScalar(const Scalar &alpha)
Set all matrix entries equal to scalarThis.
~TpetraBlockCrsMatrix()
Destructor.
static const EVerbosityLevel verbLevel_default
const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > getRangeMap() const
void insertLocalValues(LocalOrdinal localRow, const ArrayView< const LocalOrdinal > &cols, const ArrayView< const Scalar > &vals)
Insert matrix entries, using local IDs (not implemented)
void leftScale(const Vector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &x)
Left scale matrix using the given vector entries.
std::string description() const
A simple one-line description of this object.
#define XPETRA_MONITOR(funcName)
size_t getNodeMaxNumRowEntries() const
Returns the maximum number of entries across all rows/columns on this node.
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.
void replaceGlobalValues(GlobalOrdinal globalRow, const ArrayView< const GlobalOrdinal > &cols, const ArrayView< const Scalar > &vals)
Replace matrix entries, using global IDs (not implemented)
global_size_t getGlobalNumEntries() const
Returns the global number of entries in this matrix.
RCP< Tpetra::BlockCrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node > > getTpetra_BlockCrsMatrixNonConst() const
Get the underlying Tpetra matrix.
void expertStaticFillComplete(const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &domainMap, const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &rangeMap, const RCP< const Import< LocalOrdinal, GlobalOrdinal, Node > > &importer=Teuchos::null, const RCP< const Export< LocalOrdinal, GlobalOrdinal, Node > > &exporter=Teuchos::null, const RCP< ParameterList > ¶ms=Teuchos::null)
Expert static fill complete.
TpetraBlockCrsMatrix(const Teuchos::RCP< const CrsGraph< LocalOrdinal, GlobalOrdinal, Node > > &graph, const Teuchos::RCP< Teuchos::ParameterList > ¶ms=Teuchos::null)
Constructor specifying a previously constructed graph ( not implemented )
#define TEUCHOS_UNREACHABLE_RETURN(dummyReturnVal)
const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > getDomainMap() const
Returns the Map associated with the domain of this operator. This will be null until fillComplete() i...