Ifpack2 Templated Preconditioning Package  Version 1.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Ifpack2_SparsityFilter_def.hpp
1 /*@HEADER
2 // ***********************************************************************
3 //
4 // Ifpack2: Templated 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
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>
114 {
115  return A_->getComm();
116 }
117 
118 #ifdef TPETRA_ENABLE_DEPRECATED_CODE
119 //==========================================================================
120 template<class MatrixType>
121 TPETRA_DEPRECATED
123 {
124  return Teuchos::null;
125 }
126 #endif // TPETRA_ENABLE_DEPRECATED_CODE
127 
128 //==========================================================================
129 template<class MatrixType>
130 Teuchos::RCP<const Tpetra::Map<typename MatrixType::local_ordinal_type,
131  typename MatrixType::global_ordinal_type,
132  typename MatrixType::node_type> >
134 {
135  return A_->getRowMap();
136 }
137 
138 //==========================================================================
139 template<class MatrixType>
140 Teuchos::RCP<const Tpetra::Map<typename MatrixType::local_ordinal_type,
141  typename MatrixType::global_ordinal_type,
142  typename MatrixType::node_type> >
144 {
145  return A_->getColMap();
146 }
147 
148 //==========================================================================
149 template<class MatrixType>
150 Teuchos::RCP<const Tpetra::Map<typename MatrixType::local_ordinal_type,
151  typename MatrixType::global_ordinal_type,
152  typename MatrixType::node_type> >
154 {
155  return A_->getDomainMap();
156 }
157 
158 //==========================================================================
159 template<class MatrixType>
160 Teuchos::RCP<const Tpetra::Map<typename MatrixType::local_ordinal_type,
161  typename MatrixType::global_ordinal_type,
162  typename MatrixType::node_type> >
164 {
165  return A_->getRangeMap();
166 }
167 
168 //==========================================================================
169 template<class MatrixType>
170 Teuchos::RCP<const Tpetra::RowGraph<typename MatrixType::local_ordinal_type,
171  typename MatrixType::global_ordinal_type,
172  typename MatrixType::node_type> >
174 {
175  throw std::runtime_error("Ifpack2::SparsityFilter: does not support getGraph.");
176 }
177 
178 //==========================================================================
179 template<class MatrixType>
181 {
182  return NumRows_;
183 }
184 
185 //==========================================================================
186 template<class MatrixType>
188 {
189  return NumRows_;
190 }
191 
192 //==========================================================================
193 template<class MatrixType>
195 {
196  return NumRows_;
197 }
198 
199 //==========================================================================
200 
201 template<class MatrixType>
203 {
204  return NumRows_;
205 }
206 
207 //==========================================================================
208 template<class MatrixType>
209 typename MatrixType::global_ordinal_type SparsityFilter<MatrixType>::getIndexBase() const
210 {
211  return A_->getIndexBase();
212 }
213 
214 //==========================================================================
215 template<class MatrixType>
217 {
218  return NumNonzeros_;
219 }
220 
221 //==========================================================================
222 template<class MatrixType>
224 {
225  return NumNonzeros_;
226 }
227 
228 //==========================================================================
229 template<class MatrixType>
230 size_t SparsityFilter<MatrixType>::getNumEntriesInGlobalRow(GlobalOrdinal /* globalRow */) const
231 {
232  throw std::runtime_error("Ifpack2::SparsityFilter does not implement getNumEntriesInGlobalRow.");
233 }
234 
235 //==========================================================================
236 template<class MatrixType>
237 size_t SparsityFilter<MatrixType>::getNumEntriesInLocalRow(LocalOrdinal localRow) const
238 {
239  return NumEntries_[localRow];
240 }
241 
242 //==========================================================================
243 template<class MatrixType>
245 {
246  return MaxNumEntries_;
247 }
248 
249 //==========================================================================
250 template<class MatrixType>
252 {
253  return MaxNumEntries_;
254 }
255 
256 //==========================================================================
257 template<class MatrixType>
259 {
260  return true;
261 }
262 
263 //==========================================================================
264 template<class MatrixType>
266 {
267  return A_->isLocallyIndexed();
268 }
269 
270 //==========================================================================
271 template<class MatrixType>
273 {
274  return A_->isGloballyIndexed();
275 }
276 
277 //==========================================================================
278 template<class MatrixType>
280 {
281  return A_->isFillComplete();
282 }
283 
284 //==========================================================================
285 template<class MatrixType>
286 void SparsityFilter<MatrixType>::getGlobalRowCopy(GlobalOrdinal /* GlobalRow */,
287  const Teuchos::ArrayView<GlobalOrdinal> &/* Indices */,
288  const Teuchos::ArrayView<Scalar> &/* Values */,
289  size_t &/* NumEntries */) const
290 {
291  throw std::runtime_error("Ifpack2::SparsityFilter does not implement getGlobalRowCopy.");
292 }
293 
294 //==========================================================================
295 template<class MatrixType>
297  const Teuchos::ArrayView<LocalOrdinal> &Indices,
298  const Teuchos::ArrayView<Scalar> &Values,
299  size_t &NumEntries) const
300 {
301  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.");
302 
303  // Note: This function will work correctly if called by apply, say, with Indices_ and Values_ as
304  // parameters. The structure of the loop below should make that obvious.
305 
306  // always extract using the object Values_ and Indices_.
307  // This is because I need more space than that given by
308  // the user (for the external nodes)
309  size_t A_NumEntries=0;
310  A_->getLocalRowCopy(LocalRow,Indices_(),Values_(),A_NumEntries);
311  magnitudeType Threshold = Teuchos::ScalarTraits<magnitudeType>::zero();
312  std::vector<magnitudeType> Values2(A_NumEntries,Teuchos::ScalarTraits<magnitudeType>::zero());
313 
314  if (A_NumEntries > AllowedNumEntries_) {
315  size_t count = 0;
316  for (size_t i = 0 ; i < A_NumEntries ; ++i) {
317  // skip diagonal entry (which is always inserted)
318  if (Indices_[i] == LocalRow)
319  continue;
320  // put magnitude
321  Values2[count] = Teuchos::ScalarTraits<Scalar>::magnitude(Values_[i]);
322  count++;
323  }
324 
325  // sort in descending order
326  std::sort(Values2.rbegin(),Values2.rend());
327  // get the cut-off value
328  Threshold = Values2[AllowedNumEntries_ - 1];
329  }
330 
331 
332  // loop over all nonzero elements of row MyRow,
333  // and drop elements below specified threshold.
334  // Also, add value to zero diagonal
335  NumEntries = 0;
336  for (size_t i = 0 ; i < A_NumEntries ; ++i) {
337  if (std::abs(Indices_[i] - LocalRow) > AllowedBandwidth_)
338  continue;
339 
340  if ((Indices_[i] != LocalRow) && (Teuchos::ScalarTraits<Scalar>::magnitude(Values_[i]) < Threshold))
341  continue;
342 
343  Values[NumEntries] = Values_[i];
344  Indices[NumEntries] = Indices_[i];
345 
346  NumEntries++;
347  if (NumEntries > AllowedNumEntries_)
348  break;
349  }
350 
351 }
352 
353 //==========================================================================
354 template<class MatrixType>
355 void SparsityFilter<MatrixType>::getGlobalRowView(GlobalOrdinal /* GlobalRow */,
357  Teuchos::ArrayView<const Scalar> &/* values */) const
358 {
359  throw std::runtime_error("Ifpack2::SparsityFilter: does not support getGlobalRowView.");
360 }
361 
362 //==========================================================================
363 template<class MatrixType>
364 void SparsityFilter<MatrixType>::getLocalRowView(LocalOrdinal /* LocalRow */,
366  Teuchos::ArrayView<const Scalar> &/* values */) const
367 {
368  throw std::runtime_error("Ifpack2::SparsityFilter: does not support getLocalRowView.");
369 }
370 
371 //==========================================================================
372 template<class MatrixType>
373 void SparsityFilter<MatrixType>::getLocalDiagCopy(Tpetra::Vector<Scalar,LocalOrdinal,GlobalOrdinal,Node> &diag) const
374 {
375  // This is somewhat dubious as to how the maps match.
376  return A_->getLocalDiagCopy(diag);
377 }
378 
379 //==========================================================================
380 template<class MatrixType>
381 void SparsityFilter<MatrixType>::leftScale(const Tpetra::Vector<Scalar, LocalOrdinal, GlobalOrdinal, Node>& /* x */)
382 {
383  throw std::runtime_error("Ifpack2::SparsityFilter does not support leftScale.");
384 }
385 
386 //==========================================================================
387 template<class MatrixType>
388 void SparsityFilter<MatrixType>::rightScale(const Tpetra::Vector<Scalar, LocalOrdinal, GlobalOrdinal, Node>& /* x */)
389 {
390  throw std::runtime_error("Ifpack2::SparsityFilter does not support rightScale.");
391 }
392 
393 //==========================================================================
394 template<class MatrixType>
395 void SparsityFilter<MatrixType>::apply(const Tpetra::MultiVector<Scalar,LocalOrdinal,GlobalOrdinal,Node> &X,
396  Tpetra::MultiVector<Scalar,LocalOrdinal,GlobalOrdinal,Node> &Y,
397  Teuchos::ETransp mode,
398  Scalar /* alpha */,
399  Scalar /* beta */) const
400 {
401  // Note: This isn't AztecOO compliant. But neither was Ifpack's version.
402  // Note: The localized maps mean the matvec is trivial (and has no import)
403  TEUCHOS_TEST_FOR_EXCEPTION(X.getNumVectors() != Y.getNumVectors(), std::runtime_error,
404  "Ifpack2::SparsityFilter::apply ERROR: X.getNumVectors() != Y.getNumVectors().");
405 
406  Scalar zero = Teuchos::ScalarTraits<Scalar>::zero();
408  Teuchos::ArrayRCP<Teuchos::ArrayRCP<Scalar> > y_ptr = Y.get2dViewNonConst();
409 
410  Y.putScalar(zero);
411  size_t NumVectors = Y.getNumVectors();
412 
413  for (size_t i = 0 ; i < NumRows_ ; ++i) {
414  size_t Nnz;
415  // Use this class's getrow to make the below code simpler
416  getLocalRowCopy(i,Indices_(),Values_(),Nnz);
417  if (mode==Teuchos::NO_TRANS){
418  for (size_t j = 0 ; j < Nnz ; ++j)
419  for (size_t k = 0 ; k < NumVectors ; ++k)
420  y_ptr[k][i] += Values_[j] * x_ptr[k][Indices_[j]];
421  }
422  else if (mode==Teuchos::TRANS){
423  for (size_t j = 0 ; j < Nnz ; ++j)
424  for (size_t k = 0 ; k < NumVectors ; ++k)
425  y_ptr[k][Indices_[j]] += Values_[j] * x_ptr[k][i];
426  }
427  else { //mode==Teuchos::CONJ_TRANS
428  for (size_t j = 0 ; j < Nnz ; ++j)
429  for (size_t k = 0 ; k < NumVectors ; ++k)
430  y_ptr[k][Indices_[j]] += Teuchos::ScalarTraits<Scalar>::conjugate(Values_[j]) * x_ptr[k][i];
431  }
432  }
433 }
434 
435 
436 //==========================================================================
437 template<class MatrixType>
439 {
440  return true;
441 }
442 
443 //==========================================================================
444 template<class MatrixType>
446 {
447  return false;
448 }
449 
450 //==========================================================================
451 template<class MatrixType>
452 typename SparsityFilter<MatrixType>::mag_type SparsityFilter<MatrixType>::getFrobeniusNorm() const
453 {
454  throw std::runtime_error("Ifpack2::SparsityFilter does not implement getFrobeniusNorm.");
455 }
456 
457 } // namespace Ifpack2
458 
459 #define IFPACK2_SPARSITYFILTER_INSTANT(S,LO,GO,N) \
460  template class Ifpack2::SparsityFilter< Tpetra::RowMatrix<S, LO, GO, N> >;
461 
462 #endif
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:395
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:237
virtual bool hasTransposeApply() const
Indicates whether this operator supports applying the adjoint operator.
Definition: Ifpack2_SparsityFilter_def.hpp:438
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:133
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:153
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:202
#define TEUCHOS_TEST_FOR_EXCEPTION(throw_exception_test, Exception, msg)
size_type size() const
virtual GlobalOrdinal getIndexBase() const
Returns the index base for global indices for this matrix.
Definition: Ifpack2_SparsityFilter_def.hpp:209
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:286
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:143
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:373
virtual size_t getNodeMaxNumRowEntries() const
Returns the maximum number of entries across all rows/columns on this node.
Definition: Ifpack2_SparsityFilter_def.hpp:251
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:272
virtual Teuchos::RCP< const Tpetra::RowGraph< LocalOrdinal, GlobalOrdinal, Node > > getGraph() const
Returns the RowGraph associated with this matrix.
Definition: Ifpack2_SparsityFilter_def.hpp:173
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:265
virtual ~SparsityFilter()
Destructor.
Definition: Ifpack2_SparsityFilter_def.hpp:109
virtual global_size_t getGlobalNumRows() const
Returns the number of global rows in this matrix.
Definition: Ifpack2_SparsityFilter_def.hpp:180
virtual size_t getNodeNumRows() const
Returns the number of rows owned on the calling node.
Definition: Ifpack2_SparsityFilter_def.hpp:194
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:230
virtual global_size_t getGlobalNumCols() const
Returns the number of global columns in this matrix.
Definition: Ifpack2_SparsityFilter_def.hpp:187
virtual bool hasColMap() const
Indicates whether this matrix has a well-defined column map.
Definition: Ifpack2_SparsityFilter_def.hpp:258
virtual mag_type getFrobeniusNorm() const
Returns the Frobenius norm of the matrix.
Definition: Ifpack2_SparsityFilter_def.hpp:452
virtual size_t getNodeNumEntries() const
Returns the local number of entries in this matrix.
Definition: Ifpack2_SparsityFilter_def.hpp:223
Drop entries of a matrix, based on the sparsity pattern.
Definition: Ifpack2_SparsityFilter_decl.hpp:82
virtual size_t getGlobalMaxNumRowEntries() const
Returns the maximum number of entries across all rows/columns on all nodes.
Definition: Ifpack2_SparsityFilter_def.hpp:244
void resize(size_type new_size, const value_type &x=value_type())
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:163
virtual global_size_t getGlobalNumEntries() const
Returns the global number of entries in this matrix.
Definition: Ifpack2_SparsityFilter_def.hpp:216
virtual bool isFillComplete() const
Returns true if fillComplete() has been called.
Definition: Ifpack2_SparsityFilter_def.hpp:279
static magnitudeType magnitude(T a)
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:364
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:388
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:381
virtual bool supportsRowViews() const
Returns true if RowViews are supported.
Definition: Ifpack2_SparsityFilter_def.hpp:445
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:296
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:355