51 #ifndef IFPACK2_ILUT_DEF_HPP 52 #define IFPACK2_ILUT_DEF_HPP 82 template<
class ScalarType>
83 typename Teuchos::ScalarTraits<ScalarType>::magnitudeType
84 ilutDefaultDropTolerance () {
86 typedef Teuchos::ScalarTraits<ScalarType> STS;
87 typedef typename STS::magnitudeType magnitude_type;
88 typedef Teuchos::ScalarTraits<magnitude_type> STM;
91 const magnitude_type oneHalf = STM::one() / (STM::one() + STM::one());
96 return std::min (as<magnitude_type> (1000) * STS::magnitude (STS::eps ()), oneHalf);
102 Teuchos::ScalarTraits<double>::magnitudeType
103 ilutDefaultDropTolerance<double> () {
112 template <
class MatrixType>
113 ILUT<MatrixType>::ILUT(
const Teuchos::RCP<
const Tpetra::RowMatrix<scalar_type,local_ordinal_type,global_ordinal_type,node_type> >& A) :
115 Athresh_ (
Teuchos::ScalarTraits<magnitude_type>::zero ()),
116 Rthresh_ (
Teuchos::ScalarTraits<magnitude_type>::one ()),
117 RelaxValue_ (
Teuchos::ScalarTraits<magnitude_type>::zero ()),
118 LevelOfFill_ (
Teuchos::ScalarTraits<magnitude_type>::one ()),
119 DropTolerance_ (ilutDefaultDropTolerance<
scalar_type> ()),
120 Condest_ (-
Teuchos::ScalarTraits<magnitude_type>::one ()),
121 InitializeTime_(0.0),
127 IsInitialized_ (false),
130 TEUCHOS_TEST_FOR_EXCEPTION(
131 A_.is_null (), std::runtime_error,
132 "Ifpack2::ILUT: Input matrix is null.");
136 template <
class MatrixType>
141 template <
class MatrixType>
144 using Teuchos::Exceptions::InvalidParameterName;
145 using Teuchos::Exceptions::InvalidParameterType;
148 magnitude_type fillLevel = STM::one ();
149 magnitude_type absThresh = STM::zero ();
150 magnitude_type relThresh = STM::one ();
151 magnitude_type relaxValue = STM::zero ();
152 magnitude_type dropTol = ilutDefaultDropTolerance<scalar_type> ();
155 fillLevel = params.get<magnitude_type> (
"fact: ilut level-of-fill");
157 catch (InvalidParameterType&) {
160 fillLevel = as<magnitude_type> (params.get<
double> (
"fact: ilut level-of-fill"));
162 catch (InvalidParameterName&) {
170 TEUCHOS_TEST_FOR_EXCEPTION(fillLevel <= 0.0, std::runtime_error,
171 "Ifpack2::ILUT::SetParameters ERROR, level-of-fill must be >= 0.");
174 absThresh = params.get<magnitude_type> (
"fact: absolute threshold");
176 catch (InvalidParameterType&) {
179 absThresh = as<magnitude_type> (params.get<
double> (
"fact: absolute threshold"));
181 catch (InvalidParameterName&) {
186 relThresh = params.get<magnitude_type> (
"fact: relative threshold");
188 catch (InvalidParameterType&) {
191 relThresh = as<magnitude_type> (params.get<
double> (
"fact: relative threshold"));
193 catch (InvalidParameterName&) {
198 relaxValue = params.get<magnitude_type> (
"fact: relax value");
200 catch (InvalidParameterType&) {
203 relaxValue = as<magnitude_type> (params.get<
double> (
"fact: relax value"));
205 catch (InvalidParameterName&) {
210 dropTol = params.get<magnitude_type> (
"fact: drop tolerance");
212 catch (InvalidParameterType&) {
215 dropTol = as<magnitude_type> (params.get<
double> (
"fact: drop tolerance"));
217 catch (InvalidParameterName&) {
230 LevelOfFill_ = fillLevel;
231 if (absThresh != -STM::one ()) {
232 Athresh_ = absThresh;
234 if (relThresh != -STM::one ()) {
235 Rthresh_ = relThresh;
237 if (relaxValue != -STM::one ()) {
238 RelaxValue_ = relaxValue;
240 if (dropTol != -STM::one ()) {
241 DropTolerance_ = dropTol;
246 template <
class MatrixType>
247 const Teuchos::RCP<const Teuchos::Comm<int> > &
249 return A_->getComm ();
253 template <
class MatrixType>
254 Teuchos::RCP<const Tpetra::RowMatrix<typename MatrixType::scalar_type,typename MatrixType::local_ordinal_type,typename MatrixType::global_ordinal_type,typename MatrixType::node_type> >
260 template <
class MatrixType>
261 const Teuchos::RCP<const Tpetra::Map<typename MatrixType::local_ordinal_type,typename MatrixType::global_ordinal_type,typename MatrixType::node_type> >&
264 return A_->getDomainMap();
268 template <
class MatrixType>
269 const Teuchos::RCP<const Tpetra::Map<typename MatrixType::local_ordinal_type,typename MatrixType::global_ordinal_type,typename MatrixType::node_type> >&
272 return A_->getRangeMap();
276 template <
class MatrixType>
282 template <
class MatrixType>
284 return(NumInitialize_);
288 template <
class MatrixType>
294 template <
class MatrixType>
300 template <
class MatrixType>
302 return(InitializeTime_);
306 template<
class MatrixType>
308 return(ComputeTime_);
312 template<
class MatrixType>
318 template<
class MatrixType>
320 return(L_->getGlobalNumEntries() + U_->getGlobalNumEntries());
324 template<
class MatrixType>
326 return(L_->getNodeNumEntries() + U_->getNodeNumEntries());
330 template<
class MatrixType>
336 const Teuchos::Ptr<
const Tpetra::RowMatrix<scalar_type,local_ordinal_type,global_ordinal_type,node_type> > &matrix) {
342 if (Condest_ == -STM::one ()) {
343 Condest_ = Ifpack2::Condest(*
this, CT, MaxIters, Tol, matrix);
349 template<
class MatrixType>
351 Teuchos::Time timer (
"ILUT::initialize");
353 Teuchos::TimeMonitor timeMon (timer);
356 IsInitialized_ =
false;
362 TEUCHOS_TEST_FOR_EXCEPTION(
363 getComm ()->getSize () == 1 && A_->getNodeNumRows() != A_->getNodeNumCols(),
364 std::runtime_error,
"Ifpack2::ILUT::initialize: In serial or one-process " 365 "mode, the input matrix must be square.");
367 IsInitialized_ =
true;
369 InitializeTime_ += timer.totalElapsedTime ();
372 template<
typename ScalarType>
373 typename Teuchos::ScalarTraits<ScalarType>::magnitudeType scalar_mag(
const ScalarType& s)
375 return Teuchos::ScalarTraits<ScalarType>::magnitude(s);
379 template<
class MatrixType>
381 using Teuchos::Array;
382 using Teuchos::ArrayRCP;
383 using Teuchos::ArrayView;
386 using Teuchos::reduceAll;
416 Teuchos::Time timer (
"ILUT::compute");
418 Teuchos::TimeMonitor timeMon (timer,
true);
423 L_ = rcp (
new MatrixType (A_->getRowMap (), A_->getColMap (), 0));
424 U_ = rcp (
new MatrixType (A_->getRowMap (), A_->getColMap (), 0));
430 Array<ArrayView<const local_ordinal_type> > Uindices (myNumRows);
431 Array<ArrayView<const scalar_type> > Ucoefs (myNumRows);
436 #ifdef IFPACK2_WRITE_FACTORS 437 std::ofstream ofsL(
"L.tif.mtx", std::ios::out);
438 std::ofstream ofsU(
"U.tif.mtx", std::ios::out);
451 double local_nnz =
static_cast<double>(A_->getNodeNumEntries());
455 fill = ((fillLevel - 1) * local_nnz) / (2 * myNumRows);
461 double fill_ceil=std::ceil(fill);
465 size_type fillL =
static_cast<size_type
>(fill_ceil);
466 size_type fillU =
static_cast<size_type
>(fill_ceil);
468 Array<scalar_type> InvDiagU (myNumRows, zero);
470 Array<local_ordinal_type> tmp_idx;
471 Array<scalar_type> tmpv;
473 enum { UNUSED, ORIG, FILL };
476 Array<int> pattern(max_col, UNUSED);
477 Array<scalar_type> cur_row(max_col, zero);
478 Array<magnitude_type> unorm(max_col);
479 magnitude_type rownorm;
480 Array<local_ordinal_type> L_cols_heap;
481 Array<local_ordinal_type> U_cols;
482 Array<local_ordinal_type> L_vals_heap;
483 Array<local_ordinal_type> U_vals_heap;
488 greater_indirect<scalar_type,local_ordinal_type> vals_comp(cur_row);
494 ArrayRCP<local_ordinal_type> ColIndicesARCP;
495 ArrayRCP<scalar_type> ColValuesARCP;
496 if (! A_->supportsRowViews ()) {
497 const size_t maxnz = A_->getNodeMaxNumRowEntries ();
498 ColIndicesARCP.resize (maxnz);
499 ColValuesARCP.resize (maxnz);
503 ArrayView<const local_ordinal_type> ColIndicesA;
504 ArrayView<const scalar_type> ColValuesA;
507 if (A_->supportsRowViews ()) {
508 A_->getLocalRowView (row_i, ColIndicesA, ColValuesA);
509 RowNnz = ColIndicesA.size ();
512 A_->getLocalRowCopy (row_i, ColIndicesARCP (), ColValuesARCP (), RowNnz);
513 ColIndicesA = ColIndicesARCP (0, RowNnz);
514 ColValuesA = ColValuesARCP (0, RowNnz);
519 U_cols.push_back(row_i);
520 cur_row[row_i] = zero;
521 pattern[row_i] = ORIG;
523 size_type L_cols_heaplen = 0;
524 rownorm = STM::zero ();
525 for (
size_t i = 0; i < RowNnz; ++i) {
526 if (ColIndicesA[i] < myNumRows) {
527 if (ColIndicesA[i] < row_i) {
528 add_to_heap(ColIndicesA[i], L_cols_heap, L_cols_heaplen);
530 else if (ColIndicesA[i] > row_i) {
531 U_cols.push_back(ColIndicesA[i]);
534 cur_row[ColIndicesA[i]] = ColValuesA[i];
535 pattern[ColIndicesA[i]] = ORIG;
536 rownorm += scalar_mag(ColValuesA[i]);
547 size_type orig_U_len = U_cols.size();
548 RowNnz = L_cols_heap.size() + orig_U_len;
552 size_type L_vals_heaplen = 0;
553 while (L_cols_heaplen > 0) {
556 scalar_type multiplier = cur_row[row_k] * InvDiagU[row_k];
557 cur_row[row_k] = multiplier;
558 magnitude_type mag_mult = scalar_mag(multiplier);
559 if (mag_mult*unorm[row_k] < rownorm) {
560 pattern[row_k] = UNUSED;
564 if (pattern[row_k] != ORIG) {
565 if (L_vals_heaplen < fillL) {
566 add_to_heap(row_k, L_vals_heap, L_vals_heaplen, vals_comp);
568 else if (L_vals_heaplen==0 ||
569 mag_mult < scalar_mag(cur_row[L_vals_heap.front()])) {
570 pattern[row_k] = UNUSED;
575 pattern[L_vals_heap.front()] = UNUSED;
577 add_to_heap(row_k, L_vals_heap, L_vals_heaplen, vals_comp);
583 ArrayView<const local_ordinal_type>& ColIndicesU = Uindices[row_k];
584 ArrayView<const scalar_type>& ColValuesU = Ucoefs[row_k];
585 size_type ColNnzU = ColIndicesU.size();
587 for(size_type j=0; j<ColNnzU; ++j) {
588 if (ColIndicesU[j] > row_k) {
591 if (pattern[col_j] != UNUSED) {
592 cur_row[col_j] -= tmp;
594 else if (scalar_mag(tmp) > rownorm) {
595 cur_row[col_j] = -tmp;
596 pattern[col_j] = FILL;
598 U_cols.push_back(col_j);
614 for (size_type i = 0; i < ColIndicesA.size (); ++i) {
615 if (ColIndicesA[i] < row_i) {
616 tmp_idx.push_back(ColIndicesA[i]);
617 tmpv.push_back(cur_row[ColIndicesA[i]]);
618 pattern[ColIndicesA[i]] = UNUSED;
623 for (size_type j = 0; j < L_vals_heaplen; ++j) {
624 tmp_idx.push_back(L_vals_heap[j]);
625 tmpv.push_back(cur_row[L_vals_heap[j]]);
626 pattern[L_vals_heap[j]] = UNUSED;
634 L_->insertLocalValues (row_i, tmp_idx (), tmpv ());
635 #ifdef IFPACK2_WRITE_FACTORS 636 for (size_type ii = 0; ii < tmp_idx.size (); ++ii) {
637 ofsL << row_i <<
" " << tmp_idx[ii] <<
" " << tmpv[ii] << std::endl;
645 if (cur_row[row_i] == zero) {
646 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;
647 cur_row[row_i] = rownorm;
649 InvDiagU[row_i] = one / cur_row[row_i];
652 tmp_idx.push_back(row_i);
653 tmpv.push_back(cur_row[row_i]);
654 unorm[row_i] = scalar_mag(cur_row[row_i]);
655 pattern[row_i] = UNUSED;
661 size_type U_vals_heaplen = 0;
662 for(size_type j=1; j<U_cols.size(); ++j) {
664 if (pattern[col] != ORIG) {
665 if (U_vals_heaplen < fillU) {
666 add_to_heap(col, U_vals_heap, U_vals_heaplen, vals_comp);
668 else if (U_vals_heaplen!=0 && scalar_mag(cur_row[col]) >
669 scalar_mag(cur_row[U_vals_heap.front()])) {
671 add_to_heap(col, U_vals_heap, U_vals_heaplen, vals_comp);
675 tmp_idx.push_back(col);
676 tmpv.push_back(cur_row[col]);
677 unorm[row_i] += scalar_mag(cur_row[col]);
679 pattern[col] = UNUSED;
682 for(size_type j=0; j<U_vals_heaplen; ++j) {
683 tmp_idx.push_back(U_vals_heap[j]);
684 tmpv.push_back(cur_row[U_vals_heap[j]]);
685 unorm[row_i] += scalar_mag(cur_row[U_vals_heap[j]]);
688 unorm[row_i] /= (orig_U_len + U_vals_heaplen);
690 U_->insertLocalValues(row_i, tmp_idx(), tmpv() );
691 #ifdef IFPACK2_WRITE_FACTORS 692 for(
int ii=0; ii<tmp_idx.size(); ++ii) {
693 ofsU <<row_i<<
" " <<tmp_idx[ii]<<
" " <<tmpv[ii]<< std::endl;
699 U_->getLocalRowView(row_i, Uindices[row_i], Ucoefs[row_i] );
711 ComputeTime_ += timer.totalElapsedTime ();
717 template <
class MatrixType>
719 const Tpetra::MultiVector<typename MatrixType::scalar_type, typename MatrixType::local_ordinal_type, typename MatrixType::global_ordinal_type, typename MatrixType::node_type>& X,
720 Tpetra::MultiVector<typename MatrixType::scalar_type, typename MatrixType::local_ordinal_type, typename MatrixType::global_ordinal_type, typename MatrixType::node_type>& Y,
721 Teuchos::ETransp mode,
722 typename MatrixType::scalar_type alpha,
723 typename MatrixType::scalar_type beta)
const 725 this->
template applyTempl<scalar_type,scalar_type>(X, Y, mode, alpha, beta);
729 template <
class MatrixType>
730 template <
class DomainScalar,
class RangeScalar>
732 const Tpetra::MultiVector<DomainScalar, typename MatrixType::local_ordinal_type, typename MatrixType::global_ordinal_type, typename MatrixType::node_type>& X,
733 Tpetra::MultiVector<RangeScalar, typename MatrixType::local_ordinal_type, typename MatrixType::global_ordinal_type, typename MatrixType::node_type>& Y,
734 Teuchos::ETransp mode,
736 RangeScalar beta)
const 740 typedef Tpetra::MultiVector<DomainScalar, local_ordinal_type, global_ordinal_type, node_type> MV;
742 Teuchos::Time timer (
"ILUT::apply");
744 Teuchos::TimeMonitor timeMon (timer,
true);
746 TEUCHOS_TEST_FOR_EXCEPTION(
748 "Ifpack2::ILUT::apply: You must call compute() to compute the incomplete " 749 "factorization, before calling apply().");
751 TEUCHOS_TEST_FOR_EXCEPTION(
752 X.getNumVectors() != Y.getNumVectors(), std::runtime_error,
753 "Ifpack2::ILUT::apply: X and Y must have the same number of columns. " 754 "X has " << X.getNumVectors () <<
" columns, but Y has " 755 << Y.getNumVectors () <<
" columns.");
757 TEUCHOS_TEST_FOR_EXCEPTION(
758 beta != STS::zero (), std::logic_error,
759 "Ifpack2::ILUT::apply: This method does not currently work when beta != 0.");
764 if (X.getLocalMV ().getValues () == Y.getLocalMV ().getValues ()) {
765 Xcopy = rcp (
new MV (X));
768 Xcopy = rcpFromRef (X);
771 if (mode == Teuchos::NO_TRANS) {
772 L_->template localSolve<RangeScalar,DomainScalar> (*Xcopy, Y, Teuchos::NO_TRANS);
773 U_->template localSolve<RangeScalar,RangeScalar> (Y, Y, Teuchos::NO_TRANS);
776 U_->template localSolve<RangeScalar,DomainScalar> (*Xcopy, Y, mode);
777 L_->template localSolve<RangeScalar,RangeScalar> (Y, Y, mode);
780 if (alpha != STS::one ()) {
785 ApplyTime_ += timer.totalElapsedTime ();
789 template <
class MatrixType>
791 std::ostringstream oss;
792 oss << Teuchos::Describable::description();
795 oss <<
"{status: [initialized, computed]";
798 oss <<
"{status: [initialized, not computed]";
802 oss <<
"{status: [not initialized, not computed]";
804 oss <<
", global number of rows: " << A_->getGlobalNumRows()
805 <<
", global number of columns: " << A_->getGlobalNumCols()
811 template <
class MatrixType>
815 using Teuchos::VERB_DEFAULT;
816 using Teuchos::VERB_NONE;
817 using Teuchos::VERB_LOW;
818 using Teuchos::VERB_MEDIUM;
819 using Teuchos::VERB_HIGH;
820 using Teuchos::VERB_EXTREME;
822 const Teuchos::EVerbosityLevel vl = (verbLevel == VERB_DEFAULT) ? VERB_LOW : verbLevel;
823 Teuchos::OSTab tab (out);
829 if (vl != VERB_NONE &&
getComm ()->getRank () == 0) {
832 out <<
"===============================================================================" << endl;
837 if (Condest_ == -1.0) { out <<
"Condition number estimate = N/A" << endl; }
838 else { out <<
"Condition number estimate = " << Condest_ << endl; }
840 out <<
"Number of nonzeros in A = " << A_->getGlobalNumEntries() << endl;
842 <<
" ( = " << 100.0 * (double)
getGlobalNumEntries() / (double)A_->getGlobalNumEntries() <<
" % of A)" << endl;
843 out <<
"nonzeros / rows = " << 1.0 *
getGlobalNumEntries() / U_->getGlobalNumRows() << endl;
846 out <<
"Phase # calls Total Time (s) " << endl;
847 out <<
"------------ ------- ---------------" << endl;
851 out <<
"===============================================================================" << endl;
magnitude_type getDropTolerance() const
Gets the dropping tolerance.
Definition: Ifpack2_ILUT_decl.hpp:311
CondestType
Ifpack2::CondestType: enum to define the type of condition number estimate.
Definition: Ifpack2_CondestType.hpp:50
bool hasTransposeApply() const
Whether this object's apply() method can apply the transpose (or conjugate transpose, if applicable).
Definition: Ifpack2_ILUT_def.hpp:277
virtual ~ILUT()
Destructor.
Definition: Ifpack2_ILUT_def.hpp:137
const Teuchos::RCP< const Tpetra::Map< local_ordinal_type, global_ordinal_type, node_type > > & getDomainMap() const
Tpetra::Map representing the domain of this operator.
Definition: Ifpack2_ILUT_def.hpp:262
Teuchos::ScalarTraits< scalar_type >::magnitudeType magnitude_type
The type of the magnitude (absolute value) of a matrix entry.
Definition: Ifpack2_ILUT_decl.hpp:135
global_size_t getGlobalNumEntries() const
Returns the number of nonzero entries in the global graph.
Definition: Ifpack2_ILUT_def.hpp:319
void initialize()
Clear any previously computed factors.
Definition: Ifpack2_ILUT_def.hpp:350
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:812
std::string description() const
Return a simple one-line description of this object.
Definition: Ifpack2_ILUT_def.hpp:790
size_t getNodeNumEntries() const
Returns the number of nonzero entries in the local graph.
Definition: Ifpack2_ILUT_def.hpp:325
magnitude_type getRelaxValue() const
Get the relax value.
Definition: Ifpack2_ILUT_decl.hpp:306
ILUT(const Teuchos::RCP< const Tpetra::RowMatrix< scalar_type, local_ordinal_type, global_ordinal_type, node_type > > &A)
Constructor.
Definition: Ifpack2_ILUT_def.hpp:113
void rm_heap_root(Teuchos::Array< Ordinal > &heap, SizeType &heap_len)
Definition: Ifpack2_Heap.hpp:91
Teuchos::RCP< const Tpetra::RowMatrix< scalar_type, local_ordinal_type, global_ordinal_type, node_type > > getMatrix() const
Returns a reference to the matrix to be preconditioned.
Definition: Ifpack2_ILUT_def.hpp:255
magnitude_type computeCondEst(CondestType CT=Cheap, local_ordinal_type MaxIters=1550, magnitude_type Tol=1e-9, const Teuchos::Ptr< const Tpetra::RowMatrix< scalar_type, local_ordinal_type, global_ordinal_type, node_type > > &Matrix_in=Teuchos::null)
Computes the estimated condition number and returns the value.
Definition: Ifpack2_ILUT_def.hpp:333
magnitude_type getRelativeThreshold() const
Get relative threshold value.
Definition: Ifpack2_ILUT_decl.hpp:301
MatrixType::scalar_type scalar_type
The type of the entries of the input MatrixType.
Definition: Ifpack2_ILUT_decl.hpp:107
const Teuchos::RCP< const Teuchos::Comm< int > > & getComm() const
Returns the Tpetra::BlockMap object associated with the range of this matrix operator.
Definition: Ifpack2_ILUT_def.hpp:248
void applyTempl(const Tpetra::MultiVector< DomainScalar, local_ordinal_type, global_ordinal_type, node_type > &X, Tpetra::MultiVector< RangeScalar, local_ordinal_type, global_ordinal_type, node_type > &Y, Teuchos::ETransp mode=Teuchos::NO_TRANS, RangeScalar alpha=Teuchos::ScalarTraits< scalar_type >::one(), RangeScalar beta=Teuchos::ScalarTraits< scalar_type >::zero()) const
Returns the result of a ILUT forward/back solve on a Tpetra::MultiVector X in Y.
const Teuchos::RCP< const Tpetra::Map< local_ordinal_type, global_ordinal_type, node_type > > & getRangeMap() const
Tpetra::Map representing the range of this operator.
Definition: Ifpack2_ILUT_def.hpp:270
magnitude_type getAbsoluteThreshold() const
Get absolute threshold value.
Definition: Ifpack2_ILUT_decl.hpp:296
magnitude_type getLevelOfFill() const
The level of fill.
Definition: Ifpack2_ILUT_decl.hpp:291
void compute()
Compute factors L and U using the specified diagonal perturbation thresholds and relaxation parameter...
Definition: Ifpack2_ILUT_def.hpp:380
int getNumInitialize() const
Returns the number of calls to Initialize().
Definition: Ifpack2_ILUT_def.hpp:283
double getApplyTime() const
Returns the time spent in apply().
Definition: Ifpack2_ILUT_def.hpp:313
Definition: Ifpack2_BlockRelaxation_decl.hpp:64
bool isComputed() const
If compute() is completed, this query returns true, otherwise it returns false.
Definition: Ifpack2_ILUT_decl.hpp:199
void add_to_heap(const Ordinal &idx, Teuchos::Array< Ordinal > &heap, SizeType &heap_len)
Definition: Ifpack2_Heap.hpp:69
double getInitializeTime() const
Returns the time spent in Initialize().
Definition: Ifpack2_ILUT_def.hpp:301
Ifpack2::Container: a pure virtual class for creating and solving local linear problems.
Definition: Ifpack2_AdditiveSchwarz_decl.hpp:67
bool isInitialized() const
Returns true if the preconditioner has been successfully initialized.
Definition: Ifpack2_ILUT_decl.hpp:184
int getNumApply() const
Returns the number of calls to apply().
Definition: Ifpack2_ILUT_def.hpp:295
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
Returns the result of a ILUT forward/back solve on a Tpetra::MultiVector X in Y.
Definition: Ifpack2_ILUT_def.hpp:718
double getComputeTime() const
Returns the time spent in Compute().
Definition: Ifpack2_ILUT_def.hpp:307
void setParameters(const Teuchos::ParameterList ¶ms)
Set parameters for the preconditioner.
Definition: Ifpack2_ILUT_def.hpp:142
int getNumCompute() const
Returns the number of calls to Compute().
Definition: Ifpack2_ILUT_def.hpp:289
MatrixType::local_ordinal_type local_ordinal_type
The type of local indices in the input MatrixType.
Definition: Ifpack2_ILUT_decl.hpp:114