|
| typedef Tpetra::RowMatrix< scalar_type, local_ordinal_type, global_ordinal_type, node_type > | row_matrix_type |
| | Tpetra::RowMatrix specialization used by this class.
|
| |
| typedef Tpetra::CrsMatrix< scalar_type, local_ordinal_type, global_ordinal_type, node_type > | crs_matrix_type |
| | Tpetra::CrsMatrix specialization used by this class.
|
| |
| typedef Tpetra::Vector< scalar_type, local_ordinal_type, global_ordinal_type, node_type > | vector_type |
| | Tpetra::Vector specialization used by this class.
|
| |
| typedef Tpetra::Map< local_ordinal_type, global_ordinal_type, node_type > | map_type |
| | Tpetra::Map specialization used by this class.
|
| |
| typedef Teuchos::ScalarTraits< MatrixType::scalar_type >::magnitudeType | magnitude_type |
| | The type of the magnitude (absolute value) of a matrix entry.
|
| |
|
| | Diagonal (const Teuchos::RCP< const row_matrix_type > &A) |
| | Constructor that takes a Tpetra::RowMatrix.
|
| |
| | Diagonal (const Teuchos::RCP< const crs_matrix_type > &A_in) |
| | Constructor that takes a Tpetra::CrsMatrix.
|
| |
| | Diagonal (const Teuchos::RCP< const vector_type > &diag) |
| | Constructor that accepts a Tpetra::Vector of inverse diagonal entries.
|
| |
| virtual | ~Diagonal () |
| | Destructor.
|
| |
| void | setParameters (const Teuchos::ParameterList ¶ms) |
| | Sets parameters on this object.
|
| |
| void | initialize () |
| | Initialize.
|
| |
| bool | isInitialized () const |
| | Returns true if the preconditioner has been successfully initialized.
|
| |
| void | compute () |
| | Compute the preconditioner.
|
| |
| bool | isComputed () const |
| | Return true if compute() has been called.
|
| |
|
| 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 preconditioner to X, putting the result in Y.
|
| |
| Teuchos::RCP< const map_type > | getDomainMap () const |
| | The Tpetra::Map representing this operator's domain.
|
| |
| Teuchos::RCP< const map_type > | getRangeMap () const |
| | The Tpetra::Map representing this operator's range.
|
| |
|
| Teuchos::RCP< const row_matrix_type > | getMatrix () const |
| | Return the communicator associated with this matrix operator.
|
| |
| double | getComputeFlops () const |
| | Return the number of flops in the computation phase.
|
| |
| double | getApplyFlops () const |
| | Return the number of flops for the application of the preconditioner.
|
| |
| int | getNumInitialize () const |
| | Return the number of calls to initialize().
|
| |
| int | getNumCompute () const |
| | Return the number of calls to compute().
|
| |
| int | getNumApply () const |
| | Return the number of calls to apply().
|
| |
| double | getInitializeTime () const |
| | Return the time spent in initialize().
|
| |
| double | getComputeTime () const |
| | Return the time spent in compute().
|
| |
| double | getApplyTime () const |
| | Return the time spent in apply().
|
| |
| 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::Diagonal< MatrixType >
Diagonal preconditioner.
- Template Parameters
-
| MatrixType | A specialization of Tpetra::RowMatrix. |
This class wraps a Tpetra::Vector as a diagonal preconditioner. The preconditioner is defined as
\[
z_i = D_i r_i,
\]
where \(r\) is the Vector to be preconditioned, \(z\) is the Vector result of applying the preconditioner to \(r\), and \(D_i\) is the i-th element of the scaling vector.
When Diagonal is constructed with a matrix, \(D\) contains the inverted diagonal elements from the matrix. When Diagonal is constructed with a Tpetra::Vector, \(D\) is the caller-supplied vector.
template<class MatrixType >
Change the matrix to be preconditioned.
- Parameters
-
- Postcondition
! isInitialized ()
-
! isComputed ()
Calling this method with a matrix different than the current matrix 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.
template<class MatrixType >
| void Ifpack2::Diagonal< MatrixType >::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 |
|
virtual |