Ifpack2 Templated Preconditioning Package  Version 1.0
Ifpack2_SparsityFilter_def.hpp
1 /*@HEADER
2 // ***********************************************************************
3 //
4 // Ifpack2: Tempated Object-Oriented Algebraic Preconditioner Package
5 // Copyright (2009) Sandia Corporation
6 //
7 // Under terms of Contract DE-AC04-94AL85000, there is a non-exclusive
8 // license for use of this work by or on behalf of the U.S. Government.
9 //
10 // Redistribution and use in source and binary forms, with or without
11 // modification, are permitted provided that the following conditions are
12 // met:
13 //
14 // 1. Redistributions of source code must retain the above copyright
15 // notice, this list of conditions and the following disclaimer.
16 //
17 // 2. Redistributions in binary form must reproduce the above copyright
18 // notice, this list of conditions and the following disclaimer in the
19 // documentation and/or other materials provided with the distribution.
20 //
21 // 3. Neither the name of the Corporation nor the names of the
22 // contributors may be used to endorse or promote products derived from
23 // this software without specific prior written permission.
24 //
25 // THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
26 // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
27 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
28 // PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
29 // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
30 // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
31 // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
32 // PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
33 // LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
34 // NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
35 // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
36 //
37 // Questions? Contact Michael A. Heroux (maherou@sandia.gov)
38 //
39 // ***********************************************************************
40 //@HEADER
41 */
42 
43 #ifndef IFPACK2_SPARSITYFILTER_DEF_HPP
44 #define IFPACK2_SPARSITYFILTER_DEF_HPP
45 
46 #include "Tpetra_Map.hpp"
47 #include "Tpetra_MultiVector.hpp"
48 #include "Tpetra_Vector.hpp"
49 
50 #include <algorithm>
51 #include <vector>
52 
53 namespace Ifpack2 {
54 
55 //==========================================================================
56 template<class MatrixType>
57 SparsityFilter<MatrixType>::SparsityFilter(const Teuchos::RCP<const Tpetra::RowMatrix<Scalar,LocalOrdinal,GlobalOrdinal,Node> >& Matrix,
58  size_t AllowedNumEntries,
59  LocalOrdinal AllowedBandwidth):
60  A_(Matrix),
61  AllowedNumEntries_(AllowedNumEntries),
62  AllowedBandwidth_(AllowedBandwidth),
63  NumRows_(0),
64  NumNonzeros_(0),
65  MaxNumEntries_(0),
66  MaxNumEntriesA_(0)
67 {
68 
69  // use this filter only on serial matrices
70  TEUCHOS_TEST_FOR_EXCEPTION(
71  A_->getComm()->getSize() != 1 || A_->getNodeNumRows() != A_->getGlobalNumRows(),
72  std::runtime_error, "Ifpack2::SparsityFilter: "
73  "This class may only be used when A.getComm()->getSize() == 1.");
74 
75  // localized matrix has all the local rows of Matrix
76  NumRows_ = A_->getNodeNumRows();
77 
78  // NodeNumEntries_ will contain the actual number of nonzeros
79  // for each localized row (that is, without external nodes,
80  // and always with the diagonal entry)
81  NumEntries_.resize(NumRows_);
82 
83  // tentative value for MaxNumEntries. This is the number of
84  // nonzeros in the local matrix
85  MaxNumEntries_ = A_->getNodeMaxNumRowEntries();
86  MaxNumEntriesA_ = A_->getNodeMaxNumRowEntries();
87 
88  // ExtractMyRowCopy() will use these vectors
89  Indices_.resize(MaxNumEntries_);
90  Values_.resize(MaxNumEntries_);
91 
92  size_t ActualMaxNumEntries = 0;
93  for (size_t i = 0 ; i < NumRows_ ; ++i) {
94  NumEntries_[i] = MaxNumEntriesA_;
95  size_t Nnz;
96  A_->getLocalRowCopy(i,Indices_,Values_,Nnz);
97 
98  NumNonzeros_ += Nnz;
99  NumEntries_[i] = Nnz;
100  if (Nnz > ActualMaxNumEntries)
101  ActualMaxNumEntries = Nnz;
102  }
103 
104  MaxNumEntries_ = ActualMaxNumEntries;
105 }
106 
107 //=========================================================================
108 template<class MatrixType>
110 
111 //==========================================================================
112 template<class MatrixType>
113 Teuchos::RCP<const Teuchos::Comm<int> > SparsityFilter<MatrixType>::getComm() const
114 {
115  return A_->getComm();
116 }
117 
118 //==========================================================================
119 template<class MatrixType>
120 Teuchos::RCP <typename MatrixType::node_type> SparsityFilter<MatrixType>::getNode() const
121 {
122  return A_->getNode();
123 }
124 
125 //==========================================================================
126 template<class MatrixType>
127 Teuchos::RCP<const Tpetra::Map<typename MatrixType::local_ordinal_type,
128  typename MatrixType::global_ordinal_type,
129  typename MatrixType::node_type> >
131 {
132  return A_->getRowMap();
133 }
134 
135 //==========================================================================
136 template<class MatrixType>
137 Teuchos::RCP<const Tpetra::Map<typename MatrixType::local_ordinal_type,
138  typename MatrixType::global_ordinal_type,
139  typename MatrixType::node_type> >
141 {
142  return A_->getColMap();
143 }
144 
145 //==========================================================================
146 template<class MatrixType>
147 Teuchos::RCP<const Tpetra::Map<typename MatrixType::local_ordinal_type,
148  typename MatrixType::global_ordinal_type,
149  typename MatrixType::node_type> >
151 {
152  return A_->getDomainMap();
153 }
154 
155 //==========================================================================
156 template<class MatrixType>
157 Teuchos::RCP<const Tpetra::Map<typename MatrixType::local_ordinal_type,
158  typename MatrixType::global_ordinal_type,
159  typename MatrixType::node_type> >
161 {
162  return A_->getRangeMap();
163 }
164 
165 //==========================================================================
166 template<class MatrixType>
167 Teuchos::RCP<const Tpetra::RowGraph<typename MatrixType::local_ordinal_type,
168  typename MatrixType::global_ordinal_type,
169  typename MatrixType::node_type> >
171 {
172  throw std::runtime_error("Ifpack2::SparsityFilter: does not support getGraph.");
173 }
174 
175 //==========================================================================
176 template<class MatrixType>
178 {
179  return NumRows_;
180 }
181 
182 //==========================================================================
183 template<class MatrixType>
185 {
186  return NumRows_;
187 }
188 
189 //==========================================================================
190 template<class MatrixType>
192 {
193  return NumRows_;
194 }
195 
196 //==========================================================================
197 
198 template<class MatrixType>
200 {
201  return NumRows_;
202 }
203 
204 //==========================================================================
205 template<class MatrixType>
206 typename MatrixType::global_ordinal_type SparsityFilter<MatrixType>::getIndexBase() const
207 {
208  return A_->getIndexBase();
209 }
210 
211 //==========================================================================
212 template<class MatrixType>
214 {
215  return NumNonzeros_;
216 }
217 
218 //==========================================================================
219 template<class MatrixType>
221 {
222  return NumNonzeros_;
223 }
224 
225 //==========================================================================
226 template<class MatrixType>
227 size_t SparsityFilter<MatrixType>::getNumEntriesInGlobalRow(GlobalOrdinal globalRow) const
228 {
229  throw std::runtime_error("Ifpack2::SparsityFilter does not implement getNumEntriesInGlobalRow.");
230 }
231 
232 //==========================================================================
233 template<class MatrixType>
234 size_t SparsityFilter<MatrixType>::getNumEntriesInLocalRow(LocalOrdinal localRow) const
235 {
236  return NumEntries_[localRow];
237 }
238 
239 //==========================================================================
240 template<class MatrixType>
242 {
243  return A_->getGlobalNumDiags();
244 }
245 
246 //==========================================================================
247 template<class MatrixType>
249 {
250  return A_->getNodeNumDiags();
251 }
252 
253 //==========================================================================
254 template<class MatrixType>
256 {
257  return MaxNumEntries_;
258 }
259 
260 //==========================================================================
261 template<class MatrixType>
263 {
264  return MaxNumEntries_;
265 }
266 
267 //==========================================================================
268 template<class MatrixType>
270 {
271  return true;
272 }
273 
274 //==========================================================================
275 template<class MatrixType>
277 {
278  return A_->isLowerTriangular();
279 }
280 
281 //==========================================================================
282 template<class MatrixType>
284 {
285  return A_->isUpperTriangular();
286 }
287 
288 //==========================================================================
289 template<class MatrixType>
291 {
292  return A_->isLocallyIndexed();
293 }
294 
295 //==========================================================================
296 template<class MatrixType>
298 {
299  return A_->isGloballyIndexed();
300 }
301 
302 //==========================================================================
303 template<class MatrixType>
305 {
306  return A_->isFillComplete();
307 }
308 
309 //==========================================================================
310 template<class MatrixType>
311 void SparsityFilter<MatrixType>::getGlobalRowCopy(GlobalOrdinal GlobalRow,
312  const Teuchos::ArrayView<GlobalOrdinal> &Indices,
313  const Teuchos::ArrayView<Scalar> &Values,
314  size_t &NumEntries) const
315 {
316  throw std::runtime_error("Ifpack2::SparsityFilter does not implement getGlobalRowCopy.");
317 }
318 
319 //==========================================================================
320 template<class MatrixType>
322  const Teuchos::ArrayView<LocalOrdinal> &Indices,
323  const Teuchos::ArrayView<Scalar> &Values,
324  size_t &NumEntries) const
325 {
326  TEUCHOS_TEST_FOR_EXCEPTION((LocalRow < 0 || (size_t) LocalRow >= NumRows_ || (size_t) Indices.size() < NumEntries_[LocalRow]), std::runtime_error, "Ifpack2::SparsityFilter::getLocalRowCopy invalid row or array size.");
327 
328  // Note: This function will work correctly if called by apply, say, with Indices_ and Values_ as
329  // parameters. The structure of the loop below should make that obvious.
330 
331  // always extract using the object Values_ and Indices_.
332  // This is because I need more space than that given by
333  // the user (for the external nodes)
334  size_t A_NumEntries=0;
335  A_->getLocalRowCopy(LocalRow,Indices_(),Values_(),A_NumEntries);
336  magnitudeType Threshold = Teuchos::ScalarTraits<magnitudeType>::zero();
337  std::vector<magnitudeType> Values2(A_NumEntries,Teuchos::ScalarTraits<magnitudeType>::zero());
338 
339  if (A_NumEntries > AllowedNumEntries_) {
340  size_t count = 0;
341  for (size_t i = 0 ; i < A_NumEntries ; ++i) {
342  // skip diagonal entry (which is always inserted)
343  if (Indices_[i] == LocalRow)
344  continue;
345  // put magnitude
346  Values2[count] = Teuchos::ScalarTraits<Scalar>::magnitude(Values_[i]);
347  count++;
348  }
349 
350  // sort in descending order
351  std::sort(Values2.rbegin(),Values2.rend());
352  // get the cut-off value
353  Threshold = Values2[AllowedNumEntries_ - 1];
354  }
355 
356 
357  // loop over all nonzero elements of row MyRow,
358  // and drop elements below specified threshold.
359  // Also, add value to zero diagonal
360  NumEntries = 0;
361  for (size_t i = 0 ; i < A_NumEntries ; ++i) {
362  if (std::abs(Indices_[i] - LocalRow) > AllowedBandwidth_)
363  continue;
364 
365  if ((Indices_[i] != LocalRow) && (Teuchos::ScalarTraits<Scalar>::magnitude(Values_[i]) < Threshold))
366  continue;
367 
368  Values[NumEntries] = Values_[i];
369  Indices[NumEntries] = Indices_[i];
370 
371  NumEntries++;
372  if (NumEntries > AllowedNumEntries_)
373  break;
374  }
375 
376 }
377 
378 //==========================================================================
379 template<class MatrixType>
380 void SparsityFilter<MatrixType>::getGlobalRowView(GlobalOrdinal GlobalRow,
381  Teuchos::ArrayView<const GlobalOrdinal> &indices,
382  Teuchos::ArrayView<const Scalar> &values) const
383 {
384  throw std::runtime_error("Ifpack2::SparsityFilter: does not support getGlobalRowView.");
385 }
386 
387 //==========================================================================
388 template<class MatrixType>
390  Teuchos::ArrayView<const LocalOrdinal> &indices,
391  Teuchos::ArrayView<const Scalar> &values) const
392 {
393  throw std::runtime_error("Ifpack2::SparsityFilter: does not support getLocalRowView.");
394 }
395 
396 //==========================================================================
397 template<class MatrixType>
398 void SparsityFilter<MatrixType>::getLocalDiagCopy(Tpetra::Vector<Scalar,LocalOrdinal,GlobalOrdinal,Node> &diag) const
399 {
400  // This is somewhat dubious as to how the maps match.
401  return A_->getLocalDiagCopy(diag);
402 }
403 
404 //==========================================================================
405 template<class MatrixType>
406 void SparsityFilter<MatrixType>::leftScale(const Tpetra::Vector<Scalar, LocalOrdinal, GlobalOrdinal, Node>& x)
407 {
408  throw std::runtime_error("Ifpack2::SparsityFilter does not support leftScale.");
409 }
410 
411 //==========================================================================
412 template<class MatrixType>
413 void SparsityFilter<MatrixType>::rightScale(const Tpetra::Vector<Scalar, LocalOrdinal, GlobalOrdinal, Node>& x)
414 {
415  throw std::runtime_error("Ifpack2::SparsityFilter does not support rightScale.");
416 }
417 
418 //==========================================================================
419 template<class MatrixType>
420 void SparsityFilter<MatrixType>::apply(const Tpetra::MultiVector<Scalar,LocalOrdinal,GlobalOrdinal,Node> &X,
421  Tpetra::MultiVector<Scalar,LocalOrdinal,GlobalOrdinal,Node> &Y,
422  Teuchos::ETransp mode,
423  Scalar alpha,
424  Scalar beta) const
425 {
426  // Note: This isn't AztecOO compliant. But neither was Ifpack's version.
427  // Note: The localized maps mean the matvec is trivial (and has no import)
428  TEUCHOS_TEST_FOR_EXCEPTION(X.getNumVectors() != Y.getNumVectors(), std::runtime_error,
429  "Ifpack2::SparsityFilter::apply ERROR: X.getNumVectors() != Y.getNumVectors().");
430 
431  Scalar zero = Teuchos::ScalarTraits<Scalar>::zero();
432  Teuchos::ArrayRCP<Teuchos::ArrayRCP<const Scalar> > x_ptr = X.get2dView();
433  Teuchos::ArrayRCP<Teuchos::ArrayRCP<Scalar> > y_ptr = Y.get2dViewNonConst();
434 
435  Y.putScalar(zero);
436  size_t NumVectors = Y.getNumVectors();
437 
438  for (size_t i = 0 ; i < NumRows_ ; ++i) {
439  size_t Nnz;
440  // Use this class's getrow to make the below code simpler
441  getLocalRowCopy(i,Indices_(),Values_(),Nnz);
442  if (mode==Teuchos::NO_TRANS){
443  for (size_t j = 0 ; j < Nnz ; ++j)
444  for (size_t k = 0 ; k < NumVectors ; ++k)
445  y_ptr[k][i] += Values_[j] * x_ptr[k][Indices_[j]];
446  }
447  else if (mode==Teuchos::TRANS){
448  for (size_t j = 0 ; j < Nnz ; ++j)
449  for (size_t k = 0 ; k < NumVectors ; ++k)
450  y_ptr[k][Indices_[j]] += Values_[j] * x_ptr[k][i];
451  }
452  else { //mode==Teuchos::CONJ_TRANS
453  for (size_t j = 0 ; j < Nnz ; ++j)
454  for (size_t k = 0 ; k < NumVectors ; ++k)
455  y_ptr[k][Indices_[j]] += Teuchos::ScalarTraits<Scalar>::conjugate(Values_[j]) * x_ptr[k][i];
456  }
457  }
458 }
459 
460 
461 //==========================================================================
462 template<class MatrixType>
464 {
465  return true;
466 }
467 
468 //==========================================================================
469 template<class MatrixType>
471 {
472  return false;
473 }
474 
475 //==========================================================================
476 template<class MatrixType>
477 typename SparsityFilter<MatrixType>::mag_type SparsityFilter<MatrixType>::getFrobeniusNorm() const
478 {
479  throw std::runtime_error("Ifpack2::SparsityFilter does not implement getFrobeniusNorm.");
480 }
481 
482 } // namespace Ifpack2
483 
484 #define IFPACK2_SPARSITYFILTER_INSTANT(S,LO,GO,N) \
485  template class Ifpack2::SparsityFilter< Tpetra::RowMatrix<S, LO, GO, N> >;
486 
487 #endif
virtual void getLocalDiagCopy(Tpetra::Vector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &diag) const
Get a copy of the diagonal entries owned by this node, with local row indices.
Definition: Ifpack2_SparsityFilter_def.hpp:398
virtual size_t getNodeNumCols() const
Returns the number of columns needed to apply the forward operator on this node, i.e., the number of elements listed in the column map.
Definition: Ifpack2_SparsityFilter_def.hpp:199
virtual size_t getGlobalMaxNumRowEntries() const
Returns the maximum number of entries across all rows/columns on all nodes.
Definition: Ifpack2_SparsityFilter_def.hpp:255
virtual global_size_t getGlobalNumRows() const
Returns the number of global rows in this matrix.
Definition: Ifpack2_SparsityFilter_def.hpp:177
virtual void getGlobalRowCopy(GlobalOrdinal GlobalRow, const Teuchos::ArrayView< GlobalOrdinal > &Indices, const Teuchos::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...
Definition: Ifpack2_SparsityFilter_def.hpp:311
virtual global_size_t getGlobalNumDiags() const
Returns the number of global diagonal entries, based on global row/column index comparisons.
Definition: Ifpack2_SparsityFilter_def.hpp:241
virtual bool supportsRowViews() const
Returns true if RowViews are supported.
Definition: Ifpack2_SparsityFilter_def.hpp:470
virtual size_t getNodeNumDiags() const
Returns the number of local diagonal entries, based on global row/column index comparisons.
Definition: Ifpack2_SparsityFilter_def.hpp:248
virtual ~SparsityFilter()
Destructor.
Definition: Ifpack2_SparsityFilter_def.hpp:109
virtual bool hasColMap() const
Indicates whether this matrix has a well-defined column map.
Definition: Ifpack2_SparsityFilter_def.hpp:269
virtual Teuchos::RCP< const Teuchos::Comm< int > > getComm() const
Returns the communicator.
Definition: Ifpack2_SparsityFilter_def.hpp:113
SparsityFilter(const Teuchos::RCP< const row_matrix_type > &Matrix, size_t AllowedNumEntries, LocalOrdinal AllowedBandwidth=-Teuchos::ScalarTraits< LocalOrdinal >::one())
Constructor.
Definition: Ifpack2_SparsityFilter_def.hpp:57
virtual size_t getNumEntriesInGlobalRow(GlobalOrdinal globalRow) const
Returns the current number of entries on this node in the specified global row.
Definition: Ifpack2_SparsityFilter_def.hpp:227
virtual bool isGloballyIndexed() const
If matrix indices are in the global range, this function returns true. Otherwise, this function retur...
Definition: Ifpack2_SparsityFilter_def.hpp:297
virtual bool isLocallyIndexed() const
If matrix indices are in the local range, this function returns true. Otherwise, this function return...
Definition: Ifpack2_SparsityFilter_def.hpp:290
LinearOp zero(const VectorSpace &vs)
virtual void getLocalRowView(LocalOrdinal DropRow, Teuchos::ArrayView< const LocalOrdinal > &indices, Teuchos::ArrayView< const Scalar > &values) const
Extract a const, non-persisting view of local indices in a specified row of the matrix.
Definition: Ifpack2_SparsityFilter_def.hpp:389
virtual size_t getNodeMaxNumRowEntries() const
Returns the maximum number of entries across all rows/columns on this node.
Definition: Ifpack2_SparsityFilter_def.hpp:262
virtual bool hasTransposeApply() const
Indicates whether this operator supports applying the adjoint operator.
Definition: Ifpack2_SparsityFilter_def.hpp:463
virtual bool isFillComplete() const
Returns true if fillComplete() has been called.
Definition: Ifpack2_SparsityFilter_def.hpp:304
virtual mag_type getFrobeniusNorm() const
Returns the Frobenius norm of the matrix.
Definition: Ifpack2_SparsityFilter_def.hpp:477
virtual GlobalOrdinal getIndexBase() const
Returns the index base for global indices for this matrix.
Definition: Ifpack2_SparsityFilter_def.hpp:206
virtual global_size_t getGlobalNumEntries() const
Returns the global number of entries in this matrix.
Definition: Ifpack2_SparsityFilter_def.hpp:213
virtual size_t getNumEntriesInLocalRow(LocalOrdinal localRow) const
Returns the current number of entries on this node in the specified local row.
Definition: Ifpack2_SparsityFilter_def.hpp:234
virtual Teuchos::RCP< const Tpetra::Map< LocalOrdinal, GlobalOrdinal, Node > > getRangeMap() const
Returns the Map that describes the range distribution in this matrix.
Definition: Ifpack2_SparsityFilter_def.hpp:160
virtual void apply(const Tpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &X, Tpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &Y, Teuchos::ETransp mode=Teuchos::NO_TRANS, Scalar alpha=Teuchos::ScalarTraits< Scalar >::one(), Scalar beta=Teuchos::ScalarTraits< Scalar >::zero()) const
Computes the operator-multivector application.
Definition: Ifpack2_SparsityFilter_def.hpp:420
virtual void getGlobalRowView(GlobalOrdinal GlobalRow, Teuchos::ArrayView< const GlobalOrdinal > &indices, Teuchos::ArrayView< const Scalar > &values) const
Extract a const, non-persisting view of global indices in a specified row of the matrix.
Definition: Ifpack2_SparsityFilter_def.hpp:380
virtual Teuchos::RCP< const Tpetra::Map< LocalOrdinal, GlobalOrdinal, Node > > getRowMap() const
Returns the Map that describes the row distribution in this matrix.
Definition: Ifpack2_SparsityFilter_def.hpp:130
virtual void getLocalRowCopy(LocalOrdinal DropRow, const Teuchos::ArrayView< LocalOrdinal > &Indices, const Teuchos::ArrayView< Scalar > &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_SparsityFilter_def.hpp:321
virtual bool isUpperTriangular() const
Indicates whether this matrix is upper triangular.
Definition: Ifpack2_SparsityFilter_def.hpp:283
virtual void rightScale(const Tpetra::Vector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &x)
Scales the RowMatrix on the right with the Vector x.
Definition: Ifpack2_SparsityFilter_def.hpp:413
virtual void leftScale(const Tpetra::Vector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &x)
Scales the RowMatrix on the left with the Vector x.
Definition: Ifpack2_SparsityFilter_def.hpp:406
virtual global_size_t getGlobalNumCols() const
Returns the number of global columns in this matrix.
Definition: Ifpack2_SparsityFilter_def.hpp:184
virtual bool isLowerTriangular() const
Indicates whether this matrix is lower triangular.
Definition: Ifpack2_SparsityFilter_def.hpp:276
Preconditioners and smoothers for Tpetra sparse matrices.
Definition: Ifpack2_AdditiveSchwarz_decl.hpp:72
virtual Teuchos::RCP< const Tpetra::Map< LocalOrdinal, GlobalOrdinal, Node > > getDomainMap() const
Returns the Map that describes the domain distribution in this matrix.
Definition: Ifpack2_SparsityFilter_def.hpp:150
virtual Teuchos::RCP< const Tpetra::RowGraph< LocalOrdinal, GlobalOrdinal, Node > > getGraph() const
Returns the RowGraph associated with this matrix.
Definition: Ifpack2_SparsityFilter_def.hpp:170
virtual size_t getNodeNumEntries() const
Returns the local number of entries in this matrix.
Definition: Ifpack2_SparsityFilter_def.hpp:220
virtual size_t getNodeNumRows() const
Returns the number of rows owned on the calling node.
Definition: Ifpack2_SparsityFilter_def.hpp:191
virtual Teuchos::RCP< const Tpetra::Map< LocalOrdinal, GlobalOrdinal, Node > > getColMap() const
Returns the Map that describes the column distribution in this matrix.
Definition: Ifpack2_SparsityFilter_def.hpp:140
virtual Teuchos::RCP< Node > getNode() const
Returns the underlying node.
Definition: Ifpack2_SparsityFilter_def.hpp:120