|
|
| Amesos2Wrapper (const Teuchos::RCP< const row_matrix_type > &A) |
| Constructor. More...
|
|
virtual | ~Amesos2Wrapper () |
| Destructor. More...
|
|
|
void | setParameters (const Teuchos::ParameterList ¶ms) |
| Set parameters. More...
|
|
void | initialize () |
| Compute the preordering and symbolic factorization of the matrix. More...
|
|
bool | isInitialized () const |
| Returns true if the preconditioner has been successfully initialized. More...
|
|
void | compute () |
| Compute the numeric factorization of the matrix. More...
|
|
bool | isComputed () const |
| True if compute() completed successfully, else false. More...
|
|
|
virtual void | setMatrix (const Teuchos::RCP< const row_matrix_type > &A) |
| Change the matrix to be preconditioned. More...
|
|
|
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. More...
|
|
Teuchos::RCP< const map_type > | getDomainMap () const |
| Tpetra::Map representing the domain of this operator. More...
|
|
Teuchos::RCP< const map_type > | getRangeMap () const |
| Tpetra::Map representing the range of this operator. More...
|
|
bool | hasTransposeApply () const |
| Whether this object's apply() method can apply the transpose (or conjugate transpose, if applicable). More...
|
|
|
Teuchos::RCP< const Teuchos::Comm< int > > | getComm () const |
| The input matrix's communicator. More...
|
|
Teuchos::RCP< const row_matrix_type > | getMatrix () const |
| The input matrix; the matrix to be preconditioned. More...
|
|
int | getNumInitialize () const |
| The total number of successful calls to initialize(). More...
|
|
int | getNumCompute () const |
| The total number of successful calls to compute(). More...
|
|
int | getNumApply () const |
| The total number of successful calls to apply(). More...
|
|
double | getInitializeTime () const |
| The total time in seconds spent in successful calls to initialize(). More...
|
|
double | getComputeTime () const |
| The total time in seconds spent in successful calls to compute(). More...
|
|
double | getApplyTime () const |
| The total time in seconds spent in successful calls to apply(). More...
|
|
|
std::string | description () const |
| A one-line description of this object. More...
|
|
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. More...
|
|
virtual | ~Preconditioner () |
| Destructor. More...
|
|
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. More...
|
|
virtual | ~CanChangeMatrix () |
| Destructor. More...
|
|
template<class MatrixType>
class Ifpack2::Details::Amesos2Wrapper< MatrixType >
Wrapper class for direct solvers in Amesos2.
- Template Parameters
-
MatrixType | A specialization of Tpetra::RowMatrix. |
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.
- Warning
- This class is an implementation detail of Ifpack2. Users must not rely on this class. It may go away or its interface may change at any time.
-
This class creates a local filter. In particular, if the matrix is not a Tpetra::CrsMatrix instance (this class will check this at run time using a dynamic cast), then this class will perform a deep copy to produce a CrsMatrix. This will happen, for example, if you are doing additive Schwarz with nonzero overlap, and apply Amesos2 as the subdomain solve. This deep copy is required by Amesos2, and is in addition to any data copying that Amesos2 may do internally to satisfy TPL storage formats.
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.
template<class MatrixType >
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 |
|
virtual |
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
.
- Parameters
-
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. |
Implements Ifpack2::Preconditioner< MatrixType::scalar_type, MatrixType::local_ordinal_type, MatrixType::global_ordinal_type, MatrixType::node_type >.