43 #ifndef IFPACK2_ILUT_DEF_HPP 44 #define IFPACK2_ILUT_DEF_HPP 47 #if defined (__clang__) && !defined (__INTEL_COMPILER) 48 #pragma clang system_header 51 #include <Ifpack2_Heap.hpp> 52 #include <Ifpack2_LocalFilter.hpp> 53 #include <Ifpack2_Parameters.hpp> 54 #include <Tpetra_CrsMatrix.hpp> 55 #include <Teuchos_Time.hpp> 56 #include <Teuchos_TypeNameTraits.hpp> 87 template<
class ScalarType>
88 typename Teuchos::ScalarTraits<ScalarType>::magnitudeType
89 ilutDefaultDropTolerance () {
91 typedef Teuchos::ScalarTraits<ScalarType> STS;
92 typedef typename STS::magnitudeType magnitude_type;
93 typedef Teuchos::ScalarTraits<magnitude_type> STM;
96 const magnitude_type oneHalf = STM::one() / (STM::one() + STM::one());
101 return std::min (as<magnitude_type> (1000) * STS::magnitude (STS::eps ()), oneHalf);
107 Teuchos::ScalarTraits<double>::magnitudeType
108 ilutDefaultDropTolerance<double> () {
115 template <
class MatrixType>
118 Athresh_ (
Teuchos::ScalarTraits<magnitude_type>::zero ()),
119 Rthresh_ (
Teuchos::ScalarTraits<magnitude_type>::one ()),
120 RelaxValue_ (
Teuchos::ScalarTraits<magnitude_type>::zero ()),
122 DropTolerance_ (ilutDefaultDropTolerance<
scalar_type> ()),
123 InitializeTime_ (0.0),
129 IsInitialized_ (false),
133 template <
class MatrixType>
137 template <
class MatrixType>
141 using Teuchos::Exceptions::InvalidParameterName;
142 using Teuchos::Exceptions::InvalidParameterType;
146 magnitude_type absThresh = STM::zero ();
147 magnitude_type relThresh = STM::one ();
148 magnitude_type relaxValue = STM::zero ();
149 magnitude_type dropTol = ilutDefaultDropTolerance<scalar_type> ();
151 bool gotFillLevel =
false;
154 fillLevel = params.get<
int> (
"fact: ilut level-of-fill");
157 catch (InvalidParameterName&) {
161 catch (InvalidParameterType&) {
167 if (! gotFillLevel) {
170 fillLevel = as<int> (params.get<magnitude_type> (
"fact: ilut level-of-fill"));
172 catch (InvalidParameterType&) {}
174 if (! gotFillLevel) {
177 fillLevel = as<int> (params.get<
double> (
"fact: ilut level-of-fill"));
179 catch (InvalidParameterType&) {}
183 TEUCHOS_TEST_FOR_EXCEPTION(
184 fillLevel <= 0, std::runtime_error,
185 "Ifpack2::ILUT: The \"fact: ilut level-of-fill\" parameter must be " 186 "strictly greater than zero, but you specified a value of " << fillLevel
187 <<
". Remember that for ILUT, the fill level p means something different " 188 "than it does for ILU(k). ILU(0) produces factors with the same sparsity " 189 "structure as the input matrix A; ILUT with p = 0 always produces a " 190 "diagonal matrix, and is thus probably not what you want.");
193 absThresh = params.get<magnitude_type> (
"fact: absolute threshold");
195 catch (InvalidParameterType&) {
198 absThresh = as<magnitude_type> (params.get<
double> (
"fact: absolute threshold"));
200 catch (InvalidParameterName&) {
205 relThresh = params.get<magnitude_type> (
"fact: relative threshold");
207 catch (InvalidParameterType&) {
210 relThresh = as<magnitude_type> (params.get<
double> (
"fact: relative threshold"));
212 catch (InvalidParameterName&) {
217 relaxValue = params.get<magnitude_type> (
"fact: relax value");
219 catch (InvalidParameterType&) {
222 relaxValue = as<magnitude_type> (params.get<
double> (
"fact: relax value"));
224 catch (InvalidParameterName&) {
229 dropTol = params.get<magnitude_type> (
"fact: drop tolerance");
231 catch (InvalidParameterType&) {
234 dropTol = as<magnitude_type> (params.get<
double> (
"fact: drop tolerance"));
236 catch (InvalidParameterName&) {
249 LevelOfFill_ = fillLevel;
250 if (absThresh != -STM::one ()) {
251 Athresh_ = absThresh;
253 if (relThresh != -STM::one ()) {
254 Rthresh_ = relThresh;
256 if (relaxValue != -STM::one ()) {
257 RelaxValue_ = relaxValue;
259 if (dropTol != -STM::one ()) {
260 DropTolerance_ = dropTol;
265 template <
class MatrixType>
266 Teuchos::RCP<const Teuchos::Comm<int> >
268 TEUCHOS_TEST_FOR_EXCEPTION(
269 A_.is_null (), std::runtime_error,
"Ifpack2::ILUT::getComm: " 270 "The matrix is null. Please call setMatrix() with a nonnull input " 271 "before calling this method.");
272 return A_->getComm ();
276 template <
class MatrixType>
277 Teuchos::RCP<const typename ILUT<MatrixType>::row_matrix_type>
283 template <
class MatrixType>
284 Teuchos::RCP<const typename ILUT<MatrixType>::map_type>
287 TEUCHOS_TEST_FOR_EXCEPTION(
288 A_.is_null (), std::runtime_error,
"Ifpack2::ILUT::getDomainMap: " 289 "The matrix is null. Please call setMatrix() with a nonnull input " 290 "before calling this method.");
291 return A_->getDomainMap ();
295 template <
class MatrixType>
296 Teuchos::RCP<const typename ILUT<MatrixType>::map_type>
299 TEUCHOS_TEST_FOR_EXCEPTION(
300 A_.is_null (), std::runtime_error,
"Ifpack2::ILUT::getRangeMap: " 301 "The matrix is null. Please call setMatrix() with a nonnull input " 302 "before calling this method.");
303 return A_->getRangeMap ();
307 template <
class MatrixType>
313 template <
class MatrixType>
315 return NumInitialize_;
319 template <
class MatrixType>
325 template <
class MatrixType>
331 template <
class MatrixType>
333 return InitializeTime_;
337 template<
class MatrixType>
343 template<
class MatrixType>
349 template<
class MatrixType>
351 return L_->getGlobalNumEntries () + U_->getGlobalNumEntries ();
355 template<
class MatrixType>
357 return L_->getNodeNumEntries () + U_->getNodeNumEntries ();
361 template<
class MatrixType>
364 if (A.getRawPtr () != A_.getRawPtr ()) {
366 TEUCHOS_TEST_FOR_EXCEPTION(
367 ! A.is_null () && A->getComm ()->getSize () == 1 &&
368 A->getNodeNumRows () != A->getNodeNumCols (),
369 std::runtime_error,
"Ifpack2::ILUT::setMatrix: If A's communicator only " 370 "contains one process, then A must be square. Instead, you provided a " 371 "matrix A with " << A->getNodeNumRows () <<
" rows and " 372 << A->getNodeNumCols () <<
" columns.");
378 IsInitialized_ =
false;
380 A_local_ = Teuchos::null;
388 template<
class MatrixType>
391 Teuchos::Time timer (
"ILUT::initialize");
393 Teuchos::TimeMonitor timeMon (timer);
396 TEUCHOS_TEST_FOR_EXCEPTION(
397 A_.is_null (), std::runtime_error,
"Ifpack2::ILUT::initialize: " 398 "The matrix to precondition is null. Please call setMatrix() with a " 399 "nonnull input before calling this method.");
402 IsInitialized_ =
false;
404 A_local_ = Teuchos::null;
408 A_local_ = makeLocalFilter (A_);
410 IsInitialized_ =
true;
413 InitializeTime_ += timer.totalElapsedTime ();
417 template<
typename ScalarType>
418 typename Teuchos::ScalarTraits<ScalarType>::magnitudeType
419 scalar_mag (
const ScalarType& s)
421 return Teuchos::ScalarTraits<ScalarType>::magnitude(s);
425 template<
class MatrixType>
428 using Teuchos::Array;
429 using Teuchos::ArrayRCP;
430 using Teuchos::ArrayView;
433 using Teuchos::reduceAll;
463 Teuchos::Time timer (
"ILUT::compute");
465 Teuchos::TimeMonitor timeMon (timer,
true);
470 L_ = rcp (
new crs_matrix_type (A_local_->getRowMap (), A_local_->getColMap (), 0));
471 U_ = rcp (
new crs_matrix_type (A_local_->getRowMap (), A_local_->getColMap (), 0));
477 Array<ArrayView<const local_ordinal_type> > Uindices (myNumRows);
478 Array<ArrayView<const scalar_type> > Ucoefs (myNumRows);
483 #ifdef IFPACK2_WRITE_FACTORS 484 std::ofstream ofsL(
"L.tif.mtx", std::ios::out);
485 std::ofstream ofsU(
"U.tif.mtx", std::ios::out);
496 double local_nnz =
static_cast<double> (A_local_->getNodeNumEntries ());
500 fill = ((fillLevel - 1) * local_nnz) / (2 * myNumRows);
506 double fill_ceil=std::ceil(fill);
510 size_type fillL =
static_cast<size_type
>(fill_ceil);
511 size_type fillU =
static_cast<size_type
>(fill_ceil);
513 Array<scalar_type> InvDiagU (myNumRows, zero);
515 Array<local_ordinal_type> tmp_idx;
516 Array<scalar_type> tmpv;
518 enum { UNUSED, ORIG, FILL };
521 Array<int> pattern(max_col, UNUSED);
522 Array<scalar_type> cur_row(max_col, zero);
523 Array<magnitude_type> unorm(max_col);
524 magnitude_type rownorm;
525 Array<local_ordinal_type> L_cols_heap;
526 Array<local_ordinal_type> U_cols;
527 Array<local_ordinal_type> L_vals_heap;
528 Array<local_ordinal_type> U_vals_heap;
533 greater_indirect<scalar_type,local_ordinal_type> vals_comp(cur_row);
539 ArrayRCP<local_ordinal_type> ColIndicesARCP;
540 ArrayRCP<scalar_type> ColValuesARCP;
541 if (! A_local_->supportsRowViews ()) {
542 const size_t maxnz = A_local_->getNodeMaxNumRowEntries ();
543 ColIndicesARCP.resize (maxnz);
544 ColValuesARCP.resize (maxnz);
548 ArrayView<const local_ordinal_type> ColIndicesA;
549 ArrayView<const scalar_type> ColValuesA;
552 if (A_local_->supportsRowViews ()) {
553 A_local_->getLocalRowView (row_i, ColIndicesA, ColValuesA);
554 RowNnz = ColIndicesA.size ();
557 A_local_->getLocalRowCopy (row_i, ColIndicesARCP (), ColValuesARCP (), RowNnz);
558 ColIndicesA = ColIndicesARCP (0, RowNnz);
559 ColValuesA = ColValuesARCP (0, RowNnz);
564 U_cols.push_back(row_i);
565 cur_row[row_i] = zero;
566 pattern[row_i] = ORIG;
568 size_type L_cols_heaplen = 0;
569 rownorm = STM::zero ();
570 for (
size_t i = 0; i < RowNnz; ++i) {
571 if (ColIndicesA[i] < myNumRows) {
572 if (ColIndicesA[i] < row_i) {
573 add_to_heap(ColIndicesA[i], L_cols_heap, L_cols_heaplen);
575 else if (ColIndicesA[i] > row_i) {
576 U_cols.push_back(ColIndicesA[i]);
579 cur_row[ColIndicesA[i]] = ColValuesA[i];
580 pattern[ColIndicesA[i]] = ORIG;
581 rownorm += scalar_mag(ColValuesA[i]);
592 size_type orig_U_len = U_cols.size();
593 RowNnz = L_cols_heap.size() + orig_U_len;
597 size_type L_vals_heaplen = 0;
598 while (L_cols_heaplen > 0) {
601 scalar_type multiplier = cur_row[row_k] * InvDiagU[row_k];
602 cur_row[row_k] = multiplier;
603 magnitude_type mag_mult = scalar_mag(multiplier);
604 if (mag_mult*unorm[row_k] < rownorm) {
605 pattern[row_k] = UNUSED;
609 if (pattern[row_k] != ORIG) {
610 if (L_vals_heaplen < fillL) {
611 add_to_heap(row_k, L_vals_heap, L_vals_heaplen, vals_comp);
613 else if (L_vals_heaplen==0 ||
614 mag_mult < scalar_mag(cur_row[L_vals_heap.front()])) {
615 pattern[row_k] = UNUSED;
620 pattern[L_vals_heap.front()] = UNUSED;
622 add_to_heap(row_k, L_vals_heap, L_vals_heaplen, vals_comp);
628 ArrayView<const local_ordinal_type>& ColIndicesU = Uindices[row_k];
629 ArrayView<const scalar_type>& ColValuesU = Ucoefs[row_k];
630 size_type ColNnzU = ColIndicesU.size();
632 for(size_type j=0; j<ColNnzU; ++j) {
633 if (ColIndicesU[j] > row_k) {
636 if (pattern[col_j] != UNUSED) {
637 cur_row[col_j] -= tmp;
639 else if (scalar_mag(tmp) > rownorm) {
640 cur_row[col_j] = -tmp;
641 pattern[col_j] = FILL;
643 U_cols.push_back(col_j);
659 for (size_type i = 0; i < ColIndicesA.size (); ++i) {
660 if (ColIndicesA[i] < row_i) {
661 tmp_idx.push_back(ColIndicesA[i]);
662 tmpv.push_back(cur_row[ColIndicesA[i]]);
663 pattern[ColIndicesA[i]] = UNUSED;
668 for (size_type j = 0; j < L_vals_heaplen; ++j) {
669 tmp_idx.push_back(L_vals_heap[j]);
670 tmpv.push_back(cur_row[L_vals_heap[j]]);
671 pattern[L_vals_heap[j]] = UNUSED;
679 L_->insertLocalValues (row_i, tmp_idx (), tmpv ());
680 #ifdef IFPACK2_WRITE_FACTORS 681 for (size_type ii = 0; ii < tmp_idx.size (); ++ii) {
682 ofsL << row_i <<
" " << tmp_idx[ii] <<
" " << tmpv[ii] << std::endl;
690 if (cur_row[row_i] == zero) {
691 std::cerr <<
"Ifpack2::ILUT::Compute: zero pivot encountered! Replacing with rownorm and continuing...(You may need to set the parameter 'fact: absolute threshold'.)" << std::endl;
692 cur_row[row_i] = rownorm;
694 InvDiagU[row_i] = one / cur_row[row_i];
697 tmp_idx.push_back(row_i);
698 tmpv.push_back(cur_row[row_i]);
699 unorm[row_i] = scalar_mag(cur_row[row_i]);
700 pattern[row_i] = UNUSED;
706 size_type U_vals_heaplen = 0;
707 for(size_type j=1; j<U_cols.size(); ++j) {
709 if (pattern[col] != ORIG) {
710 if (U_vals_heaplen < fillU) {
711 add_to_heap(col, U_vals_heap, U_vals_heaplen, vals_comp);
713 else if (U_vals_heaplen!=0 && scalar_mag(cur_row[col]) >
714 scalar_mag(cur_row[U_vals_heap.front()])) {
716 add_to_heap(col, U_vals_heap, U_vals_heaplen, vals_comp);
720 tmp_idx.push_back(col);
721 tmpv.push_back(cur_row[col]);
722 unorm[row_i] += scalar_mag(cur_row[col]);
724 pattern[col] = UNUSED;
727 for(size_type j=0; j<U_vals_heaplen; ++j) {
728 tmp_idx.push_back(U_vals_heap[j]);
729 tmpv.push_back(cur_row[U_vals_heap[j]]);
730 unorm[row_i] += scalar_mag(cur_row[U_vals_heap[j]]);
733 unorm[row_i] /= (orig_U_len + U_vals_heaplen);
735 U_->insertLocalValues(row_i, tmp_idx(), tmpv() );
736 #ifdef IFPACK2_WRITE_FACTORS 737 for(
int ii=0; ii<tmp_idx.size(); ++ii) {
738 ofsU <<row_i<<
" " <<tmp_idx[ii]<<
" " <<tmpv[ii]<< std::endl;
744 U_->getLocalRowView(row_i, Uindices[row_i], Ucoefs[row_i] );
756 ComputeTime_ += timer.totalElapsedTime ();
762 template <
class MatrixType>
764 apply (
const Tpetra::MultiVector<scalar_type, local_ordinal_type, global_ordinal_type, node_type>& X,
765 Tpetra::MultiVector<scalar_type, local_ordinal_type, global_ordinal_type, node_type>& Y,
766 Teuchos::ETransp mode,
772 using Teuchos::rcpFromRef;
773 typedef Tpetra::MultiVector<scalar_type, local_ordinal_type, global_ordinal_type, node_type> MV;
775 Teuchos::Time timer (
"ILUT::apply");
777 Teuchos::TimeMonitor timeMon (timer,
true);
779 TEUCHOS_TEST_FOR_EXCEPTION(
781 "Ifpack2::ILUT::apply: You must call compute() to compute the incomplete " 782 "factorization, before calling apply().");
784 TEUCHOS_TEST_FOR_EXCEPTION(
785 X.getNumVectors() != Y.getNumVectors(), std::runtime_error,
786 "Ifpack2::ILUT::apply: X and Y must have the same number of columns. " 787 "X has " << X.getNumVectors () <<
" columns, but Y has " 788 << Y.getNumVectors () <<
" columns.");
790 if (alpha == Teuchos::ScalarTraits<scalar_type>::zero ()) {
796 if (beta == Teuchos::ScalarTraits<scalar_type>::zero ()) {
807 if (beta == Teuchos::ScalarTraits<scalar_type>::zero ()) {
808 Y_temp = rcpFromRef (Y);
810 Y_temp = rcp (
new MV (Y.getMap (), Y.getNumVectors ()));
816 RCP<const MV> X_temp;
818 auto X_lcl_host = X.template getLocalView<Kokkos::HostSpace> ();
819 auto Y_lcl_host = Y.template getLocalView<Kokkos::HostSpace> ();
820 if (X_lcl_host.ptr_on_device () == Y_lcl_host.ptr_on_device ()) {
821 X_temp = rcp (
new MV (X, Teuchos::Copy));
823 X_temp = rcpFromRef (X);
830 RCP<MV> Y_mid = rcp (
new MV (Y.getMap (), Y.getNumVectors ()));
832 if (mode == Teuchos::NO_TRANS) {
833 L_->template localSolve<scalar_type, scalar_type> (*X_temp, *Y_mid, mode);
836 U_->template localSolve<scalar_type, scalar_type> (*Y_mid, *Y_temp, mode);
839 U_->template localSolve<scalar_type, scalar_type> (*X_temp, *Y_mid, mode);
842 L_->template localSolve<scalar_type, scalar_type> (*Y_mid, *Y_temp, mode);
845 if (beta == Teuchos::ScalarTraits<scalar_type>::zero ()) {
848 Y.update (alpha, *Y_temp, beta);
852 ApplyTime_ += timer.totalElapsedTime ();
856 template <
class MatrixType>
859 std::ostringstream os;
864 os <<
"\"Ifpack2::ILUT\": {";
865 os <<
"Initialized: " << (
isInitialized () ?
"true" :
"false") <<
", " 866 <<
"Computed: " << (
isComputed () ?
"true" :
"false") <<
", ";
874 os <<
"Matrix: null";
877 os <<
"Global matrix dimensions: [" 878 << A_->getGlobalNumRows () <<
", " << A_->getGlobalNumCols () <<
"]" 879 <<
", Global nnz: " << A_->getGlobalNumEntries();
887 template <
class MatrixType>
891 const Teuchos::EVerbosityLevel verbLevel)
const 894 using Teuchos::OSTab;
896 using Teuchos::TypeNameTraits;
898 using Teuchos::VERB_DEFAULT;
899 using Teuchos::VERB_NONE;
900 using Teuchos::VERB_LOW;
901 using Teuchos::VERB_MEDIUM;
902 using Teuchos::VERB_HIGH;
903 using Teuchos::VERB_EXTREME;
905 const Teuchos::EVerbosityLevel vl =
906 (verbLevel == VERB_DEFAULT) ? VERB_LOW : verbLevel;
909 if (vl > VERB_NONE) {
910 out <<
"\"Ifpack2::ILUT\":" << endl;
912 out <<
"MatrixType: " << TypeNameTraits<MatrixType>::name () << endl;
913 if (this->getObjectLabel () !=
"") {
914 out <<
"Label: \"" << this->getObjectLabel () <<
"\"" << endl;
916 out <<
"Initialized: " << (
isInitialized () ?
"true" :
"false")
918 <<
"Computed: " << (
isComputed () ?
"true" :
"false")
926 const double fillFraction =
928 const double nnzToRows =
931 out <<
"Dimensions of L: [" << L_->getGlobalNumRows () <<
", " 932 << L_->getGlobalNumRows () <<
"]" << endl
933 <<
"Dimensions of U: [" << U_->getGlobalNumRows () <<
", " 934 << U_->getGlobalNumRows () <<
"]" << endl
936 <<
"Fill fraction of factors over A: " << fillFraction << endl
937 <<
"Ratio of nonzeros to rows: " << nnzToRows << endl;
942 <<
"Number of apply calls: " <<
getNumApply () << endl
944 <<
"Total time in seconds for compute: " <<
getComputeTime () << endl
945 <<
"Total time in seconds for apply: " <<
getApplyTime () << endl;
947 out <<
"Local matrix:" << endl;
948 A_local_->describe (out, vl);
952 template <
class MatrixType>
953 Teuchos::RCP<const typename ILUT<MatrixType>::row_matrix_type>
956 if (A->getComm ()->getSize () > 1) {
971 #define IFPACK2_ILUT_INSTANT(S,LO,GO,N) \ 972 template class Ifpack2::ILUT< Tpetra::RowMatrix<S, LO, GO, N> >; magnitude_type getDropTolerance() const
Gets the dropping tolerance.
Definition: Ifpack2_ILUT_decl.hpp:333
ILUT(const Teuchos::RCP< const row_matrix_type > &A)
Constructor.
Definition: Ifpack2_ILUT_def.hpp:116
bool hasTransposeApply() const
Whether this object's apply() method can apply the transpose (or conjugate transpose, if applicable).
Definition: Ifpack2_ILUT_def.hpp:308
virtual ~ILUT()
Destructor.
Definition: Ifpack2_ILUT_def.hpp:134
global_size_t getGlobalNumEntries() const
Returns the number of nonzero entries in the global graph.
Definition: Ifpack2_ILUT_def.hpp:350
void initialize()
Clear any previously computed factors.
Definition: Ifpack2_ILUT_def.hpp:389
void describe(Teuchos::FancyOStream &out, const Teuchos::EVerbosityLevel verbLevel=Teuchos::Describable::verbLevel_default) const
Print the object with some verbosity level to an FancyOStream object.
Definition: Ifpack2_ILUT_def.hpp:890
std::string description() const
Return a simple one-line description of this object.
Definition: Ifpack2_ILUT_def.hpp:857
ILUT (incomplete LU factorization with threshold) of a Tpetra sparse matrix.
Definition: Ifpack2_ILUT_decl.hpp:91
size_t getNodeNumEntries() const
Returns the number of nonzero entries in the local graph.
Definition: Ifpack2_ILUT_def.hpp:356
magnitude_type getRelaxValue() const
Get the relax value.
Definition: Ifpack2_ILUT_decl.hpp:328
void rm_heap_root(Teuchos::Array< Ordinal > &heap, SizeType &heap_len)
Definition: Ifpack2_Heap.hpp:92
Teuchos::RCP< const map_type > getRangeMap() const
Tpetra::Map representing the range of this operator.
Definition: Ifpack2_ILUT_def.hpp:297
magnitude_type getRelativeThreshold() const
Get relative threshold value.
Definition: Ifpack2_ILUT_decl.hpp:323
MatrixType::scalar_type scalar_type
The type of the entries of the input MatrixType.
Definition: Ifpack2_ILUT_decl.hpp:106
magnitude_type getAbsoluteThreshold() const
Get absolute threshold value.
Definition: Ifpack2_ILUT_decl.hpp:318
void compute()
Compute factors L and U using the specified diagonal perturbation thresholds and relaxation parameter...
Definition: Ifpack2_ILUT_def.hpp:426
virtual void setMatrix(const Teuchos::RCP< const row_matrix_type > &A)
Change the matrix to be preconditioned.
Definition: Ifpack2_ILUT_def.hpp:362
int getNumInitialize() const
Returns the number of calls to Initialize().
Definition: Ifpack2_ILUT_def.hpp:314
double getApplyTime() const
Returns the time spent in apply().
Definition: Ifpack2_ILUT_def.hpp:344
Teuchos::RCP< const Teuchos::Comm< int > > getComm() const
Returns the input matrix's communicator.
Definition: Ifpack2_ILUT_def.hpp:267
Definition: Ifpack2_Details_Amesos2Wrapper_decl.hpp:63
Tpetra::CrsMatrix< scalar_type, local_ordinal_type, global_ordinal_type, node_type > crs_matrix_type
Type of the Tpetra::CrsMatrix specialization that this class uses for the L and U factors...
Definition: Ifpack2_ILUT_decl.hpp:126
Teuchos::RCP< const map_type > getDomainMap() const
Tpetra::Map representing the domain of this operator.
Definition: Ifpack2_ILUT_def.hpp:285
int getLevelOfFill() const
The level of fill.
Definition: Ifpack2_ILUT_decl.hpp:313
bool isComputed() const
If compute() is completed, this query returns true, otherwise it returns false.
Definition: Ifpack2_ILUT_decl.hpp:215
void add_to_heap(const Ordinal &idx, Teuchos::Array< Ordinal > &heap, SizeType &heap_len)
Definition: Ifpack2_Heap.hpp:70
Access only local rows and columns of a sparse matrix.
Definition: Ifpack2_LocalFilter_decl.hpp:160
double getInitializeTime() const
Returns the time spent in Initialize().
Definition: Ifpack2_ILUT_def.hpp:332
Preconditioners and smoothers for Tpetra sparse matrices.
Definition: Ifpack2_AdditiveSchwarz_decl.hpp:72
bool isInitialized() const
Returns true if the preconditioner has been successfully initialized.
Definition: Ifpack2_ILUT_decl.hpp:200
int getNumApply() const
Returns the number of calls to apply().
Definition: Ifpack2_ILUT_def.hpp:326
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 ILUT preconditioner to X, resulting in Y.
Definition: Ifpack2_ILUT_def.hpp:764
double getComputeTime() const
Returns the time spent in Compute().
Definition: Ifpack2_ILUT_def.hpp:338
void setParameters(const Teuchos::ParameterList ¶ms)
Set preconditioner parameters.
Definition: Ifpack2_ILUT_def.hpp:138
int getNumCompute() const
Returns the number of calls to Compute().
Definition: Ifpack2_ILUT_def.hpp:320
MatrixType::local_ordinal_type local_ordinal_type
The type of local indices in the input MatrixType.
Definition: Ifpack2_ILUT_decl.hpp:109
Teuchos::RCP< const row_matrix_type > getMatrix() const
Returns a reference to the matrix to be preconditioned.
Definition: Ifpack2_ILUT_def.hpp:278