43 #ifndef IFPACK2_OVERLAPPINGROWMATRIX_DEF_HPP
44 #define IFPACK2_OVERLAPPINGROWMATRIX_DEF_HPP
48 #include <Ifpack2_Details_OverlappingRowGraph.hpp>
49 #include <Tpetra_CrsMatrix.hpp>
50 #include <Tpetra_Import.hpp>
51 #include "Tpetra_Map.hpp"
52 #include <Teuchos_CommHelpers.hpp>
56 template<
class MatrixType>
59 const int overlapLevel) :
60 A_ (Teuchos::rcp_dynamic_cast<const crs_matrix_type> (A, true)),
61 OverlapLevel_ (overlapLevel)
66 using Teuchos::outArg;
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;
73 OverlapLevel_ <= 0, std::runtime_error,
74 "Ifpack2::OverlappingRowMatrix: OverlapLevel must be > 0.");
76 (A_.
is_null (), std::runtime_error,
77 "Ifpack2::OverlappingRowMatrix: The input matrix must be a "
78 "Tpetra::CrsMatrix with the same scalar_type, local_ordinal_type, "
79 "global_ordinal_type, and device_type typedefs as MatrixType.");
81 A_->getComm()->getSize() == 1, std::runtime_error,
82 "Ifpack2::OverlappingRowMatrix: Matrix must be "
83 "distributed over more than one MPI process.");
85 RCP<const crs_graph_type> A_crsGraph = A_->getCrsGraph ();
86 const size_t numMyRowsA = A_->getNodeNumRows ();
87 const global_ordinal_type global_invalid =
91 Array<global_ordinal_type> ExtElements;
93 RCP<crs_graph_type> TmpGraph;
94 RCP<import_type> TmpImporter;
95 RCP<const map_type> RowMap, ColMap;
96 ExtHaloStarts_.
resize(OverlapLevel_+1);
99 for (
int overlap = 0 ; overlap < OverlapLevel_ ; ++overlap) {
100 ExtHaloStarts_[overlap] = (size_t) ExtElements.
size();
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),
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);
151 ExtHaloStarts_[OverlapLevel_] = (size_t) ExtElements.
size();
156 Array<global_ordinal_type> mylist (numMyRowsA + ExtElements.size ());
157 for (local_ordinal_type i = 0; (size_t)i < numMyRowsA; ++i) {
158 mylist[i] = A_->getRowMap ()->getGlobalElement (i);
160 for (local_ordinal_type i = 0; i < ExtElements.size (); ++i) {
161 mylist[i + numMyRowsA] = ExtElements[i];
164 RowMap_ =
rcp (
new map_type (global_invalid, mylist (),
167 Importer_ =
rcp (
new import_type (A_->getRowMap (), RowMap_));
172 ExtMap_ =
rcp (
new map_type (global_invalid, ExtElements (),
175 ExtImporter_ =
rcp (
new import_type (A_->getRowMap (), ExtMap_));
178 RCP<crs_matrix_type> ExtMatrix_nc =
179 rcp (
new crs_matrix_type (ExtMap_, ColMap_, 0));
180 ExtMatrix_nc->doImport (*A_, *ExtImporter_, Tpetra::INSERT);
181 ExtMatrix_nc->fillComplete (A_->getDomainMap (), RowMap_);
182 ExtMatrix_ = ExtMatrix_nc;
186 const size_t numMyRowsB = ExtMatrix_->getNodeNumRows ();
188 GST NumMyNonzeros_tmp = A_->getNodeNumEntries () + ExtMatrix_->getNodeNumEntries ();
189 GST NumMyRows_tmp = numMyRowsA + numMyRowsB;
191 GST inArray[2], outArray[2];
192 inArray[0] = NumMyNonzeros_tmp;
193 inArray[1] = NumMyRows_tmp;
196 reduceAll<int, GST> (* (A_->getComm ()), REDUCE_SUM, 2, inArray, outArray);
197 NumGlobalNonzeros_ = outArray[0];
198 NumGlobalRows_ = outArray[1];
205 MaxNumEntries_ = A_->getNodeMaxNumRowEntries ();
207 MaxNumEntries_ = ExtMatrix_->getNodeMaxNumRowEntries ();
212 RCP<row_graph_impl_type> graph =
213 rcp (
new row_graph_impl_type (A_->getGraph (),
214 ExtMatrix_->getGraph (),
223 graph_ = Teuchos::rcp_const_cast<
const row_graph_type>
224 (Teuchos::rcp_implicit_cast<row_graph_type> (graph));
226 Indices_.
resize (MaxNumEntries_);
227 Values_.
resize (MaxNumEntries_);
231 template<
class MatrixType>
235 return A_->getComm ();
241 template<
class MatrixType>
250 template<
class MatrixType>
259 template<
class MatrixType>
275 template<
class MatrixType>
283 template<
class MatrixType>
291 template<
class MatrixType>
294 return NumGlobalRows_;
298 template<
class MatrixType>
301 return NumGlobalRows_;
305 template<
class MatrixType>
308 return A_->getNodeNumRows () + ExtMatrix_->getNodeNumRows ();
312 template<
class MatrixType>
315 return this->getNodeNumRows ();
319 template<
class MatrixType>
320 typename MatrixType::global_ordinal_type
323 return A_->getIndexBase();
327 template<
class MatrixType>
330 return NumGlobalNonzeros_;
334 template<
class MatrixType>
337 return A_->getNodeNumEntries () + ExtMatrix_->getNodeNumEntries ();
341 template<
class MatrixType>
346 const local_ordinal_type localRow = RowMap_->getLocalElement (globalRow);
350 return getNumEntriesInLocalRow (localRow);
355 template<
class MatrixType>
361 const size_t numMyRowsA = A_->getNodeNumRows ();
362 if (as<size_t> (localRow) < numMyRowsA) {
363 return A_->getNumEntriesInLocalRow (localRow);
365 return ExtMatrix_->getNumEntriesInLocalRow (as<local_ordinal_type> (localRow - numMyRowsA));
370 template<
class MatrixType>
373 throw std::runtime_error(
"Ifpack2::OverlappingRowMatrix::getGlobalMaxNumRowEntries() not supported.");
377 template<
class MatrixType>
380 return MaxNumEntries_;
384 template<
class MatrixType>
391 template<
class MatrixType>
398 template<
class MatrixType>
405 template<
class MatrixType>
412 template<
class MatrixType>
418 size_t& NumEntries)
const
420 const local_ordinal_type LocalRow = RowMap_->getLocalElement (GlobalRow);
424 if (Teuchos::as<size_t> (LocalRow) < A_->getNodeNumRows ()) {
425 A_->getGlobalRowCopy (GlobalRow, Indices, Values, NumEntries);
427 ExtMatrix_->getGlobalRowCopy (GlobalRow, Indices, Values, NumEntries);
433 template<
class MatrixType>
439 size_t &NumEntries)
const
442 const size_t numMyRowsA = A_->getNodeNumRows ();
443 if (as<size_t> (LocalRow) < numMyRowsA) {
444 A_->getLocalRowCopy (LocalRow, Indices, Values, NumEntries);
446 ExtMatrix_->getLocalRowCopy (LocalRow - as<local_ordinal_type> (numMyRowsA),
447 Indices, Values, NumEntries);
452 template<
class MatrixType>
459 const local_ordinal_type LocalRow = RowMap_->getLocalElement (GlobalRow);
461 indices = Teuchos::null;
462 values = Teuchos::null;
464 if (Teuchos::as<size_t> (LocalRow) < A_->getNodeNumRows ()) {
465 A_->getGlobalRowView (GlobalRow, indices, values);
467 ExtMatrix_->getGlobalRowView (GlobalRow, indices, values);
473 template<
class MatrixType>
481 const size_t numMyRowsA = A_->getNodeNumRows ();
482 if (as<size_t> (LocalRow) < numMyRowsA) {
483 A_->getLocalRowView (LocalRow, indices, values);
485 ExtMatrix_->getLocalRowView (LocalRow - as<local_ordinal_type> (numMyRowsA),
491 template<
class MatrixType>
494 getLocalDiagCopy (Tpetra::Vector<scalar_type,local_ordinal_type,global_ordinal_type,node_type>& diag)
const
499 vector_type baseDiag(A_->getRowMap());
500 A_->getLocalDiagCopy(baseDiag);
501 Array<scalar_type> baseDiagVals(baseDiag.getLocalLength());
502 baseDiag.get1dCopy(baseDiagVals());
504 vector_type extDiag(ExtMatrix_->getRowMap());
505 ExtMatrix_->getLocalDiagCopy(extDiag);
506 Array<scalar_type> extDiagVals(extDiag.getLocalLength());
507 extDiag.get1dCopy(extDiagVals());
510 if (allDiagVals.
size() != baseDiagVals.size() + extDiagVals.size()) {
511 std::ostringstream errStr;
512 errStr <<
"Ifpack2::OverlappingRowMatrix::getLocalDiagCopy : Mismatch in diagonal lengths, "
513 << allDiagVals.
size() <<
" != " << baseDiagVals.size() <<
"+" << extDiagVals.size();
514 throw std::runtime_error(errStr.str());
516 for (Teuchos::Ordinal i=0; i<baseDiagVals.size(); ++i)
517 allDiagVals[i] = baseDiagVals[i];
518 Teuchos_Ordinal offset=baseDiagVals.
size();
519 for (Teuchos::Ordinal i=0; i<extDiagVals.size(); ++i)
520 allDiagVals[i+offset] = extDiagVals[i];
524 template<
class MatrixType>
527 leftScale (
const Tpetra::Vector<scalar_type, local_ordinal_type, global_ordinal_type, node_type>& )
529 throw std::runtime_error(
"Ifpack2::OverlappingRowMatrix does not support leftScale.");
533 template<
class MatrixType>
536 rightScale (
const Tpetra::Vector<scalar_type, local_ordinal_type, global_ordinal_type, node_type>& )
538 throw std::runtime_error(
"Ifpack2::OverlappingRowMatrix does not support leftScale.");
542 template<
class MatrixType>
543 typename OverlappingRowMatrix<MatrixType>::mag_type
546 throw std::runtime_error(
"Ifpack2::OverlappingRowMatrix does not support getFrobeniusNorm.");
550 template<
class MatrixType>
553 apply (
const Tpetra::MultiVector<scalar_type,local_ordinal_type,global_ordinal_type,node_type> &X,
554 Tpetra::MultiVector<scalar_type,local_ordinal_type,global_ordinal_type,node_type> &Y,
557 scalar_type beta)
const
559 using MV = Tpetra::MultiVector<scalar_type, local_ordinal_type,
560 global_ordinal_type, node_type>;
562 (X.getNumVectors() != Y.getNumVectors(), std::runtime_error,
563 "Ifpack2::OverlappingRowMatrix::apply: X.getNumVectors() = "
564 << X.getNumVectors() <<
" != Y.getNumVectors() = " << Y.getNumVectors()
567 auto X_d = X.getLocalViewDevice ();
568 auto Y_d = Y.getLocalViewDevice ();
570 if (X_d.data () >= Y_d.data () + Y_d.span ()) {
573 else if (Y_d.data () >= X_d.data () + X_d.span ()) {
578 this->apply (X_copy, Y, mode, alpha, beta);
581 const auto& rowMap0 = * (A_->getRowMap ());
582 const auto& colMap0 = * (A_->getColMap ());
585 A_->localApply (X_0, Y_0, mode, alpha, beta);
587 const auto& rowMap1 = * (ExtMatrix_->getRowMap ());
588 const auto& colMap1 = * (ExtMatrix_->getColMap ());
590 MV Y_1 (Y, mode ==
Teuchos::NO_TRANS ? rowMap1 : colMap1, A_->getNodeNumRows ());
591 ExtMatrix_->localApply (X_1, Y_1, mode, alpha, beta);
595 template<
class MatrixType>
598 importMultiVector (
const Tpetra::MultiVector<scalar_type,local_ordinal_type,global_ordinal_type,node_type> &X,
599 Tpetra::MultiVector<scalar_type,local_ordinal_type,global_ordinal_type,node_type> &OvX,
600 Tpetra::CombineMode CM)
602 OvX.doImport (X, *Importer_, CM);
606 template<
class MatrixType>
608 OverlappingRowMatrix<MatrixType>::
609 exportMultiVector (
const Tpetra::MultiVector<scalar_type,local_ordinal_type,global_ordinal_type,node_type> &OvX,
610 Tpetra::MultiVector<scalar_type,local_ordinal_type,global_ordinal_type,node_type> &X,
611 Tpetra::CombineMode CM)
613 X.doExport (OvX, *Importer_, CM);
617 template<
class MatrixType>
624 template<
class MatrixType>
630 template<
class MatrixType>
633 std::ostringstream oss;
634 if (isFillComplete()) {
635 oss <<
"{ isFillComplete: true"
636 <<
", global rows: " << getGlobalNumRows()
637 <<
", global columns: " << getGlobalNumCols()
638 <<
", global entries: " << getGlobalNumEntries()
642 oss <<
"{ isFillComplete: false"
643 <<
", global rows: " << getGlobalNumRows()
649 template<
class MatrixType>
670 RCP<const Teuchos::Comm<int> > comm = this->getComm();
671 const int myRank = comm->getRank();
672 const int numProcs = comm->getSize();
674 for (
size_t dec=10; dec<getGlobalNumRows(); dec *= 10) {
677 width = std::max<size_t> (width, as<size_t> (11)) + 2;
688 out << this->description() << std::endl;
697 out << endl <<
"Row map:" << endl;
699 getRowMap()->describe(out,vl);
701 if (getColMap() != null) {
702 if (getColMap() == getRowMap()) {
704 out << endl <<
"Column map is row map.";
709 out << endl <<
"Column map:" << endl;
711 getColMap()->describe(out,vl);
714 if (getDomainMap() != null) {
715 if (getDomainMap() == getRowMap()) {
717 out << endl <<
"Domain map is row map.";
720 else if (getDomainMap() == getColMap()) {
722 out << endl <<
"Domain map is column map.";
727 out << endl <<
"Domain map:" << endl;
729 getDomainMap()->describe(out,vl);
732 if (getRangeMap() != null) {
733 if (getRangeMap() == getDomainMap()) {
735 out << endl <<
"Range map is domain map." << endl;
738 else if (getRangeMap() == getRowMap()) {
740 out << endl <<
"Range map is row map." << endl;
745 out << endl <<
"Range map: " << endl;
747 getRangeMap()->describe(out,vl);
756 for (
int curRank = 0; curRank < numProcs; ++curRank) {
757 if (myRank == curRank) {
758 out <<
"Process rank: " << curRank << std::endl;
759 out <<
" Number of entries: " << getNodeNumEntries() << std::endl;
760 out <<
" Max number of entries per row: " << getNodeMaxNumRowEntries() << std::endl;
769 for (
int curRank = 0; curRank < numProcs; ++curRank) {
770 if (myRank == curRank) {
771 out << std::setw(width) <<
"Proc Rank"
772 << std::setw(width) <<
"Global Row"
773 << std::setw(width) <<
"Num Entries";
775 out << std::setw(width) <<
"(Index,Value)";
778 for (
size_t r = 0; r < getNodeNumRows (); ++r) {
779 const size_t nE = getNumEntriesInLocalRow(r);
780 typename MatrixType::global_ordinal_type gid = getRowMap()->getGlobalElement(r);
781 out << std::setw(width) << myRank
782 << std::setw(width) << gid
783 << std::setw(width) << nE;
785 if (isGloballyIndexed()) {
786 ArrayView<const typename MatrixType::global_ordinal_type> rowinds;
787 ArrayView<const typename MatrixType::scalar_type> rowvals;
788 getGlobalRowView (gid, rowinds, rowvals);
789 for (
size_t j = 0; j < nE; ++j) {
790 out <<
" (" << rowinds[j]
791 <<
", " << rowvals[j]
795 else if (isLocallyIndexed()) {
796 ArrayView<const typename MatrixType::local_ordinal_type> rowinds;
797 ArrayView<const typename MatrixType::scalar_type> rowvals;
798 getLocalRowView (r, rowinds, rowvals);
799 for (
size_t j=0; j < nE; ++j) {
800 out <<
" (" << getColMap()->getGlobalElement(rowinds[j])
801 <<
", " << rowvals[j]
816 out <<
"===========\nlocal matrix\n=================" << std::endl;
820 out <<
"===========\nend of local matrix\n=================" << std::endl;
823 out <<
"=================\nghost matrix\n=================" << std::endl;
827 out <<
"===========\nend of ghost matrix\n=================" << std::endl;
832 template<
class MatrixType>
834 OverlappingRowMatrix<MatrixType>::getUnderlyingMatrix()
const
839 template<
class MatrixType>
841 OverlappingRowMatrix<MatrixType>::getExtMatrix()
const
846 template<
class MatrixType>
849 return ExtHaloStarts_();
855 #define IFPACK2_OVERLAPPINGROWMATRIX_INSTANT(S,LO,GO,N) \
856 template class Ifpack2::OverlappingRowMatrix< Tpetra::RowMatrix<S, LO, GO, N> >;
858 #endif // IFPACK2_OVERLAPPINGROWMATRIX_DEF_HPP
virtual bool isGloballyIndexed() const
Whether this matrix is globally indexed.
Definition: Ifpack2_OverlappingRowMatrix_def.hpp:399
virtual mag_type getFrobeniusNorm() const
Returns the Frobenius norm of the matrix.
Definition: Ifpack2_OverlappingRowMatrix_def.hpp:544
virtual size_t getNodeNumRows() const
The number of rows owned by the calling process.
Definition: Ifpack2_OverlappingRowMatrix_def.hpp:306
#define TEUCHOS_TEST_FOR_EXCEPTION(throw_exception_test, Exception, msg)
virtual bool isFillComplete() const
true if fillComplete() has been called, else false.
Definition: Ifpack2_OverlappingRowMatrix_def.hpp:406
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:527
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:243
virtual global_size_t getGlobalNumRows() const
The global number of rows in this matrix.
Definition: Ifpack2_OverlappingRowMatrix_def.hpp:292
virtual global_size_t getGlobalNumCols() const
The global number of columns in this matrix.
Definition: Ifpack2_OverlappingRowMatrix_def.hpp:299
TEUCHOS_DEPRECATED RCP< T > rcp(T *p, Dealloc_T dealloc, bool owns_mem)
virtual bool isLocallyIndexed() const
Whether this matrix is locally indexed.
Definition: Ifpack2_OverlappingRowMatrix_def.hpp:392
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:277
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:261
Sparse graph (Tpetra::RowGraph subclass) with ghost rows.
Definition: Ifpack2_Details_OverlappingRowGraph_decl.hpp:65
basic_FancyOStream & setOutputToRootOnly(const int rootRank)
void resize(size_type new_size, const value_type &x=value_type())
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:344
virtual size_t getNodeNumEntries() const
The number of entries in this matrix owned by the calling process.
Definition: Ifpack2_OverlappingRowMatrix_def.hpp:335
virtual global_size_t getGlobalNumEntries() const
The global number of entries in this matrix.
Definition: Ifpack2_OverlappingRowMatrix_def.hpp:328
virtual bool hasTransposeApply() const
Whether this operator's apply() method can apply the adjoint (transpose).
Definition: Ifpack2_OverlappingRowMatrix_def.hpp:618
virtual global_ordinal_type getIndexBase() const
The index base for global indices for this matrix.
Definition: Ifpack2_OverlappingRowMatrix_def.hpp:321
virtual bool hasColMap() const
Whether this matrix has a column Map.
Definition: Ifpack2_OverlappingRowMatrix_def.hpp:385
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:358
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:536
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:285
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:455
TypeTo as(const TypeFrom &t)
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:494
Sparse matrix (Tpetra::RowMatrix subclass) with ghost rows.
Definition: Ifpack2_OverlappingRowMatrix_decl.hpp:58
OverlappingRowMatrix(const Teuchos::RCP< const row_matrix_type > &A, const int overlapLevel)
Definition: Ifpack2_OverlappingRowMatrix_def.hpp:58
virtual size_t getNodeMaxNumRowEntries() const
The maximum number of entries in any row on the calling process.
Definition: Ifpack2_OverlappingRowMatrix_def.hpp:378
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:553
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:436
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:415
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:252
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:476
virtual bool supportsRowViews() const
true if row views are supported, else false.
Definition: Ifpack2_OverlappingRowMatrix_def.hpp:625
virtual size_t getGlobalMaxNumRowEntries() const
The maximum number of entries in any row on any process.
Definition: Ifpack2_OverlappingRowMatrix_def.hpp:371
virtual size_t getNodeNumCols() const
The number of columns owned by the calling process.
Definition: Ifpack2_OverlappingRowMatrix_def.hpp:313