|
|
| ILUT (const Teuchos::RCP< const row_matrix_type > &A) |
| Constructor.
|
|
virtual | ~ILUT ()=default |
| Destructor.
|
|
|
void | setParameters (const Teuchos::ParameterList ¶ms) |
| Set preconditioner parameters.
|
|
void | initialize () |
| Clear any previously computed factors.
|
|
bool | isInitialized () const |
| Returns true if the preconditioner has been successfully initialized.
|
|
void | compute () |
| Compute factors L and U using the specified diagonal perturbation thresholds and relaxation parameters.
|
|
bool | isComputed () const |
| If compute() is completed, this query returns true, otherwise it returns false.
|
|
|
virtual void | setMatrix (const Teuchos::RCP< const row_matrix_type > &A) |
| Change the matrix to be preconditioned.
|
|
|
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.
|
|
Teuchos::RCP< const map_type > | getDomainMap () const |
| Tpetra::Map representing the domain of this operator.
|
|
Teuchos::RCP< const map_type > | getRangeMap () const |
| Tpetra::Map representing the range of this operator.
|
|
bool | hasTransposeApply () const |
| Whether this object's apply() method can apply the transpose (or conjugate transpose, if applicable).
|
|
|
Teuchos::RCP< const Teuchos::Comm< int > > | getComm () const |
| Returns the input matrix's communicator.
|
|
Teuchos::RCP< const row_matrix_type > | getMatrix () const |
| Returns a reference to the matrix to be preconditioned.
|
|
Teuchos::RCP< const crs_matrix_type > | getL () const |
| Returns a reference to the L factor.
|
|
Teuchos::RCP< const crs_matrix_type > | getU () const |
| Returns a reference to the U factor.
|
|
int | getNumInitialize () const |
| Returns the number of calls to Initialize().
|
|
int | getNumCompute () const |
| Returns the number of calls to Compute().
|
|
int | getNumApply () const |
| Returns the number of calls to apply().
|
|
double | getInitializeTime () const |
| Returns the time spent in Initialize().
|
|
double | getComputeTime () const |
| Returns the time spent in Compute().
|
|
double | getApplyTime () const |
| Returns the time spent in apply().
|
|
size_t | getNodeSmootherComplexity () const |
| Get a rough estimate of cost per iteration.
|
|
double | getLevelOfFill () const |
| The level of fill.
|
|
magnitude_type | getAbsoluteThreshold () const |
| Get absolute threshold value.
|
|
magnitude_type | getRelativeThreshold () const |
| Get relative threshold value.
|
|
magnitude_type | getRelaxValue () const |
| Get the relax value.
|
|
magnitude_type | getDropTolerance () const |
| Gets the dropping tolerance.
|
|
global_size_t | getGlobalNumEntries () const |
| Returns the number of nonzero entries in the global graph.
|
|
size_t | getLocalNumEntries () const |
| Returns the number of nonzero entries in the local graph.
|
|
virtual | ~Preconditioner () |
| Destructor.
|
|
virtual void | setZeroStartingSolution (bool zeroStartingSolution) |
| Set this preconditioner's parameters.
|
|
virtual void | setMatrix (const Teuchos::RCP< const Tpetra::RowMatrix< MatrixType::scalar_type, MatrixType::local_ordinal_type, MatrixType::global_ordinal_type, MatrixType::node_type > > &A)=0 |
| Set the new matrix.
|
|
virtual | ~CanChangeMatrix () |
| Destructor.
|
|
template<class MatrixType>
class Ifpack2::ILUT< MatrixType >
ILUT (incomplete LU factorization with threshold) of a Tpetra sparse matrix.
- Template Parameters
-
A | specialization of Tpetra::RowMatrix. |
This class computes a sparse ILUT (incomplete LU) factorization with specified fill and drop tolerance, of the local part of a given sparse matrix represented as a Tpetra::RowMatrix or Tpetra::CrsMatrix. The "local part" is the square diagonal block of the matrix owned by the calling process. Thus, if the input matrix is distributed over multiple MPI processes, this preconditioner is equivalent to nonoverlapping additive Schwarz domain decomposition over the MPI processes, with ILUT as the subdomain solver on each process.
template<class MatrixType >
void Ifpack2::ILUT< MatrixType >::setParameters |
( |
const Teuchos::ParameterList & | params | ) |
|
|
virtual |
Set preconditioner parameters.
ILUT implements the following parameters:
-
"fact: ilut level-of-fill" (
double
)
-
"fact: drop tolerance" (
magnitude_type
)
-
"fact: absolute threshold" (
magnitude_type
)
-
"fact: relative threshold" (
magnitude_type
)
-
"fact: relax value" (
magnitude_type
)
"fact: drop tolerance" is the magnitude threshold for dropping entries. It corresponds to the \(\tau\) parameter in Saad's original description of ILUT. "fact: ilut level-of-fill" controls the number of entries to keep in the strict upper triangle of the current row, and in the strict lower triangle of the current row. It does not correspond to the \(p\) parameter in Saad's original description. This parameter represents a maximum fill fraction. In this implementation, the L and U factors always contains nonzeros corresponding to the original sparsity pattern of A, so this value should be >= 1.0. Letting \(fill = \frac{(level-of-fill - 1)*nnz(A)}{2*N}\), each row of the computed L and U factors contains at most \(fill\) nonzero elements in addition to those from the sparsity pattern of A. ILUT always keeps the diagonal entry in the current row, regardless of the drop tolerance or fill level.
The absolute and relative threshold parameters affect how this code modifies the diagonal entry of the output factor. These parameters are not part of the original ILUT algorithm, but we include them for consistency with other Ifpack2 preconditioners.
The "fact: relax value" parameter currently has no effect.
Implements Ifpack2::Preconditioner< MatrixType::scalar_type, MatrixType::local_ordinal_type, MatrixType::global_ordinal_type, MatrixType::node_type >.
template<class MatrixType >
Change the matrix to be preconditioned.
- Parameters
-
- Postcondition
! isInitialized ()
-
! isComputed ()
Calling this method resets the preconditioner's state. After calling this method with a nonnull input, you must first call initialize() and compute() (in that order) before you may call apply().
You may call this method with a null input. If A is null, then you may not call initialize() or compute() until you first call this method again with a nonnull input. This method invalidates any previous factorization whether or not A is null, so calling setMatrix() with a null input is one way to clear the preconditioner's state (and free any memory that it may be using).
The new matrix A need not necessarily have the same Maps or even the same communicator as the original matrix.