Amesos2 - Direct Sparse Solver Interfaces
Version of the Day
|
Interface to Amesos2 solver objects. More...
#include <Amesos2_Solver_decl.hpp>
Public Types | |
typedef Solver< Matrix, Vector > | type |
Public Member Functions | |
Mathematical Functions | |
virtual type & | preOrdering (void)=0 |
Pre-orders the matrix. More... | |
virtual type & | symbolicFactorization (void)=0 |
Performs symbolic factorization on the matrix. More... | |
virtual type & | numericFactorization (void)=0 |
Performs numeric factorization on the matrix. More... | |
virtual void | solve (void)=0 |
Solves (or ) More... | |
virtual void | solve (const Teuchos::Ptr< Vector > X, const Teuchos::Ptr< const Vector > B) const =0 |
Solve using the given X and B vectors. More... | |
virtual void | solve (Vector *X, const Vector *B) const =0 |
Solve using the given X and B vectors. More... | |
Parameter Methods | |
virtual type & | setParameters (const Teuchos::RCP< Teuchos::ParameterList > ¶meterList)=0 |
Set/update internal variables and solver options. More... | |
virtual Teuchos::RCP< const Teuchos::ParameterList > | getValidParameters (void) const =0 |
Return a const parameter list of all of the valid parameters that this->setParameterList(...) will accept. | |
Accessor Methods | |
virtual void | setA (const Teuchos::RCP< const Matrix > a, EPhase keep_phase=CLEAN)=0 |
Sets the matrix A of this solver. More... | |
virtual void | setA (const Matrix *a, EPhase keep_phase=CLEAN)=0 |
Sets the matrix A of this solver. More... | |
virtual bool | matrixShapeOK (void)=0 |
Returns true if the solver can handle the matrix shape. | |
virtual void | setX (const Teuchos::RCP< Vector > x)=0 |
Sets the LHS vector X. | |
virtual void | setX (Vector *x)=0 |
Sets the LHS vector X using a raw pointer. | |
virtual const Teuchos::RCP < Vector > | getX (void)=0 |
Returns the vector that is the LHS of the linear system. | |
virtual Vector * | getXRaw (void)=0 |
Returns a raw pointer to the LHS of the linear system. | |
virtual void | setB (const Teuchos::RCP< const Vector > b)=0 |
Sets the RHS vector B. | |
virtual void | setB (const Vector *b)=0 |
Sets the RHS vector B using a raw pointer. | |
virtual const Teuchos::RCP < const Vector > | getB (void)=0 |
Returns the vector that is the RHS of the linear system. | |
virtual const Vector * | getBRaw (void)=0 |
Returns a raw pointer to the RHS of the linear system. | |
virtual Teuchos::RCP< const Teuchos::Comm< int > > | getComm (void) const =0 |
Returns a pointer to the Teuchos::Comm communicator with this matrix. | |
virtual Status & | getStatus () const =0 |
Returns a reference to this solver's internal status object. | |
virtual std::string | name (void) const =0 |
Return the name of this solver. | |
Methods implementing Describable | |
virtual std::string | description (void) const =0 |
Returns a short description of this Solver. | |
virtual void | describe (Teuchos::FancyOStream &out, const Teuchos::EVerbosityLevel verbLevel=Teuchos::Describable::verbLevel_default) const =0 |
Performance and Timing | |
virtual void | printTiming (Teuchos::FancyOStream &out, const Teuchos::EVerbosityLevel verbLevel=Teuchos::Describable::verbLevel_default) const =0 |
Prints timing information about the current solver. | |
virtual void | getTiming (Teuchos::ParameterList &timingParameterList) const =0 |
Extracts timing information from the current solver. More... | |
Interface to Amesos2 solver objects.
Specifies a uniform interface for interaction with Amesos2 solver wrappers to third-party libraries.
This class holds no definitions itself; it is a contract for concrete solver interfaces only.
|
pure virtual |
Pre-orders the matrix.
Uses the default solver option, unless a solver-specific pre-ordering parameter is given.
Implemented in Amesos2::SolverCore< ConcreteSolver, Matrix, Vector >, Amesos2::SolverCore< Amesos2::STRUMPACK, Matrix, Vector >, Amesos2::SolverCore< Amesos2::ShyLUBasker, Matrix, Vector >, Amesos2::SolverCore< Amesos2::CssMKL, Matrix, Vector >, Amesos2::SolverCore< Amesos2::Superlumt, Matrix, Vector >, Amesos2::SolverCore< Amesos2::Superlu, Matrix, Vector >, Amesos2::SolverCore< Amesos2::Lapack, Matrix, Vector >, Amesos2::SolverCore< Amesos2::Superludist, Matrix, Vector >, Amesos2::SolverCore< Amesos2::cuSOLVER, Matrix, Vector >, Amesos2::SolverCore< Amesos2::Cholmod, Matrix, Vector >, Amesos2::SolverCore< Amesos2::MUMPS, Matrix, Vector >, Amesos2::SolverCore< Amesos2::TachoSolver, Matrix, Vector >, Amesos2::SolverCore< Amesos2::Basker, Matrix, Vector >, Amesos2::SolverCore< Amesos2::KLU2, Matrix, Vector >, Amesos2::SolverCore< Amesos2::PardisoMKL, Matrix, Vector >, and Amesos2::SolverCore< Amesos2::Umfpack, Matrix, Vector >.
|
pure virtual |
Performs symbolic factorization on the matrix.
null
Implemented in Amesos2::SolverCore< ConcreteSolver, Matrix, Vector >, Amesos2::SolverCore< Amesos2::STRUMPACK, Matrix, Vector >, Amesos2::SolverCore< Amesos2::ShyLUBasker, Matrix, Vector >, Amesos2::SolverCore< Amesos2::CssMKL, Matrix, Vector >, Amesos2::SolverCore< Amesos2::Superlumt, Matrix, Vector >, Amesos2::SolverCore< Amesos2::Superlu, Matrix, Vector >, Amesos2::SolverCore< Amesos2::Lapack, Matrix, Vector >, Amesos2::SolverCore< Amesos2::Superludist, Matrix, Vector >, Amesos2::SolverCore< Amesos2::cuSOLVER, Matrix, Vector >, Amesos2::SolverCore< Amesos2::Cholmod, Matrix, Vector >, Amesos2::SolverCore< Amesos2::MUMPS, Matrix, Vector >, Amesos2::SolverCore< Amesos2::TachoSolver, Matrix, Vector >, Amesos2::SolverCore< Amesos2::Basker, Matrix, Vector >, Amesos2::SolverCore< Amesos2::KLU2, Matrix, Vector >, Amesos2::SolverCore< Amesos2::PardisoMKL, Matrix, Vector >, and Amesos2::SolverCore< Amesos2::Umfpack, Matrix, Vector >.
|
pure virtual |
Performs numeric factorization on the matrix.
numericFactorization checks first that symbolicFactorization has successfully been called, and if not, calls it before continuing.
null
Implemented in Amesos2::SolverCore< ConcreteSolver, Matrix, Vector >, Amesos2::SolverCore< Amesos2::STRUMPACK, Matrix, Vector >, Amesos2::SolverCore< Amesos2::ShyLUBasker, Matrix, Vector >, Amesos2::SolverCore< Amesos2::CssMKL, Matrix, Vector >, Amesos2::SolverCore< Amesos2::Superlumt, Matrix, Vector >, Amesos2::SolverCore< Amesos2::Superlu, Matrix, Vector >, Amesos2::SolverCore< Amesos2::Lapack, Matrix, Vector >, Amesos2::SolverCore< Amesos2::Superludist, Matrix, Vector >, Amesos2::SolverCore< Amesos2::cuSOLVER, Matrix, Vector >, Amesos2::SolverCore< Amesos2::Cholmod, Matrix, Vector >, Amesos2::SolverCore< Amesos2::MUMPS, Matrix, Vector >, Amesos2::SolverCore< Amesos2::TachoSolver, Matrix, Vector >, Amesos2::SolverCore< Amesos2::Basker, Matrix, Vector >, Amesos2::SolverCore< Amesos2::KLU2, Matrix, Vector >, Amesos2::SolverCore< Amesos2::PardisoMKL, Matrix, Vector >, and Amesos2::SolverCore< Amesos2::Umfpack, Matrix, Vector >.
Referenced by Amesos2::SolverCore< ConcreteSolver, Matrix, Vector >::solve().
|
pure virtual |
Solves (or )
solve checks first that numericFactorization has successfully been called, and if not, calls it before continuing.
X
and B
must not be null
X
(given at construction time) contains the solution to the system. Implemented in Amesos2::SolverCore< ConcreteSolver, Matrix, Vector >, Amesos2::SolverCore< Amesos2::STRUMPACK, Matrix, Vector >, Amesos2::SolverCore< Amesos2::ShyLUBasker, Matrix, Vector >, Amesos2::SolverCore< Amesos2::CssMKL, Matrix, Vector >, Amesos2::SolverCore< Amesos2::Superlumt, Matrix, Vector >, Amesos2::SolverCore< Amesos2::Superlu, Matrix, Vector >, Amesos2::SolverCore< Amesos2::Lapack, Matrix, Vector >, Amesos2::SolverCore< Amesos2::Superludist, Matrix, Vector >, Amesos2::SolverCore< Amesos2::cuSOLVER, Matrix, Vector >, Amesos2::SolverCore< Amesos2::Cholmod, Matrix, Vector >, Amesos2::SolverCore< Amesos2::MUMPS, Matrix, Vector >, Amesos2::SolverCore< Amesos2::TachoSolver, Matrix, Vector >, Amesos2::SolverCore< Amesos2::Basker, Matrix, Vector >, Amesos2::SolverCore< Amesos2::KLU2, Matrix, Vector >, Amesos2::SolverCore< Amesos2::PardisoMKL, Matrix, Vector >, and Amesos2::SolverCore< Amesos2::Umfpack, Matrix, Vector >.
|
pure virtual |
Solve using the given X and B vectors.
This overload of solve uses the given X and B vectors when solving. This X and B are used in place of any X and B that were given upon construction of the Amesos2 solver instance and are used only for this solve.
If a permanent change of X and B are required, see the setX() and setB() methods.
X
contains the solution to the systemX
and B
given at construction time (if any) are unchanged. Implemented in Amesos2::SolverCore< ConcreteSolver, Matrix, Vector >, Amesos2::SolverCore< Amesos2::STRUMPACK, Matrix, Vector >, Amesos2::SolverCore< Amesos2::ShyLUBasker, Matrix, Vector >, Amesos2::SolverCore< Amesos2::CssMKL, Matrix, Vector >, Amesos2::SolverCore< Amesos2::Superlumt, Matrix, Vector >, Amesos2::SolverCore< Amesos2::Superlu, Matrix, Vector >, Amesos2::SolverCore< Amesos2::Lapack, Matrix, Vector >, Amesos2::SolverCore< Amesos2::Superludist, Matrix, Vector >, Amesos2::SolverCore< Amesos2::cuSOLVER, Matrix, Vector >, Amesos2::SolverCore< Amesos2::Cholmod, Matrix, Vector >, Amesos2::SolverCore< Amesos2::MUMPS, Matrix, Vector >, Amesos2::SolverCore< Amesos2::TachoSolver, Matrix, Vector >, Amesos2::SolverCore< Amesos2::Basker, Matrix, Vector >, Amesos2::SolverCore< Amesos2::KLU2, Matrix, Vector >, Amesos2::SolverCore< Amesos2::PardisoMKL, Matrix, Vector >, and Amesos2::SolverCore< Amesos2::Umfpack, Matrix, Vector >.
|
pure virtual |
Solve using the given X and B vectors.
This overload of solve uses the given X and B vectors when solving. This X and B are used in place of any X and B that were given upon construction of the Amesos2 solver instance and are used only for this solve.
If a permanent change of X and B are required, see the setX() and setB() methods.
X
contains the solution to the systemX
and B
given at construction time (if any) are unchanged. Implemented in Amesos2::SolverCore< ConcreteSolver, Matrix, Vector >, Amesos2::SolverCore< Amesos2::STRUMPACK, Matrix, Vector >, Amesos2::SolverCore< Amesos2::ShyLUBasker, Matrix, Vector >, Amesos2::SolverCore< Amesos2::CssMKL, Matrix, Vector >, Amesos2::SolverCore< Amesos2::Superlumt, Matrix, Vector >, Amesos2::SolverCore< Amesos2::Superlu, Matrix, Vector >, Amesos2::SolverCore< Amesos2::Lapack, Matrix, Vector >, Amesos2::SolverCore< Amesos2::Superludist, Matrix, Vector >, Amesos2::SolverCore< Amesos2::cuSOLVER, Matrix, Vector >, Amesos2::SolverCore< Amesos2::Cholmod, Matrix, Vector >, Amesos2::SolverCore< Amesos2::MUMPS, Matrix, Vector >, Amesos2::SolverCore< Amesos2::TachoSolver, Matrix, Vector >, Amesos2::SolverCore< Amesos2::Basker, Matrix, Vector >, Amesos2::SolverCore< Amesos2::KLU2, Matrix, Vector >, Amesos2::SolverCore< Amesos2::PardisoMKL, Matrix, Vector >, and Amesos2::SolverCore< Amesos2::Umfpack, Matrix, Vector >.
|
pure virtual |
Set/update internal variables and solver options.
Expects that parameterList be named "Amesos2". That list may contain Amesos2-specific parameters. In addition, it may contain sublist for solver-specific parameters. These sublists should be named according to what is returned by the name() function (i.e. The solver's name when enabling for Amesos2 during configuration).
See each solver interface directly for a list of the supported parameters for that solver.
Implemented in Amesos2::SolverCore< ConcreteSolver, Matrix, Vector >, Amesos2::SolverCore< Amesos2::STRUMPACK, Matrix, Vector >, Amesos2::SolverCore< Amesos2::ShyLUBasker, Matrix, Vector >, Amesos2::SolverCore< Amesos2::CssMKL, Matrix, Vector >, Amesos2::SolverCore< Amesos2::Superlumt, Matrix, Vector >, Amesos2::SolverCore< Amesos2::Superlu, Matrix, Vector >, Amesos2::SolverCore< Amesos2::Lapack, Matrix, Vector >, Amesos2::SolverCore< Amesos2::Superludist, Matrix, Vector >, Amesos2::SolverCore< Amesos2::cuSOLVER, Matrix, Vector >, Amesos2::SolverCore< Amesos2::Cholmod, Matrix, Vector >, Amesos2::SolverCore< Amesos2::MUMPS, Matrix, Vector >, Amesos2::SolverCore< Amesos2::TachoSolver, Matrix, Vector >, Amesos2::SolverCore< Amesos2::Basker, Matrix, Vector >, Amesos2::SolverCore< Amesos2::KLU2, Matrix, Vector >, Amesos2::SolverCore< Amesos2::PardisoMKL, Matrix, Vector >, and Amesos2::SolverCore< Amesos2::Umfpack, Matrix, Vector >.
|
pure virtual |
Sets the matrix A of this solver.
[in] | a | An RCP to a matrix will will be used for future computation steps |
[in] | keep_phase | This parameter tells the solver what state it should keep. For example, you may want to replace the matrix but keep the symbolic factorization because you know the structure of the new matrix is the same as the structure of the old matrix. In this case you would pass Amesos2::SYMBFACT as this parameter. |
The default value for the second parameter is Amesos2::CLEAN, which means that the internal state of the solver will be completely reset. It will be as if no previous computational steps were performed.
Implemented in Amesos2::SolverCore< ConcreteSolver, Matrix, Vector >, Amesos2::SolverCore< Amesos2::STRUMPACK, Matrix, Vector >, Amesos2::SolverCore< Amesos2::ShyLUBasker, Matrix, Vector >, Amesos2::SolverCore< Amesos2::CssMKL, Matrix, Vector >, Amesos2::SolverCore< Amesos2::Superlumt, Matrix, Vector >, Amesos2::SolverCore< Amesos2::Superlu, Matrix, Vector >, Amesos2::SolverCore< Amesos2::Lapack, Matrix, Vector >, Amesos2::SolverCore< Amesos2::Superludist, Matrix, Vector >, Amesos2::SolverCore< Amesos2::cuSOLVER, Matrix, Vector >, Amesos2::SolverCore< Amesos2::Cholmod, Matrix, Vector >, Amesos2::SolverCore< Amesos2::MUMPS, Matrix, Vector >, Amesos2::SolverCore< Amesos2::TachoSolver, Matrix, Vector >, Amesos2::SolverCore< Amesos2::Basker, Matrix, Vector >, Amesos2::SolverCore< Amesos2::KLU2, Matrix, Vector >, Amesos2::SolverCore< Amesos2::PardisoMKL, Matrix, Vector >, and Amesos2::SolverCore< Amesos2::Umfpack, Matrix, Vector >.
|
pure virtual |
Sets the matrix A of this solver.
[in] | a | An raw C pointer to a matrix will will be used for future computation steps. |
[in] | keep_phase | This parameter tells the solver what state it should keep. For example, you may want to replace the matrix but keep the symbolic factorization because you know the structure of the new matrix is the same as the structure of the old matrix. In this case you would pass Amesos2::SYMBFACT as this parameter. |
The default value for the second parameter is Amesos2::CLEAN, which means that the internal state of the solver will be completely reset. It will be as if no previous computational steps were performed.
Implemented in Amesos2::SolverCore< ConcreteSolver, Matrix, Vector >, Amesos2::SolverCore< Amesos2::STRUMPACK, Matrix, Vector >, Amesos2::SolverCore< Amesos2::ShyLUBasker, Matrix, Vector >, Amesos2::SolverCore< Amesos2::CssMKL, Matrix, Vector >, Amesos2::SolverCore< Amesos2::Superlumt, Matrix, Vector >, Amesos2::SolverCore< Amesos2::Superlu, Matrix, Vector >, Amesos2::SolverCore< Amesos2::Lapack, Matrix, Vector >, Amesos2::SolverCore< Amesos2::Superludist, Matrix, Vector >, Amesos2::SolverCore< Amesos2::cuSOLVER, Matrix, Vector >, Amesos2::SolverCore< Amesos2::Cholmod, Matrix, Vector >, Amesos2::SolverCore< Amesos2::MUMPS, Matrix, Vector >, Amesos2::SolverCore< Amesos2::TachoSolver, Matrix, Vector >, Amesos2::SolverCore< Amesos2::Basker, Matrix, Vector >, Amesos2::SolverCore< Amesos2::KLU2, Matrix, Vector >, Amesos2::SolverCore< Amesos2::PardisoMKL, Matrix, Vector >, and Amesos2::SolverCore< Amesos2::Umfpack, Matrix, Vector >.
|
pure virtual |
Prints the status information about the current solver with some level of verbosity.
Implemented in Amesos2::SolverCore< ConcreteSolver, Matrix, Vector >, Amesos2::SolverCore< Amesos2::STRUMPACK, Matrix, Vector >, Amesos2::SolverCore< Amesos2::ShyLUBasker, Matrix, Vector >, Amesos2::SolverCore< Amesos2::CssMKL, Matrix, Vector >, Amesos2::SolverCore< Amesos2::Superlumt, Matrix, Vector >, Amesos2::SolverCore< Amesos2::Superlu, Matrix, Vector >, Amesos2::SolverCore< Amesos2::Lapack, Matrix, Vector >, Amesos2::SolverCore< Amesos2::Superludist, Matrix, Vector >, Amesos2::SolverCore< Amesos2::cuSOLVER, Matrix, Vector >, Amesos2::SolverCore< Amesos2::Cholmod, Matrix, Vector >, Amesos2::SolverCore< Amesos2::MUMPS, Matrix, Vector >, Amesos2::SolverCore< Amesos2::TachoSolver, Matrix, Vector >, Amesos2::SolverCore< Amesos2::Basker, Matrix, Vector >, Amesos2::SolverCore< Amesos2::KLU2, Matrix, Vector >, Amesos2::SolverCore< Amesos2::PardisoMKL, Matrix, Vector >, and Amesos2::SolverCore< Amesos2::Umfpack, Matrix, Vector >.
|
pure virtual |
Extracts timing information from the current solver.
Results are placed in the parameter list timingParameterList
timingParameterList | Accepts timing information from the current solver |
Implemented in Amesos2::SolverCore< ConcreteSolver, Matrix, Vector >, Amesos2::SolverCore< Amesos2::STRUMPACK, Matrix, Vector >, Amesos2::SolverCore< Amesos2::ShyLUBasker, Matrix, Vector >, Amesos2::SolverCore< Amesos2::CssMKL, Matrix, Vector >, Amesos2::SolverCore< Amesos2::Superlumt, Matrix, Vector >, Amesos2::SolverCore< Amesos2::Superlu, Matrix, Vector >, Amesos2::SolverCore< Amesos2::Lapack, Matrix, Vector >, Amesos2::SolverCore< Amesos2::Superludist, Matrix, Vector >, Amesos2::SolverCore< Amesos2::cuSOLVER, Matrix, Vector >, Amesos2::SolverCore< Amesos2::Cholmod, Matrix, Vector >, Amesos2::SolverCore< Amesos2::MUMPS, Matrix, Vector >, Amesos2::SolverCore< Amesos2::TachoSolver, Matrix, Vector >, Amesos2::SolverCore< Amesos2::Basker, Matrix, Vector >, Amesos2::SolverCore< Amesos2::KLU2, Matrix, Vector >, Amesos2::SolverCore< Amesos2::PardisoMKL, Matrix, Vector >, and Amesos2::SolverCore< Amesos2::Umfpack, Matrix, Vector >.