43 #ifndef IFPACK2_CRSRILUK_DEF_HPP 44 #define IFPACK2_CRSRILUK_DEF_HPP 46 #include "Ifpack2_LocalFilter.hpp" 47 #include "Tpetra_CrsMatrix.hpp" 51 template<
class MatrixType>
56 isInitialized_ (false),
61 initializeTime_ (0.0),
70 template<
class MatrixType>
75 isInitialized_ (false),
80 initializeTime_ (0.0),
89 template<
class MatrixType>
93 template<
class MatrixType>
101 if (A.getRawPtr () !=
A_.getRawPtr ()) {
102 isAllocated_ =
false;
103 isInitialized_ =
false;
116 template<
class MatrixType>
120 TEUCHOS_TEST_FOR_EXCEPTION(
121 L_.is_null (), std::runtime_error,
"Ifpack2::RILUK::getL: The L factor " 122 "is null. Please call initialize() (and preferably also compute()) " 123 "before calling this method. If the input matrix has not yet been set, " 124 "you must first call setMatrix() with a nonnull input matrix before you " 125 "may call initialize() or compute().");
130 template<
class MatrixType>
131 const Tpetra::Vector<typename RILUK<MatrixType>::scalar_type,
137 TEUCHOS_TEST_FOR_EXCEPTION(
138 D_.is_null (), std::runtime_error,
"Ifpack2::RILUK::getD: The D factor " 139 "(of diagonal entries) is null. Please call initialize() (and " 140 "preferably also compute()) before calling this method. If the input " 141 "matrix has not yet been set, you must first call setMatrix() with a " 142 "nonnull input matrix before you may call initialize() or compute().");
147 template<
class MatrixType>
151 TEUCHOS_TEST_FOR_EXCEPTION(
152 U_.is_null (), std::runtime_error,
"Ifpack2::RILUK::getU: The U factor " 153 "is null. Please call initialize() (and preferably also compute()) " 154 "before calling this method. If the input matrix has not yet been set, " 155 "you must first call setMatrix() with a nonnull input matrix before you " 156 "may call initialize() or compute().");
161 template<
class MatrixType>
162 Teuchos::RCP<const Tpetra::Map<typename RILUK<MatrixType>::local_ordinal_type,
163 typename RILUK<MatrixType>::global_ordinal_type,
166 TEUCHOS_TEST_FOR_EXCEPTION(
167 A_.is_null (), std::runtime_error,
"Ifpack2::RILUK::getDomainMap: " 168 "The matrix is null. Please call setMatrix() with a nonnull input " 169 "before calling this method.");
172 TEUCHOS_TEST_FOR_EXCEPTION(
173 Graph_.is_null (), std::runtime_error,
"Ifpack2::RILUK::getDomainMap: " 174 "The computed graph is null. Please call initialize() before calling " 176 return Graph_->getL_Graph ()->getDomainMap ();
180 template<
class MatrixType>
181 Teuchos::RCP<const Tpetra::Map<typename RILUK<MatrixType>::local_ordinal_type,
182 typename RILUK<MatrixType>::global_ordinal_type,
185 TEUCHOS_TEST_FOR_EXCEPTION(
186 A_.is_null (), std::runtime_error,
"Ifpack2::RILUK::getRangeMap: " 187 "The matrix is null. Please call setMatrix() with a nonnull input " 188 "before calling this method.");
191 TEUCHOS_TEST_FOR_EXCEPTION(
192 Graph_.is_null (), std::runtime_error,
"Ifpack2::RILUK::getRangeMap: " 193 "The computed graph is null. Please call initialize() before calling " 195 return Graph_->getL_Graph ()->getRangeMap ();
199 template<
class MatrixType>
205 if (! isAllocated_) {
216 L_->setAllToScalar (STS::zero ());
217 U_->setAllToScalar (STS::zero ());
222 D_ = rcp (
new vec_type (
Graph_->getL_Graph ()->getRowMap ()));
228 template<
class MatrixType>
234 using Teuchos::Exceptions::InvalidParameterName;
235 using Teuchos::Exceptions::InvalidParameterType;
251 bool gotFillLevel =
false;
253 fillLevel = params.get<
int> (
"fact: iluk level-of-fill");
256 catch (InvalidParameterType&) {
261 catch (InvalidParameterName&) {
265 if (! gotFillLevel) {
269 fillLevel = as<int> (params.get<
magnitude_type> (
"fact: iluk level-of-fill"));
272 catch (InvalidParameterType&) {
278 if (! gotFillLevel) {
282 fillLevel = as<int> (params.get<
double> (
"fact: iluk level-of-fill"));
285 catch (InvalidParameterType& e) {
295 TEUCHOS_TEST_FOR_EXCEPTION(
298 "Ifpack2::RILUK::setParameters: We should never get here! " 299 "The method should either have read the \"fact: iluk level-of-fill\" " 300 "parameter by this point, or have thrown an exception. " 301 "Please let the Ifpack2 developers know about this bug.");
309 absThresh = params.get<
magnitude_type> (
"fact: absolute threshold");
311 catch (InvalidParameterType&) {
314 absThresh = as<magnitude_type> (params.get<
double> (
"fact: absolute threshold"));
316 catch (InvalidParameterName&) {
321 relThresh = params.get<
magnitude_type> (
"fact: relative threshold");
323 catch (InvalidParameterType&) {
326 relThresh = as<magnitude_type> (params.get<
double> (
"fact: relative threshold"));
328 catch (InvalidParameterName&) {
335 catch (InvalidParameterType&) {
338 relaxValue = as<magnitude_type> (params.get<
double> (
"fact: relax value"));
340 catch (InvalidParameterName&) {
348 LevelOfFill_ = fillLevel;
355 if (absThresh != -STM::one ()) {
356 Athresh_ = absThresh;
358 if (relThresh != -STM::one ()) {
359 Rthresh_ = relThresh;
361 if (relaxValue != -STM::one ()) {
362 RelaxValue_ = relaxValue;
367 template<
class MatrixType>
368 Teuchos::RCP<const typename RILUK<MatrixType>::row_matrix_type>
374 template<
class MatrixType>
375 Teuchos::RCP<const typename RILUK<MatrixType>::crs_matrix_type>
381 template<
class MatrixType>
382 Teuchos::RCP<const typename RILUK<MatrixType>::row_matrix_type>
387 using Teuchos::rcp_dynamic_cast;
388 using Teuchos::rcp_implicit_cast;
393 if (A->getRowMap ()->getComm ()->getSize () == 1 ||
394 A->getRowMap ()->isSameAs (* (A->getColMap ()))) {
401 RCP<const LocalFilter<row_matrix_type> > A_lf_r =
403 if (! A_lf_r.is_null ()) {
415 template<
class MatrixType>
420 using Teuchos::rcp_const_cast;
421 using Teuchos::rcp_dynamic_cast;
422 using Teuchos::rcp_implicit_cast;
426 TEUCHOS_TEST_FOR_EXCEPTION(
427 A_.is_null (), std::runtime_error,
"Ifpack2::RILUK::initialize: " 428 "The matrix is null. Please call setMatrix() with a nonnull input " 429 "before calling this method.");
431 Teuchos::Time timer (
"RILUK::initialize");
433 Teuchos::TimeMonitor timeMon (timer);
442 isInitialized_ =
false;
443 isAllocated_ =
false;
447 RCP<const row_matrix_type> A_local = makeLocalFilter (
A_);
448 TEUCHOS_TEST_FOR_EXCEPTION(
449 A_local.is_null (), std::logic_error,
"Ifpack2::RILUK::initialize: " 450 "makeLocalFilter returned null; it failed to compute A_local. " 451 "Please report this bug to the Ifpack2 developers.");
459 RCP<const crs_matrix_type> A_local_crs =
461 if (A_local_crs.is_null ()) {
466 RCP<crs_matrix_type> A_local_crs_nc =
468 A_local->getColMap (), 0));
477 import_type
import (A_local->getRowMap (), A_local->getRowMap ());
478 A_local_crs_nc->doImport (*A_local,
import, Tpetra::REPLACE);
479 A_local_crs_nc->fillComplete (A_local->getDomainMap (), A_local->getRangeMap ());
492 isInitialized_ =
true;
494 initializeTime_ += timer.totalElapsedTime ();
498 template<
class MatrixType>
503 using Teuchos::ArrayRCP;
507 using Teuchos::REDUCE_SUM;
508 using Teuchos::reduceAll;
509 typedef Tpetra::Map<local_ordinal_type,global_ordinal_type,node_type> map_type;
511 size_t NumIn = 0, NumL = 0, NumU = 0;
512 bool DiagFound =
false;
513 size_t NumNonzeroDiags = 0;
514 size_t MaxNumEntries = A.getGlobalMaxNumRowEntries();
519 Teuchos::ArrayView<const global_ordinal_type> rowGIDs = A.getRowMap()->getNodeElementList();
520 Teuchos::ArrayView<const global_ordinal_type> colGIDs = A.getColMap()->getNodeElementList();
521 bool gidsAreConsistentlyOrdered=
true;
524 if (rowGIDs[i] != colGIDs[i]) {
525 gidsAreConsistentlyOrdered=
false;
526 indexOfInconsistentGID=i;
530 TEUCHOS_TEST_FOR_EXCEPTION(gidsAreConsistentlyOrdered==
false, std::runtime_error,
531 "The ordering of the local GIDs in the row and column maps is not the same" 532 << std::endl <<
"at index " << indexOfInconsistentGID
533 <<
". Consistency is required, as all calculations are done with" 534 << std::endl <<
"local indexing.");
538 Teuchos::Array<local_ordinal_type> InI(MaxNumEntries);
539 Teuchos::Array<local_ordinal_type> LI(MaxNumEntries);
540 Teuchos::Array<local_ordinal_type> UI(MaxNumEntries);
541 Teuchos::Array<scalar_type> InV(MaxNumEntries);
542 Teuchos::Array<scalar_type> LV(MaxNumEntries);
543 Teuchos::Array<scalar_type> UV(MaxNumEntries);
546 const bool ReplaceValues =
L_->isStaticGraph () ||
L_->isLocallyIndexed ();
551 L_->setAllToScalar (STS::zero ());
552 U_->setAllToScalar (STS::zero ());
555 D_->putScalar (STS::zero ());
556 ArrayRCP<scalar_type> DV =
D_->get1dViewNonConst ();
558 RCP<const map_type> rowMap =
L_->getRowMap ();
568 Teuchos::ArrayView<const global_ordinal_type> nodeGIDs = rowMap->getNodeElementList();
569 for (
size_t myRow=0; myRow<A.getNodeNumRows(); ++myRow) {
574 A.getLocalRowCopy (local_row, InI(), InV(), NumIn);
582 for (
size_t j = 0; j < NumIn; ++j) {
585 if (k == local_row) {
588 DV[local_row] += Rthresh_ * InV[j] + IFPACK2_SGN(InV[j]) * Athresh_;
591 TEUCHOS_TEST_FOR_EXCEPTION(
592 true, std::runtime_error,
"Ifpack2::RILUK::initAllValues: current " 593 "GID k = " << k <<
" < 0. I'm not sure why this is an error; it is " 594 "probably an artifact of the undocumented assumptions of the " 595 "original implementation (likely copied and pasted from Ifpack). " 596 "Nevertheless, the code I found here insisted on this being an error " 597 "state, so I will throw an exception here.");
599 else if (k < local_row) {
604 else if (Teuchos::as<size_t>(k) <= rowMap->getNodeNumElements()) {
616 DV[local_row] = Athresh_;
621 L_->replaceLocalValues(local_row, LI(0, NumL), LV(0,NumL));
625 L_->insertLocalValues(local_row, LI(0,NumL), LV(0,NumL));
631 U_->replaceLocalValues(local_row, UI(0,NumU), UV(0,NumU));
635 U_->insertLocalValues(local_row, UI(0,NumU), UV(0,NumU));
651 isInitialized_ =
true;
655 template<
class MatrixType>
661 TEUCHOS_TEST_FOR_EXCEPTION(
662 A_.is_null (), std::runtime_error,
"Ifpack2::RILUK::compute: " 663 "The matrix is null. Please call setMatrix() with a nonnull input " 664 "before calling this method.");
670 Teuchos::Time timer (
"RILUK::compute");
681 const scalar_type MaxDiagonalValue = STS::one () / MinDiagonalValue;
683 size_t NumIn, NumL, NumU;
686 const size_t MaxNumEntries =
687 L_->getNodeMaxNumRowEntries () +
U_->getNodeMaxNumRowEntries () + 1;
689 Teuchos::Array<local_ordinal_type> InI(MaxNumEntries);
690 Teuchos::Array<scalar_type> InV(MaxNumEntries);
691 size_t num_cols =
U_->getColMap()->getNodeNumElements();
692 Teuchos::Array<int> colflag(num_cols);
694 Teuchos::ArrayRCP<scalar_type> DV =
D_->get1dViewNonConst();
700 Teuchos::ArrayView<const local_ordinal_type> UUI;
701 Teuchos::ArrayView<const scalar_type> UUV;
702 for (
size_t j = 0; j < num_cols; ++j) {
706 for (
size_t i = 0; i <
L_->getNodeNumRows (); ++i) {
711 NumIn = MaxNumEntries;
712 L_->getLocalRowCopy (local_row, InI (), InV (), NumL);
715 InI[NumL] = local_row;
717 U_->getLocalRowCopy (local_row, InI (NumL+1, MaxNumEntries-NumL-1),
718 InV (NumL+1, MaxNumEntries-NumL-1), NumU);
722 for (
size_t j = 0; j < NumIn; ++j) {
728 for (
size_t jj = 0; jj < NumL; ++jj) {
734 U_->getLocalRowView(j, UUI, UUV);
737 if (RelaxValue_ == STM::zero ()) {
738 for (
size_t k = 0; k < NumUU; ++k) {
739 const int kk = colflag[UUI[k]];
744 InV[kk] -= multiplier * UUV[k];
749 for (
size_t k = 0; k < NumUU; ++k) {
753 const int kk = colflag[UUI[k]];
755 InV[kk] -= multiplier*UUV[k];
758 diagmod -= multiplier*UUV[k];
765 L_->replaceLocalValues (local_row, InI (0, NumL), InV (0, NumL));
770 if (RelaxValue_ != STM::zero ()) {
771 DV[i] += RelaxValue_*diagmod;
774 if (STS::magnitude (DV[i]) > STS::magnitude (MaxDiagonalValue)) {
775 if (STS::real (DV[i]) < STM::zero ()) {
776 DV[i] = -MinDiagonalValue;
779 DV[i] = MinDiagonalValue;
783 DV[i] = STS::one () / DV[i];
786 for (
size_t j = 0; j < NumU; ++j) {
787 InV[NumL+1+j] *= DV[i];
792 U_->replaceLocalValues (local_row, InI (NumL+1, NumU), InV (NumL+1, NumU));
796 for (
size_t j = 0; j < NumIn; ++j) {
797 colflag[InI[j]] = -1;
807 TEUCHOS_TEST_FOR_EXCEPTION(
808 !
L_->isLowerTriangular (), std::runtime_error,
809 "Ifpack2::RILUK::compute: L isn't lower triangular.");
810 TEUCHOS_TEST_FOR_EXCEPTION(
811 !
U_->isUpperTriangular (), std::runtime_error,
812 "Ifpack2::RILUK::compute: U isn't lower triangular.");
817 computeTime_ += timer.totalElapsedTime ();
821 template<
class MatrixType>
824 apply (
const Tpetra::MultiVector<scalar_type,local_ordinal_type,global_ordinal_type,node_type>& X,
825 Tpetra::MultiVector<scalar_type,local_ordinal_type,global_ordinal_type,node_type>& Y,
826 Teuchos::ETransp mode,
831 using Teuchos::rcpFromRef;
833 TEUCHOS_TEST_FOR_EXCEPTION(
834 A_.is_null (), std::runtime_error,
"Ifpack2::RILUK::apply: The matrix is " 835 "null. Please call setMatrix() with a nonnull input, then initialize() " 836 "and compute(), before calling this method.");
837 TEUCHOS_TEST_FOR_EXCEPTION(
839 "Ifpack2::RILUK::apply: If you have not yet called compute(), " 840 "you must call compute() before calling this method.");
841 TEUCHOS_TEST_FOR_EXCEPTION(
842 X.getNumVectors () != Y.getNumVectors (), std::invalid_argument,
843 "Ifpack2::RILUK::apply: X and Y do not have the same number of columns. " 844 "X.getNumVectors() = " << X.getNumVectors ()
845 <<
" != Y.getNumVectors() = " << Y.getNumVectors () <<
".");
846 TEUCHOS_TEST_FOR_EXCEPTION(
847 STS::isComplex && mode == Teuchos::CONJ_TRANS, std::logic_error,
848 "Ifpack2::RILUK::apply: mode = Teuchos::CONJ_TRANS is not implemented for " 849 "complex Scalar type. Please talk to the Ifpack2 developers to get this " 850 "fixed. There is a FIXME in this file about this very issue.");
851 #ifdef HAVE_IFPACK2_DEBUG 854 TEUCHOS_TEST_FOR_EXCEPTION( STM::isnaninf (D_nrm1), std::runtime_error,
"Ifpack2::RILUK::apply: The 1-norm of the stored diagonal is NaN or Inf.");
855 Teuchos::Array<magnitude_type> norms (X.getNumVectors ());
858 for (
size_t j = 0; j < X.getNumVectors (); ++j) {
859 if (STM::isnaninf (norms[j])) {
864 TEUCHOS_TEST_FOR_EXCEPTION( ! good, std::runtime_error,
"Ifpack2::RILUK::apply: The 1-norm of the input X is NaN or Inf.");
866 #endif // HAVE_IFPACK2_DEBUG 871 Teuchos::Time timer (
"RILUK::apply");
873 Teuchos::TimeMonitor timeMon (timer);
874 if (alpha == one && beta == zero) {
875 if (mode == Teuchos::NO_TRANS) {
882 MV C (
D_->getMap (), X.getNumVectors ());
883 L_->localSolve (X, C, mode);
888 C.elementWiseMultiply (one, *
D_, C, zero);
890 U_->localSolve (C, Y, mode);
900 MV C (
D_->getMap (), X.getNumVectors ());
901 U_->localSolve (X, C, mode);
910 C.elementWiseMultiply (one, *
D_, C, zero);
912 L_->localSolve (C, Y, mode);
923 MV Y_tmp (Y.getMap (), Y.getNumVectors ());
924 apply (X, Y_tmp, mode);
925 Y.update (alpha, Y_tmp, beta);
930 #ifdef HAVE_IFPACK2_DEBUG 932 Teuchos::Array<magnitude_type> norms (Y.getNumVectors ());
935 for (
size_t j = 0; j < Y.getNumVectors (); ++j) {
936 if (STM::isnaninf (norms[j])) {
941 TEUCHOS_TEST_FOR_EXCEPTION( ! good, std::runtime_error,
"Ifpack2::RILUK::apply: The 1-norm of the output Y is NaN or Inf.");
943 #endif // HAVE_IFPACK2_DEBUG 946 applyTime_ = timer.totalElapsedTime ();
950 template<
class MatrixType>
952 multiply (
const Tpetra::MultiVector<scalar_type,local_ordinal_type,global_ordinal_type,node_type>& X,
953 Tpetra::MultiVector<scalar_type,local_ordinal_type,global_ordinal_type,node_type>& Y,
954 const Teuchos::ETransp mode)
const 959 if (mode != Teuchos::NO_TRANS) {
960 U_->apply (X, Y, mode);
961 Y.update (one, X, one);
966 Y.elementWiseMultiply (one, *
D_, Y, zero);
968 MV Y_tmp (Y, Teuchos::Copy);
969 L_->apply (Y_tmp, Y, mode);
970 Y.update (one, Y_tmp, one);
973 L_->apply (X, Y, mode);
974 Y.update (one, X, one);
975 Y.elementWiseMultiply (one, *
D_, Y, zero);
976 MV Y_tmp (Y, Teuchos::Copy);
977 U_->apply (Y_tmp, Y, mode);
978 Y.update (one, Y_tmp, one);
983 template<
class MatrixType>
986 std::ostringstream os;
991 os <<
"\"Ifpack2::RILUK\": {";
992 os <<
"Initialized: " << (
isInitialized () ?
"true" :
"false") <<
", " 993 <<
"Computed: " << (
isComputed () ?
"true" :
"false") <<
", ";
998 os <<
"Matrix: null";
1001 os <<
"Global matrix dimensions: [" 1002 <<
A_->getGlobalNumRows () <<
", " <<
A_->getGlobalNumCols () <<
"]" 1003 <<
", Global nnz: " <<
A_->getGlobalNumEntries();
1013 #define IFPACK2_RILUK_INSTANT(S,LO,GO,N) \ 1014 template class Ifpack2::RILUK< Tpetra::RowMatrix<S, LO, GO, N> >; Teuchos::RCP< const Tpetra::Map< local_ordinal_type, global_ordinal_type, node_type > > getRangeMap() const
Returns the Tpetra::Map object associated with the range of this operator.
Definition: Ifpack2_RILUK_def.hpp:184
MatrixType::global_ordinal_type global_ordinal_type
The type of global indices in the input MatrixType.
Definition: Ifpack2_RILUK_decl.hpp:261
Teuchos::RCP< crs_matrix_type > L_
The L (lower triangular) factor of ILU(k).
Definition: Ifpack2_RILUK_decl.hpp:571
const Tpetra::Vector< scalar_type, local_ordinal_type, global_ordinal_type, node_type > & getD() const
Return the diagonal entries of the ILU factorization.
Definition: Ifpack2_RILUK_def.hpp:135
void initialize()
Initialize by computing the symbolic incomplete factorization.
Definition: Ifpack2_RILUK_def.hpp:416
Tpetra::RowMatrix< scalar_type, local_ordinal_type, global_ordinal_type, node_type > row_matrix_type
Tpetra::RowMatrix specialization used by this class.
Definition: Ifpack2_RILUK_decl.hpp:273
virtual void setMatrix(const Teuchos::RCP< const row_matrix_type > &A)
Change the matrix to be preconditioned.
Definition: Ifpack2_RILUK_def.hpp:95
std::string description() const
A one-line description of this object.
Definition: Ifpack2_RILUK_def.hpp:984
void setParameters(const Teuchos::ParameterList ¶ms)
Definition: Ifpack2_RILUK_def.hpp:231
ILU(k) factorization of a given Tpetra::RowMatrix.
Definition: Ifpack2_RILUK_decl.hpp:243
Teuchos::RCP< const crs_matrix_type > getCrsMatrix() const
Return the input matrix A as a Tpetra::CrsMatrix, if possible; else throws.
Definition: Ifpack2_RILUK_def.hpp:376
bool isComputed() const
Whether compute() has been called on this object.
Definition: Ifpack2_RILUK_decl.hpp:344
Tpetra::CrsMatrix< scalar_type, local_ordinal_type, global_ordinal_type, node_type > crs_matrix_type
Tpetra::CrsMatrix specialization used by this class for representing L and U.
Definition: Ifpack2_RILUK_decl.hpp:275
const crs_matrix_type & getU() const
Return the U factor of the ILU factorization.
Definition: Ifpack2_RILUK_def.hpp:149
MatrixType::node_type node_type
The Node type used by the input MatrixType.
Definition: Ifpack2_RILUK_decl.hpp:264
Teuchos::RCP< const Tpetra::Map< local_ordinal_type, global_ordinal_type, node_type > > getDomainMap() const
Returns the Tpetra::Map object associated with the domain of this operator.
Definition: Ifpack2_RILUK_def.hpp:165
MatrixType::local_ordinal_type local_ordinal_type
The type of local indices in the input MatrixType.
Definition: Ifpack2_RILUK_decl.hpp:258
virtual ~RILUK()
Destructor (declared virtual for memory safety).
Definition: Ifpack2_RILUK_def.hpp:90
Teuchos::RCP< const crs_matrix_type > A_local_crs_
The matrix used to to compute ILU(k).
Definition: Ifpack2_RILUK_decl.hpp:568
int getLevelOfFill() const
Get level of fill (the "k" in ILU(k)).
Definition: Ifpack2_RILUK_decl.hpp:501
Teuchos::RCP< Ifpack2::IlukGraph< Tpetra::CrsGraph< local_ordinal_type, global_ordinal_type, node_type > > > Graph_
The ILU(k) graph.
Definition: Ifpack2_RILUK_decl.hpp:559
void compute()
Compute the (numeric) incomplete factorization.
Definition: Ifpack2_RILUK_def.hpp:656
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
Apply the (inverse of the) incomplete factorization to X, resulting in Y.
Definition: Ifpack2_RILUK_def.hpp:824
Teuchos::ScalarTraits< scalar_type >::magnitudeType magnitude_type
The type of the magnitude (absolute value) of a matrix entry.
Definition: Ifpack2_RILUK_decl.hpp:267
Construct a level filled graph for use in computing an ILU(k) incomplete factorization.
Definition: Ifpack2_IlukGraph.hpp:97
bool isInitialized() const
Whether initialize() has been called on this object.
Definition: Ifpack2_RILUK_decl.hpp:340
Teuchos::RCP< const row_matrix_type > A_
The (original) input matrix for which to compute ILU(k).
Definition: Ifpack2_RILUK_decl.hpp:554
Teuchos::RCP< const row_matrix_type > getMatrix() const
Get the input matrix.
Definition: Ifpack2_RILUK_def.hpp:369
Definition: Ifpack2_Details_Amesos2Wrapper_decl.hpp:63
Teuchos::RCP< vec_type > D_
The diagonal entries of the ILU(k) factorization.
Definition: Ifpack2_RILUK_decl.hpp:575
Access only local rows and columns of a sparse matrix.
Definition: Ifpack2_LocalFilter_decl.hpp:160
Preconditioners and smoothers for Tpetra sparse matrices.
Definition: Ifpack2_AdditiveSchwarz_decl.hpp:72
const crs_matrix_type & getL() const
Return the L factor of the ILU factorization.
Definition: Ifpack2_RILUK_def.hpp:118
Teuchos::RCP< crs_matrix_type > U_
The U (upper triangular) factor of ILU(k).
Definition: Ifpack2_RILUK_decl.hpp:573
MatrixType::scalar_type scalar_type
The type of the entries of the input MatrixType.
Definition: Ifpack2_RILUK_decl.hpp:255