|
Ifpack2 Templated Preconditioning Package
Version 1.0
|
Wrapper class for direct solvers in Amesos2. More...
#include <Ifpack2_Details_Amesos2Wrapper_decl.hpp>

Public Member Functions | |
Constructors and destructor | |
| Amesos2Wrapper (const ::Teuchos::RCP< const row_matrix_type > &A) | |
| Constructor. | |
| virtual | ~Amesos2Wrapper () |
| Destructor. | |
Methods for setting up and computing the factorization | |
| void | setParameters (const ::Teuchos::ParameterList ¶ms) |
| Set parameters. | |
| void | initialize () |
| Compute the preordering and symbolic factorization of the matrix. | |
| bool | isInitialized () const |
Returns true if the preconditioner has been successfully initialized. | |
| void | compute () |
| Compute the numeric factorization of the matrix. | |
| bool | isComputed () const |
| True if compute() completed successfully, else false. | |
Implementation of Ifpack2::Details::CanChangeMatrix | |
| virtual void | setMatrix (const ::Teuchos::RCP< const row_matrix_type > &A) |
| Change the matrix to be preconditioned. | |
Implementation of Tpetra::Operator | |
| 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, 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). | |
Mathematical functions | |
| virtual magnitude_type TEUCHOS_DEPRECATED | 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) |
| Compute the condition number estimate and return its value. | |
| virtual magnitude_type TEUCHOS_DEPRECATED | getCondEst () const |
| Return the computed condition number estimate, or -1 if not computed. | |
| ::Teuchos::RCP< const ::Teuchos::Comm< int > > | getComm () const |
| The input matrix's communicator. | |
| ::Teuchos::RCP< const row_matrix_type > | getMatrix () const |
| The input matrix; the matrix to be preconditioned. | |
| int | getNumInitialize () const |
| The total number of successful calls to initialize(). | |
| int | getNumCompute () const |
| The total number of successful calls to compute(). | |
| int | getNumApply () const |
| The total number of successful calls to apply(). | |
| double | getInitializeTime () const |
| The total time in seconds spent in successful calls to initialize(). | |
| double | getComputeTime () const |
| The total time in seconds spent in successful calls to compute(). | |
| double | getApplyTime () const |
| The total time in seconds spent in successful calls to apply(). | |
Implementation of Teuchos::Describable | |
| std::string | description () const |
| A one-line description of this object. | |
| void | describe (::Teuchos::FancyOStream &out, const ::Teuchos::EVerbosityLevel verbLevel=::Teuchos::Describable::verbLevel_default) const |
| Print the object with some verbosity level to the given output stream. | |
Typedefs | |
| typedef MatrixType::scalar_type | scalar_type |
| The type of the entries of the input MatrixType. | |
| typedef MatrixType::local_ordinal_type | local_ordinal_type |
| The type of local indices in the input MatrixType. | |
| typedef MatrixType::global_ordinal_type | global_ordinal_type |
| The type of global indices in the input MatrixType. | |
| typedef MatrixType::node_type | node_type |
| The type of the Kokkos Node used by the input MatrixType. | |
| typedef ::Teuchos::ScalarTraits < scalar_type >::magnitudeType | magnitude_type |
| The type of the magnitude (absolute value) of a matrix entry. | |
| typedef Tpetra::RowMatrix < scalar_type, local_ordinal_type, global_ordinal_type, node_type > | row_matrix_type |
| Type of the Tpetra::RowMatrix specialization that this class uses. | |
| typedef Tpetra::Map < local_ordinal_type, global_ordinal_type, node_type > | map_type |
| Type of the Tpetra::Map specialization that this class uses. | |
| typedef 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. | |
| TEUCHOS_DEPRECATED typedef MatrixType::scalar_type | Scalar |
| Preserved only for backwards compatibility. Please use "scalar_type". | |
| TEUCHOS_DEPRECATED typedef MatrixType::local_ordinal_type | LocalOrdinal |
| Preserved only for backwards compatibility. Please use "local_ordinal_type". | |
| TEUCHOS_DEPRECATED typedef MatrixType::global_ordinal_type | GlobalOrdinal |
| Preserved only for backwards compatibility. Please use "global_ordinal_type". | |
| TEUCHOS_DEPRECATED typedef MatrixType::node_type | Node |
| Preserved only for backwards compatibility. Please use "node_type". | |
| TEUCHOS_DEPRECATED typedef::Teuchos::ScalarTraits < scalar_type >::magnitudeType | magnitudeType |
| Preserved only for backwards compatibility. Please use "magnitude_type". | |
Wrapper class for direct solvers in Amesos2.
| MatrixType | A specialization of Tpetra::CrsMatrix. |
This class computes a sparse factorization of the input matrix A using Amesos2. The apply() method solves linear system(s) using that factorization. As with all Ifpack2 preconditioners, initialize() computes the symbolic factorization, and compute() computes the numeric factorization.
MatrixType must be a specialization of Tpetra::CrsMatrix. It may not just be a specialization of Tpetra::RowMatrix. This requirement comes from Amesos2's Tpetra adapter.| typedef MatrixType::scalar_type Ifpack2::Details::Amesos2Wrapper< MatrixType >::scalar_type |
The type of the entries of the input MatrixType.
| typedef MatrixType::local_ordinal_type Ifpack2::Details::Amesos2Wrapper< MatrixType >::local_ordinal_type |
The type of local indices in the input MatrixType.
| typedef MatrixType::global_ordinal_type Ifpack2::Details::Amesos2Wrapper< MatrixType >::global_ordinal_type |
The type of global indices in the input MatrixType.
| typedef MatrixType::node_type Ifpack2::Details::Amesos2Wrapper< MatrixType >::node_type |
The type of the Kokkos Node used by the input MatrixType.
| typedef ::Teuchos::ScalarTraits<scalar_type>::magnitudeType Ifpack2::Details::Amesos2Wrapper< MatrixType >::magnitude_type |
The type of the magnitude (absolute value) of a matrix entry.
Reimplemented from Ifpack2::Preconditioner< MatrixType::scalar_type, MatrixType::local_ordinal_type, MatrixType::global_ordinal_type, MatrixType::node_type >.
| typedef Tpetra::RowMatrix<scalar_type, local_ordinal_type, global_ordinal_type, node_type> Ifpack2::Details::Amesos2Wrapper< MatrixType >::row_matrix_type |
Type of the Tpetra::RowMatrix specialization that this class uses.
| typedef Tpetra::Map<local_ordinal_type, global_ordinal_type, node_type> Ifpack2::Details::Amesos2Wrapper< MatrixType >::map_type |
Type of the Tpetra::Map specialization that this class uses.
| typedef Tpetra::CrsMatrix<scalar_type, local_ordinal_type, global_ordinal_type, node_type> Ifpack2::Details::Amesos2Wrapper< MatrixType >::crs_matrix_type |
Type of the Tpetra::CrsMatrix specialization that this class uses.
| Ifpack2::Details::Amesos2Wrapper< MatrixType >::Amesos2Wrapper | ( | const ::Teuchos::RCP< const row_matrix_type > & | A | ) | [explicit] |
Constructor.
| A | [in] The sparse matrix to factor, as a Tpetra::RowMatrix. (Tpetra::CrsMatrix inherits from this, so you may use a Tpetra::CrsMatrix here instead.) |
| Ifpack2::Details::Amesos2Wrapper< MatrixType >::~Amesos2Wrapper | ( | ) | [virtual] |
Destructor.
| void Ifpack2::Details::Amesos2Wrapper< MatrixType >::setParameters | ( | const ::Teuchos::ParameterList & | params | ) |
Set parameters.
| void Ifpack2::Details::Amesos2Wrapper< MatrixType >::initialize | ( | ) | [virtual] |
Compute the preordering and symbolic factorization of the matrix.
You must call this method before you may call compute() or apply(), under the following conditions:
Please also see the documentation of compute() for the conditions under which you must call compute() before calling apply().
| bool Ifpack2::Details::Amesos2Wrapper< MatrixType >::isInitialized | ( | ) | const [inline, virtual] |
Returns true if the preconditioner has been successfully initialized.
| void Ifpack2::Details::Amesos2Wrapper< MatrixType >::compute | ( | ) | [virtual] |
Compute the numeric factorization of the matrix.
You must call this method before you may call apply(), under the following conditions:
Please also see the documentation of initialize() for the conditions under which you must call initialize() before calling compute() or apply().
| bool Ifpack2::Details::Amesos2Wrapper< MatrixType >::isComputed | ( | ) | const [inline, virtual] |
True if compute() completed successfully, else false.
| void Ifpack2::Details::Amesos2Wrapper< MatrixType >::setMatrix | ( | const ::Teuchos::RCP< const row_matrix_type > & | A | ) | [virtual] |
Change the matrix to be preconditioned.
| A | [in] The new matrix. |
! 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.
| void Ifpack2::Details::Amesos2Wrapper< 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 |
Apply the preconditioner to X, resulting in Y.
If \(M^{-1}\) represents the action of the preconditioner, then this routine computes \(Y := beta \cdot Y + alpha \cdot Op(M^{-1}) X\), where \(Op(M^{-1})\) can be either \(M^{-1}\), \(M^{-T}\), or \(M^{-H}\), depending on mode.
| X | [in] Input multivector; "right-hand side" of the solve. |
| Y | [out] Output multivector; result of the solve. |
| mode | [in] Whether to solve with the original matrix, its transpose, or its conjugate transpose. |
| alpha | [in] Scaling factor for the result of applying the preconditioner. |
| alpha | [in] Scaling factor for Y. |
| Teuchos::RCP< const typename Amesos2Wrapper< MatrixType >::map_type > Ifpack2::Details::Amesos2Wrapper< MatrixType >::getDomainMap | ( | ) | const [virtual] |
Tpetra::Map representing the domain of this operator.
| Teuchos::RCP< const typename Amesos2Wrapper< MatrixType >::map_type > Ifpack2::Details::Amesos2Wrapper< MatrixType >::getRangeMap | ( | ) | const [virtual] |
Tpetra::Map representing the range of this operator.
| bool Ifpack2::Details::Amesos2Wrapper< MatrixType >::hasTransposeApply | ( | ) | const |
Whether this object's apply() method can apply the transpose (or conjugate transpose, if applicable).
| Amesos2Wrapper< MatrixType >::magnitude_type Ifpack2::Details::Amesos2Wrapper< MatrixType >::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 |
||
| ) | [virtual] |
Compute the condition number estimate and return its value.
| virtual magnitude_type TEUCHOS_DEPRECATED Ifpack2::Details::Amesos2Wrapper< MatrixType >::getCondEst | ( | ) | const [inline, virtual] |
Return the computed condition number estimate, or -1 if not computed.
| Teuchos::RCP< const Teuchos::Comm< int > > Ifpack2::Details::Amesos2Wrapper< MatrixType >::getComm | ( | ) | const |
The input matrix's communicator.
| Teuchos::RCP< const typename Amesos2Wrapper< MatrixType >::row_matrix_type > Ifpack2::Details::Amesos2Wrapper< MatrixType >::getMatrix | ( | ) | const [virtual] |
The input matrix; the matrix to be preconditioned.
| int Ifpack2::Details::Amesos2Wrapper< MatrixType >::getNumInitialize | ( | ) | const [virtual] |
The total number of successful calls to initialize().
| int Ifpack2::Details::Amesos2Wrapper< MatrixType >::getNumCompute | ( | ) | const [virtual] |
The total number of successful calls to compute().
| int Ifpack2::Details::Amesos2Wrapper< MatrixType >::getNumApply | ( | ) | const [virtual] |
The total number of successful calls to apply().
| double Ifpack2::Details::Amesos2Wrapper< MatrixType >::getInitializeTime | ( | ) | const [virtual] |
The total time in seconds spent in successful calls to initialize().
| double Ifpack2::Details::Amesos2Wrapper< MatrixType >::getComputeTime | ( | ) | const [virtual] |
The total time in seconds spent in successful calls to compute().
| double Ifpack2::Details::Amesos2Wrapper< MatrixType >::getApplyTime | ( | ) | const [virtual] |
The total time in seconds spent in successful calls to apply().
| std::string Ifpack2::Details::Amesos2Wrapper< MatrixType >::description | ( | ) | const |
A one-line description of this object.
| void Ifpack2::Details::Amesos2Wrapper< MatrixType >::describe | ( | ::Teuchos::FancyOStream & | out, |
| const ::Teuchos::EVerbosityLevel | verbLevel = ::Teuchos::Describable::verbLevel_default |
||
| ) | const |
Print the object with some verbosity level to the given output stream.
| TEUCHOS_DEPRECATED typedef MatrixType::scalar_type Ifpack2::Details::Amesos2Wrapper< MatrixType >::Scalar |
Preserved only for backwards compatibility. Please use "scalar_type".
| TEUCHOS_DEPRECATED typedef MatrixType::local_ordinal_type Ifpack2::Details::Amesos2Wrapper< MatrixType >::LocalOrdinal |
Preserved only for backwards compatibility. Please use "local_ordinal_type".
| TEUCHOS_DEPRECATED typedef MatrixType::global_ordinal_type Ifpack2::Details::Amesos2Wrapper< MatrixType >::GlobalOrdinal |
Preserved only for backwards compatibility. Please use "global_ordinal_type".
| TEUCHOS_DEPRECATED typedef MatrixType::node_type Ifpack2::Details::Amesos2Wrapper< MatrixType >::Node |
Preserved only for backwards compatibility. Please use "node_type".
| TEUCHOS_DEPRECATED typedef ::Teuchos::ScalarTraits<scalar_type>::magnitudeType Ifpack2::Details::Amesos2Wrapper< MatrixType >::magnitudeType |
Preserved only for backwards compatibility. Please use "magnitude_type".
Reimplemented from Ifpack2::Preconditioner< MatrixType::scalar_type, MatrixType::local_ordinal_type, MatrixType::global_ordinal_type, MatrixType::node_type >.
1.7.6.1