43 #ifndef IFPACK2_OVERLAPPINGROWMATRIX_DEF_HPP 44 #define IFPACK2_OVERLAPPINGROWMATRIX_DEF_HPP 46 #include <Ifpack2_OverlappingRowMatrix_decl.hpp> 47 #include <Ifpack2_Details_OverlappingRowGraph.hpp> 48 #include <Tpetra_CrsMatrix.hpp> 49 #include <Teuchos_CommHelpers.hpp> 53 template<
class MatrixType>
56 const int overlapLevel) :
58 OverlapLevel_ (overlapLevel)
63 using Teuchos::outArg;
64 using Teuchos::rcp_const_cast;
65 using Teuchos::rcp_dynamic_cast;
66 using Teuchos::rcp_implicit_cast;
67 using Teuchos::REDUCE_SUM;
68 using Teuchos::reduceAll;
69 typedef Tpetra::global_size_t GST;
70 typedef Tpetra::CrsGraph<local_ordinal_type,
71 global_ordinal_type, node_type> crs_graph_type;
72 TEUCHOS_TEST_FOR_EXCEPTION(
73 OverlapLevel_ <= 0, std::runtime_error,
74 "Ifpack2::OverlappingRowMatrix: OverlapLevel must be > 0.");
75 TEUCHOS_TEST_FOR_EXCEPTION(
76 A_->getComm()->getSize() == 1, std::runtime_error,
77 "Ifpack2::OverlappingRowMatrix: Matrix must be " 78 "distributed over more than one MPI process.");
80 RCP<const crs_matrix_type> ACRS =
81 rcp_dynamic_cast<
const crs_matrix_type,
const row_matrix_type> (A_);
82 TEUCHOS_TEST_FOR_EXCEPTION(
83 ACRS.is_null (), std::runtime_error,
84 "Ifpack2::OverlappingRowMatrix: The input matrix must be a Tpetra::" 85 "CrsMatrix with matching template parameters. This class currently " 86 "requires that CrsMatrix's fifth template parameter be the default.");
87 RCP<const crs_graph_type> A_crsGraph = ACRS->getCrsGraph ();
89 const size_t numMyRowsA = A_->getNodeNumRows ();
90 const global_ordinal_type global_invalid =
91 Teuchos::OrdinalTraits<global_ordinal_type>::invalid ();
94 Array<global_ordinal_type> ExtElements;
96 RCP<crs_graph_type> TmpGraph;
97 RCP<import_type> TmpImporter;
98 RCP<const map_type> RowMap, ColMap;
101 for (
int overlap = 0 ; overlap < OverlapLevel_ ; ++overlap) {
104 RowMap = A_->getRowMap ();
105 ColMap = A_->getColMap ();
108 RowMap = TmpGraph->getRowMap ();
109 ColMap = TmpGraph->getColMap ();
112 const size_t size = ColMap->getNodeNumElements () - RowMap->getNodeNumElements ();
113 Array<global_ordinal_type> mylist (size);
117 for (local_ordinal_type i = 0 ; (size_t) i < ColMap->getNodeNumElements() ; ++i) {
118 const global_ordinal_type GID = ColMap->getGlobalElement (i);
119 if (A_->getRowMap ()->getLocalElement (GID) == global_invalid) {
120 typedef typename Array<global_ordinal_type>::iterator iter_type;
121 const iter_type end = ExtElements.end ();
122 const iter_type pos = std::find (ExtElements.begin (), end, GID);
124 ExtElements.push_back (GID);
134 if (overlap + 1 < OverlapLevel_) {
141 TmpMap = rcp (
new map_type (global_invalid, mylist (0, count),
142 Teuchos::OrdinalTraits<global_ordinal_type>::zero (),
143 A_->getComm (), A_->getNode ()));
144 TmpGraph = rcp (
new crs_graph_type (TmpMap, 0));
145 TmpImporter = rcp (
new import_type (A_->getRowMap (), TmpMap));
147 TmpGraph->doImport (*A_crsGraph, *TmpImporter, Tpetra::INSERT);
148 TmpGraph->fillComplete (A_->getDomainMap (), TmpMap);
154 Array<global_ordinal_type> mylist (numMyRowsA + ExtElements.size ());
155 for (local_ordinal_type i = 0; (size_t)i < numMyRowsA; ++i) {
156 mylist[i] = A_->getRowMap ()->getGlobalElement (i);
158 for (local_ordinal_type i = 0; i < ExtElements.size (); ++i) {
159 mylist[i + numMyRowsA] = ExtElements[i];
162 RowMap_ = rcp (
new map_type (global_invalid, mylist (),
163 Teuchos::OrdinalTraits<global_ordinal_type>::zero (),
164 A_->getComm (), A_->getNode ()));
169 ExtMap_ = rcp (
new map_type (global_invalid, ExtElements (),
170 Teuchos::OrdinalTraits<global_ordinal_type>::zero (),
171 A_->getComm (), A_->getNode ()));
172 ExtMatrix_ = rcp (
new crs_matrix_type (ExtMap_, ColMap_, 0));
173 ExtImporter_ = rcp (
new import_type (A_->getRowMap (), ExtMap_));
175 RCP<crs_matrix_type> ExtMatrixCRS =
176 rcp_dynamic_cast<crs_matrix_type, row_matrix_type> (ExtMatrix_);
177 ExtMatrixCRS->doImport (*ACRS, *ExtImporter_, Tpetra::INSERT);
178 ExtMatrixCRS->fillComplete (A_->getDomainMap (), RowMap_);
180 Importer_ = rcp (
new import_type (A_->getRowMap (), RowMap_));
183 const size_t numMyRowsB = ExtMatrix_->getNodeNumRows ();
185 GST NumMyNonzeros_tmp = A_->getNodeNumEntries () + ExtMatrix_->getNodeNumEntries ();
186 GST NumMyRows_tmp = numMyRowsA + numMyRowsB;
188 GST inArray[2], outArray[2];
189 inArray[0] = NumMyNonzeros_tmp;
190 inArray[1] = NumMyRows_tmp;
193 reduceAll<int, GST> (* (A_->getComm ()), REDUCE_SUM, 2, inArray, outArray);
194 NumGlobalNonzeros_ = outArray[0];
195 NumGlobalRows_ = outArray[1];
202 MaxNumEntries_ = A_->getNodeMaxNumRowEntries ();
204 MaxNumEntries_ = ExtMatrix_->getNodeMaxNumRowEntries ();
209 RCP<row_graph_impl_type> graph =
210 rcp (
new row_graph_impl_type (A_->getGraph (),
211 ExtMatrix_->getGraph (),
218 rcp_const_cast<
const import_type> (Importer_),
219 rcp_const_cast<const import_type> (ExtImporter_)));
220 graph_ = rcp_const_cast<
const row_graph_type> (rcp_implicit_cast<row_graph_type> (graph));
222 Indices_.resize (MaxNumEntries_);
223 Values_.resize (MaxNumEntries_);
227 template<
class MatrixType>
231 template<
class MatrixType>
232 Teuchos::RCP<const Teuchos::Comm<int> >
235 return A_->getComm ();
239 template<
class MatrixType>
240 Teuchos::RCP<typename MatrixType::node_type>
243 return A_->getNode();
247 template<
class MatrixType>
248 Teuchos::RCP<const Tpetra::Map<typename MatrixType::local_ordinal_type, typename MatrixType::global_ordinal_type, typename MatrixType::node_type> >
256 template<
class MatrixType>
257 Teuchos::RCP<const Tpetra::Map<typename MatrixType::local_ordinal_type, typename MatrixType::global_ordinal_type, typename MatrixType::node_type> >
265 template<
class MatrixType>
266 Teuchos::RCP<const Tpetra::Map<typename MatrixType::local_ordinal_type, typename MatrixType::global_ordinal_type, typename MatrixType::node_type> >
269 return A_->getDomainMap();
273 template<
class MatrixType>
274 Teuchos::RCP<const Tpetra::Map<typename MatrixType::local_ordinal_type, typename MatrixType::global_ordinal_type, typename MatrixType::node_type> >
277 return A_->getRangeMap ();
281 template<
class MatrixType>
282 Teuchos::RCP<const Tpetra::RowGraph<typename MatrixType::local_ordinal_type, typename MatrixType::global_ordinal_type, typename MatrixType::node_type> >
289 template<
class MatrixType>
292 return NumGlobalRows_;
296 template<
class MatrixType>
299 return NumGlobalRows_;
303 template<
class MatrixType>
306 return A_->getNodeNumRows () + ExtMatrix_->getNodeNumRows ();
310 template<
class MatrixType>
317 template<
class MatrixType>
318 typename MatrixType::global_ordinal_type
321 return A_->getIndexBase();
325 template<
class MatrixType>
328 return NumGlobalNonzeros_;
332 template<
class MatrixType>
335 return A_->getNodeNumEntries () + ExtMatrix_->getNodeNumEntries ();
339 template<
class MatrixType>
344 const local_ordinal_type localRow = RowMap_->getLocalElement (globalRow);
345 if (localRow == Teuchos::OrdinalTraits<local_ordinal_type>::invalid ()) {
346 return Teuchos::OrdinalTraits<size_t>::invalid();
353 template<
class MatrixType>
359 const size_t numMyRowsA = A_->getNodeNumRows ();
360 if (as<size_t> (localRow) < numMyRowsA) {
361 return A_->getNumEntriesInLocalRow (localRow);
363 return ExtMatrix_->getNumEntriesInLocalRow (as<local_ordinal_type> (localRow - numMyRowsA));
368 template<
class MatrixType>
371 throw std::runtime_error(
"Ifpack2::OverlappingRowMatrix::getGlobalNumDiags() not supported.");
375 template<
class MatrixType>
378 return A_->getNodeNumDiags();
382 template<
class MatrixType>
385 throw std::runtime_error(
"Ifpack2::OverlappingRowMatrix::getGlobalMaxNumRowEntries() not supported.");
389 template<
class MatrixType>
392 return MaxNumEntries_;
396 template<
class MatrixType>
403 template<
class MatrixType>
406 return A_->isLowerTriangular();
410 template<
class MatrixType>
413 return A_->isUpperTriangular();
417 template<
class MatrixType>
424 template<
class MatrixType>
431 template<
class MatrixType>
438 template<
class MatrixType>
442 const Teuchos::ArrayView<global_ordinal_type> &Indices,
443 const Teuchos::ArrayView<scalar_type>& Values,
444 size_t& NumEntries)
const 446 const local_ordinal_type LocalRow = RowMap_->getLocalElement (GlobalRow);
447 if (LocalRow == Teuchos::OrdinalTraits<local_ordinal_type>::invalid ()) {
448 NumEntries = Teuchos::OrdinalTraits<size_t>::invalid ();
450 if (Teuchos::as<size_t> (LocalRow) < A_->getNodeNumRows ()) {
451 A_->getGlobalRowCopy (GlobalRow, Indices, Values, NumEntries);
453 ExtMatrix_->getGlobalRowCopy (GlobalRow, Indices, Values, NumEntries);
459 template<
class MatrixType>
463 const Teuchos::ArrayView<local_ordinal_type> &Indices,
464 const Teuchos::ArrayView<scalar_type> &Values,
465 size_t &NumEntries)
const 468 const size_t numMyRowsA = A_->getNodeNumRows ();
469 if (as<size_t> (LocalRow) < numMyRowsA) {
470 A_->getLocalRowCopy (LocalRow, Indices, Values, NumEntries);
472 ExtMatrix_->getLocalRowCopy (LocalRow - as<local_ordinal_type> (numMyRowsA),
473 Indices, Values, NumEntries);
478 template<
class MatrixType>
482 Teuchos::ArrayView<const global_ordinal_type>& indices,
483 Teuchos::ArrayView<const scalar_type>& values)
const 485 const local_ordinal_type LocalRow = RowMap_->getLocalElement (GlobalRow);
486 if (LocalRow == Teuchos::OrdinalTraits<local_ordinal_type>::invalid()) {
487 indices = Teuchos::null;
488 values = Teuchos::null;
490 if (Teuchos::as<size_t> (LocalRow) < A_->getNodeNumRows ()) {
491 A_->getGlobalRowView (GlobalRow, indices, values);
493 ExtMatrix_->getGlobalRowView (GlobalRow, indices, values);
499 template<
class MatrixType>
503 Teuchos::ArrayView<const local_ordinal_type>& indices,
504 Teuchos::ArrayView<const scalar_type>& values)
const 507 const size_t numMyRowsA = A_->getNodeNumRows ();
508 if (as<size_t> (LocalRow) < numMyRowsA) {
509 A_->getLocalRowView (LocalRow, indices, values);
511 ExtMatrix_->getLocalRowView (LocalRow - as<local_ordinal_type> (numMyRowsA),
517 template<
class MatrixType>
520 getLocalDiagCopy (Tpetra::Vector<scalar_type,local_ordinal_type,global_ordinal_type,node_type>& diag)
const 522 throw std::runtime_error(
"Ifpack2::OverlappingRowMatrix::getLocalDiagCopy not supported.");
526 template<
class MatrixType>
529 leftScale (
const Tpetra::Vector<scalar_type, local_ordinal_type, global_ordinal_type, node_type>& x)
531 throw std::runtime_error(
"Ifpack2::OverlappingRowMatrix does not support leftScale.");
535 template<
class MatrixType>
538 rightScale (
const Tpetra::Vector<scalar_type, local_ordinal_type, global_ordinal_type, node_type>& x)
540 throw std::runtime_error(
"Ifpack2::OverlappingRowMatrix does not support leftScale.");
544 template<
class MatrixType>
545 typename OverlappingRowMatrix<MatrixType>::mag_type
548 throw std::runtime_error(
"Ifpack2::OverlappingRowMatrix does not support getFrobeniusNorm.");
552 template<
class MatrixType>
555 apply (
const Tpetra::MultiVector<scalar_type,local_ordinal_type,global_ordinal_type,node_type> &X,
556 Tpetra::MultiVector<scalar_type,local_ordinal_type,global_ordinal_type,node_type> &Y,
557 Teuchos::ETransp mode,
559 scalar_type beta)
const 561 using Teuchos::ArrayRCP;
563 typedef scalar_type RangeScalar;
564 typedef scalar_type DomainScalar;
565 typedef Teuchos::ScalarTraits<RangeScalar> STRS;
567 TEUCHOS_TEST_FOR_EXCEPTION(
568 alpha != Teuchos::ScalarTraits<scalar_type>::one () ||
569 beta != Teuchos::ScalarTraits<scalar_type>::zero (), std::logic_error,
570 "Ifpack2::ReorderFilter::apply is only implemented for alpha = 1 and " 571 "beta = 0. You set alpha = " << alpha <<
" and beta = " << beta <<
".");
572 TEUCHOS_TEST_FOR_EXCEPTION(
573 X.getNumVectors() != Y.getNumVectors(), std::runtime_error,
574 "Ifpack2::OverlappingRowMatrix::apply: The input X and the output Y must " 575 "have the same number of columns. X.getNumVectors() = " 576 << X.getNumVectors() <<
" != Y.getNumVectors() = " << Y.getNumVectors()
584 const RangeScalar zero = STRS::zero ();
585 ArrayRCP<ArrayRCP<const DomainScalar> > x_ptr = X.get2dView();
586 ArrayRCP<ArrayRCP<RangeScalar> > y_ptr = Y.get2dViewNonConst();
588 size_t NumVectors = Y.getNumVectors();
590 const size_t numMyRowsA = A_->getNodeNumRows ();
591 for (
size_t i = 0; i < numMyRowsA; ++i) {
594 A_->getLocalRowCopy (i, Indices_ (),Values_ (), Nnz);
595 if (mode == Teuchos::NO_TRANS) {
596 for (
size_t j = 0; j < Nnz; ++j)
597 for (
size_t k = 0; k < NumVectors; ++k)
598 y_ptr[k][i] += as<RangeScalar> (Values_[j]) *
599 as<RangeScalar> (x_ptr[k][Indices_[j]]);
601 else if (mode == Teuchos::TRANS){
602 for (
size_t j = 0; j < Nnz; ++j)
603 for (
size_t k = 0; k < NumVectors; ++k)
604 y_ptr[k][Indices_[j]] += as<RangeScalar> (Values_[j]) *
605 as<RangeScalar> (x_ptr[k][i]);
608 for (
size_t j = 0; j < Nnz; ++j)
609 for (
size_t k = 0; k < NumVectors; ++k)
610 y_ptr[k][Indices_[j]] +=
611 STRS::conjugate (as<RangeScalar> (Values_[j])) *
612 as<RangeScalar> (x_ptr[k][i]);
616 const size_t numMyRowsB = ExtMatrix_->getNodeNumRows ();
617 for (
size_t i = 0 ; i < numMyRowsB ; ++i) {
620 ExtMatrix_->getLocalRowCopy (i, Indices_ (), Values_ (), Nnz);
621 if (mode == Teuchos::NO_TRANS) {
622 for (
size_t j = 0; j < Nnz; ++j)
623 for (
size_t k = 0; k < NumVectors; ++k)
624 y_ptr[k][numMyRowsA+i] += as<RangeScalar> (Values_[j]) *
625 as<RangeScalar> (x_ptr[k][Indices_[j]]);
627 else if (mode == Teuchos::TRANS) {
628 for (
size_t j = 0; j < Nnz; ++j)
629 for (
size_t k = 0; k < NumVectors; ++k)
630 y_ptr[k][numMyRowsA+Indices_[j]] += as<RangeScalar> (Values_[j]) *
631 as<RangeScalar> (x_ptr[k][i]);
634 for (
size_t j = 0; j < Nnz; ++j)
635 for (
size_t k = 0; k < NumVectors; ++k)
636 y_ptr[k][numMyRowsA+Indices_[j]] +=
637 STRS::conjugate (as<RangeScalar> (Values_[j])) *
638 as<RangeScalar> (x_ptr[k][i]);
644 template<
class MatrixType>
647 importMultiVector (
const Tpetra::MultiVector<scalar_type,local_ordinal_type,global_ordinal_type,node_type> &X,
648 Tpetra::MultiVector<scalar_type,local_ordinal_type,global_ordinal_type,node_type> &OvX,
649 Tpetra::CombineMode CM)
651 OvX.doImport (X, *Importer_, CM);
655 template<
class MatrixType>
658 exportMultiVector (
const Tpetra::MultiVector<scalar_type,local_ordinal_type,global_ordinal_type,node_type> &OvX,
659 Tpetra::MultiVector<scalar_type,local_ordinal_type,global_ordinal_type,node_type> &X,
660 Tpetra::CombineMode CM)
662 X.doExport (OvX, *Importer_, CM);
666 template<
class MatrixType>
673 template<
class MatrixType>
679 template<
class MatrixType>
682 std::ostringstream oss;
684 oss <<
"{ isFillComplete: true" 691 oss <<
"{ isFillComplete: false" 698 template<
class MatrixType>
700 const Teuchos::EVerbosityLevel verbLevel)
const 705 using Teuchos::VERB_DEFAULT;
706 using Teuchos::VERB_NONE;
707 using Teuchos::VERB_LOW;
708 using Teuchos::VERB_MEDIUM;
709 using Teuchos::VERB_HIGH;
710 using Teuchos::VERB_EXTREME;
713 using Teuchos::ArrayView;
715 Teuchos::EVerbosityLevel vl = verbLevel;
716 if (vl == VERB_DEFAULT) {
719 RCP<const Teuchos::Comm<int> > comm = this->
getComm();
720 const int myRank = comm->getRank();
721 const int numProcs = comm->getSize();
726 width = std::max<size_t> (width, as<size_t> (11)) + 2;
727 Teuchos::OSTab tab(out);
735 if (vl != VERB_NONE) {
737 out << this->description() << std::endl;
745 if (vl == VERB_MEDIUM || vl == VERB_HIGH || vl == VERB_EXTREME) {
747 out << endl <<
"Row map:" << endl;
754 out << endl <<
"Column map is row map.";
759 out << endl <<
"Column map:" << endl;
767 out << endl <<
"Domain map is row map.";
772 out << endl <<
"Domain map is column map.";
777 out << endl <<
"Domain map:" << endl;
785 out << endl <<
"Range map is domain map." << endl;
790 out << endl <<
"Range map is row map." << endl;
795 out << endl <<
"Range map: " << endl;
805 if (vl == VERB_MEDIUM || vl == VERB_HIGH || vl == VERB_EXTREME) {
806 for (
int curRank = 0; curRank < numProcs; ++curRank) {
807 if (myRank == curRank) {
808 out <<
"Process rank: " << curRank << std::endl;
811 out <<
" Number of diagonal entries: " <<
getNodeNumDiags() << std::endl;
821 if (vl == VERB_HIGH || vl == VERB_EXTREME) {
822 for (
int curRank = 0; curRank < numProcs; ++curRank) {
823 if (myRank == curRank) {
824 out << std::setw(width) <<
"Proc Rank" 825 << std::setw(width) <<
"Global Row" 826 << std::setw(width) <<
"Num Entries";
827 if (vl == VERB_EXTREME) {
828 out << std::setw(width) <<
"(Index,Value)";
833 typename MatrixType::global_ordinal_type gid =
getRowMap()->getGlobalElement(r);
834 out << std::setw(width) << myRank
835 << std::setw(width) << gid
836 << std::setw(width) << nE;
837 if (vl == VERB_EXTREME) {
839 ArrayView<const typename MatrixType::global_ordinal_type> rowinds;
840 ArrayView<const typename MatrixType::scalar_type> rowvals;
842 for (
size_t j = 0; j < nE; ++j) {
843 out <<
" (" << rowinds[j]
844 <<
", " << rowvals[j]
849 ArrayView<const typename MatrixType::local_ordinal_type> rowinds;
850 ArrayView<const typename MatrixType::scalar_type> rowvals;
852 for (
size_t j=0; j < nE; ++j) {
853 out <<
" (" <<
getColMap()->getGlobalElement(rowinds[j])
854 <<
", " << rowvals[j]
868 out.setOutputToRootOnly(0);
869 out <<
"===========\nlocal matrix\n=================" << std::endl;
870 out.setOutputToRootOnly(-1);
871 A_->describe(out,Teuchos::VERB_EXTREME);
872 out.setOutputToRootOnly(0);
873 out <<
"===========\nend of local matrix\n=================" << std::endl;
875 out.setOutputToRootOnly(0);
876 out <<
"=================\nghost matrix\n=================" << std::endl;
877 out.setOutputToRootOnly(-1);
878 ExtMatrix_->describe(out,Teuchos::VERB_EXTREME);
879 out.setOutputToRootOnly(0);
880 out <<
"===========\nend of ghost matrix\n=================" << std::endl;
885 template<
class MatrixType>
886 Teuchos::RCP<const Tpetra::RowMatrix<typename MatrixType::scalar_type, typename MatrixType::local_ordinal_type, typename MatrixType::global_ordinal_type, typename MatrixType::node_type> >
895 #define IFPACK2_OVERLAPPINGROWMATRIX_INSTANT(S,LO,GO,N) \ 896 template class Ifpack2::OverlappingRowMatrix< Tpetra::RowMatrix<S, LO, GO, N> >; 898 #endif // IFPACK2_OVERLAPPINGROWMATRIX_DEF_HPP virtual bool isGloballyIndexed() const
Whether this matrix is globally indexed.
Definition: Ifpack2_OverlappingRowMatrix_def.hpp:425
virtual mag_type getFrobeniusNorm() const
Returns the Frobenius norm of the matrix.
Definition: Ifpack2_OverlappingRowMatrix_def.hpp:546
virtual size_t getNodeNumRows() const
The number of rows owned by the calling process.
Definition: Ifpack2_OverlappingRowMatrix_def.hpp:304
virtual bool isFillComplete() const
true if fillComplete() has been called, else false.
Definition: Ifpack2_OverlappingRowMatrix_def.hpp:432
virtual bool isUpperTriangular() const
Whether this matrix is upper triangular.
Definition: Ifpack2_OverlappingRowMatrix_def.hpp:411
virtual Teuchos::RCP< node_type > getNode() const
The matrix's Node instance.
Definition: Ifpack2_OverlappingRowMatrix_def.hpp:241
virtual size_t getNodeNumDiags() const
The number of diagonal entries owned by the calling process.
Definition: Ifpack2_OverlappingRowMatrix_def.hpp:376
virtual void leftScale(const Tpetra::Vector< scalar_type, local_ordinal_type, global_ordinal_type, node_type > &x)
Scales the RowMatrix on the left with the Vector x.
Definition: Ifpack2_OverlappingRowMatrix_def.hpp:529
virtual Teuchos::RCP< const Teuchos::Comm< int > > getComm() const
The communicator over which the matrix is distributed.
Definition: Ifpack2_OverlappingRowMatrix_def.hpp:233
virtual Teuchos::RCP< const Tpetra::Map< local_ordinal_type, global_ordinal_type, node_type > > getRowMap() const
The Map that describes the distribution of rows over processes.
Definition: Ifpack2_OverlappingRowMatrix_def.hpp:249
virtual bool isLowerTriangular() const
Whether this matrix is lower triangular.
Definition: Ifpack2_OverlappingRowMatrix_def.hpp:404
virtual global_size_t getGlobalNumRows() const
The global number of rows in this matrix.
Definition: Ifpack2_OverlappingRowMatrix_def.hpp:290
virtual global_size_t getGlobalNumCols() const
The global number of columns in this matrix.
Definition: Ifpack2_OverlappingRowMatrix_def.hpp:297
virtual bool isLocallyIndexed() const
Whether this matrix is locally indexed.
Definition: Ifpack2_OverlappingRowMatrix_def.hpp:418
virtual global_size_t getGlobalNumDiags() const
The global number of diagonal entries.
Definition: Ifpack2_OverlappingRowMatrix_def.hpp:369
virtual Teuchos::RCP< const Tpetra::Map< local_ordinal_type, global_ordinal_type, node_type > > getRangeMap() const
The Map that describes the range of this matrix.
Definition: Ifpack2_OverlappingRowMatrix_def.hpp:275
virtual Teuchos::RCP< const Tpetra::Map< local_ordinal_type, global_ordinal_type, node_type > > getDomainMap() const
The Map that describes the domain of this matrix.
Definition: Ifpack2_OverlappingRowMatrix_def.hpp:267
Sparse graph (Tpetra::RowGraph subclass) with ghost rows.
Definition: Ifpack2_Details_OverlappingRowGraph_decl.hpp:65
virtual size_t getNumEntriesInGlobalRow(global_ordinal_type globalRow) const
The number of entries in the given global row that are owned by the calling process.
Definition: Ifpack2_OverlappingRowMatrix_def.hpp:342
virtual size_t getNodeNumEntries() const
The number of entries in this matrix owned by the calling process.
Definition: Ifpack2_OverlappingRowMatrix_def.hpp:333
virtual global_size_t getGlobalNumEntries() const
The global number of entries in this matrix.
Definition: Ifpack2_OverlappingRowMatrix_def.hpp:326
~OverlappingRowMatrix()
Destructor.
Definition: Ifpack2_OverlappingRowMatrix_def.hpp:228
virtual bool hasTransposeApply() const
Whether this operator's apply() method can apply the adjoint (transpose).
Definition: Ifpack2_OverlappingRowMatrix_def.hpp:667
virtual global_ordinal_type getIndexBase() const
The index base for global indices for this matrix.
Definition: Ifpack2_OverlappingRowMatrix_def.hpp:319
virtual bool hasColMap() const
Whether this matrix has a column Map.
Definition: Ifpack2_OverlappingRowMatrix_def.hpp:397
virtual size_t getNumEntriesInLocalRow(local_ordinal_type localRow) const
The number of entries in the given local row that are owned by the calling process.
Definition: Ifpack2_OverlappingRowMatrix_def.hpp:356
virtual void rightScale(const Tpetra::Vector< scalar_type, local_ordinal_type, global_ordinal_type, node_type > &x)
Scales the RowMatrix on the right with the Vector x.
Definition: Ifpack2_OverlappingRowMatrix_def.hpp:538
virtual Teuchos::RCP< const Tpetra::RowGraph< local_ordinal_type, global_ordinal_type, node_type > > getGraph() const
This matrix's graph.
Definition: Ifpack2_OverlappingRowMatrix_def.hpp:283
virtual void getGlobalRowView(global_ordinal_type GlobalRow, Teuchos::ArrayView< const global_ordinal_type > &indices, Teuchos::ArrayView< const scalar_type > &values) const
Extract a const, non-persisting view of global indices in a specified row of the matrix.
Definition: Ifpack2_OverlappingRowMatrix_def.hpp:481
virtual void getLocalDiagCopy(Tpetra::Vector< scalar_type, local_ordinal_type, global_ordinal_type, node_type > &diag) const
Get a copy of the diagonal entries owned by this node, with local row indices.
Definition: Ifpack2_OverlappingRowMatrix_def.hpp:520
Sparse matrix (Tpetra::RowMatrix subclass) with ghost rows.
Definition: Ifpack2_OverlappingRowMatrix_decl.hpp:59
OverlappingRowMatrix(const Teuchos::RCP< const row_matrix_type > &A, const int overlapLevel)
Definition: Ifpack2_OverlappingRowMatrix_def.hpp:55
virtual size_t getNodeMaxNumRowEntries() const
The maximum number of entries in any row on the calling process.
Definition: Ifpack2_OverlappingRowMatrix_def.hpp:390
virtual void apply(const Tpetra::MultiVector< scalar_type, local_ordinal_type, global_ordinal_type, node_type > &X, Tpetra::MultiVector< scalar_type, local_ordinal_type, global_ordinal_type, node_type > &Y, Teuchos::ETransp mode=Teuchos::NO_TRANS, scalar_type alpha=Teuchos::ScalarTraits< scalar_type >::one(), scalar_type beta=Teuchos::ScalarTraits< scalar_type >::zero()) const
Computes the operator-multivector application.
Definition: Ifpack2_OverlappingRowMatrix_def.hpp:555
virtual void getLocalRowCopy(local_ordinal_type LocalRow, const Teuchos::ArrayView< local_ordinal_type > &Indices, const Teuchos::ArrayView< scalar_type > &Values, size_t &NumEntries) const
Extract a list of entries in a specified local row of the graph. Put into storage allocated by callin...
Definition: Ifpack2_OverlappingRowMatrix_def.hpp:462
virtual void getGlobalRowCopy(global_ordinal_type GlobalRow, const Teuchos::ArrayView< global_ordinal_type > &Indices, const Teuchos::ArrayView< scalar_type > &Values, size_t &NumEntries) const
Extract a list of entries in a specified global row of this matrix. Put into pre-allocated storage...
Definition: Ifpack2_OverlappingRowMatrix_def.hpp:441
Preconditioners and smoothers for Tpetra sparse matrices.
Definition: Ifpack2_AdditiveSchwarz_decl.hpp:72
virtual Teuchos::RCP< const Tpetra::Map< local_ordinal_type, global_ordinal_type, node_type > > getColMap() const
The Map that describes the distribution of columns over processes.
Definition: Ifpack2_OverlappingRowMatrix_def.hpp:258
virtual void getLocalRowView(local_ordinal_type LocalRow, Teuchos::ArrayView< const local_ordinal_type > &indices, Teuchos::ArrayView< const scalar_type > &values) const
Extract a const, non-persisting view of local indices in a specified row of the matrix.
Definition: Ifpack2_OverlappingRowMatrix_def.hpp:502
virtual bool supportsRowViews() const
true if row views are supported, else false.
Definition: Ifpack2_OverlappingRowMatrix_def.hpp:674
virtual size_t getGlobalMaxNumRowEntries() const
The maximum number of entries in any row on any process.
Definition: Ifpack2_OverlappingRowMatrix_def.hpp:383
virtual size_t getNodeNumCols() const
The number of columns owned by the calling process.
Definition: Ifpack2_OverlappingRowMatrix_def.hpp:311