|
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. | |
| virtual type & | symbolicFactorization (void)=0 |
| Performs symbolic factorization on the matrix. | |
| virtual type & | numericFactorization (void)=0 |
| Performs numeric factorization on the matrix. | |
| virtual void | solve (void)=0 |
Solves (or ) | |
| virtual void | solve (const Teuchos::Ptr< Vector > X, const Teuchos::Ptr< const Vector > B) const =0 |
Solve using the given X and B vectors. | |
| virtual void | solve (Vector *X, const Vector *B) const =0 |
Solve using the given X and B vectors. | |
Parameter Methods | |
| virtual type & | setParameters (const Teuchos::RCP< Teuchos::ParameterList > ¶meterList)=0 |
| Set/update internal variables and solver options. | |
|
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. | |
| virtual void | setA (const Matrix *a, EPhase keep_phase=CLEAN)=0 |
| Sets the matrix A of this solver. | |
| 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. | |
Related Functions | |
(Note that these are not member functions.) | |
| template<class Matrix , class Vector > | |
| Solver< Matrix, Vector > * | create (const Matrix *A, Vector *X, const Vector *B) |
| Creates an Amesos2 Solver interface with Matrix A, LHS vector X, and RHS vector B. | |
| template<class Matrix , class Vector > | |
| Teuchos::RCP< Solver< Matrix, Vector > > | create (Teuchos::RCP< const Matrix > A, Teuchos::RCP< Vector > X, Teuchos::RCP< const Vector > B) |
| Creates an Amesos2 Solver interface with Matrix A, LHS vector X, and RHS vector B. | |
| template<class Matrix , class Vector > | |
| Solver< Matrix, Vector > * | create (const char *solverName, const Matrix *A, Vector *X, const Vector *B) |
| Creates an Amesos2 Solver interface with Matrix A, LHS vector X, and RHS vector B. | |
| template<class Matrix , class Vector > | |
| Teuchos::RCP< Solver< Matrix, Vector > > | create (const char *solverName, const Teuchos::RCP< const Matrix > A, const Teuchos::RCP< Vector > X, const Teuchos::RCP< const Vector > B) |
| Creates an Amesos2 Solver interface with Matrix A, LHS vector X, and RHS vector B. | |
| template<class Matrix , class Vector > | |
| Solver< Matrix, Vector > * | create (const std::string solverName, const Matrix *A, Vector *X, const Vector *B) |
| Creates an Amesos2 Solver interface with Matrix A, LHS vector X, and RHS vector B. | |
| template<class Matrix , class Vector > | |
| Teuchos::RCP< Solver< Matrix, Vector > > | create (const std::string solverName, const Teuchos::RCP< const Matrix > A, const Teuchos::RCP< Vector > X, const Teuchos::RCP< const Vector > B) |
| Creates an Amesos2 Solver interface with Matrix A, LHS vector X, and RHS vector B. | |
| template<class Matrix , class Vector > | |
| Solver< Matrix, Vector > * | create (const std::string solverName, const Matrix *A) |
| Creates an Amesos2 Solver interface with Matrix A. | |
| template<class Matrix , class Vector > | |
| Teuchos::RCP< Solver< Matrix, Vector > > | create (const std::string solverName, const Teuchos::RCP< const Matrix > A) |
| Creates an Amesos2 Solver interface with Matrix A. | |
| bool | query (const char *solverName) |
| Queries the Factory for support of the named third-party library. | |
| bool | query (const std::string solverName) |
| Queries the Factory for support of the named third-party library. | |
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.
| virtual type& Amesos2::Solver< Matrix, Vector >::preOrdering | ( | void | ) | [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::Superlumt, Matrix, Vector >, Amesos2::SolverCore< Amesos2::Superlu, Matrix, Vector >, Amesos2::SolverCore< Amesos2::Lapack, Matrix, Vector >, Amesos2::SolverCore< Amesos2::Superludist, Matrix, Vector >, Amesos2::SolverCore< Amesos2::Cholmod, Matrix, Vector >, Amesos2::SolverCore< Amesos2::KLU2, Matrix, Vector >, and Amesos2::SolverCore< Amesos2::PardisoMKL, Matrix, Vector >.
| virtual type& Amesos2::Solver< Matrix, Vector >::symbolicFactorization | ( | void | ) | [pure virtual] |
Performs symbolic factorization on the matrix.
null Implemented in Amesos2::SolverCore< ConcreteSolver, 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::Cholmod, Matrix, Vector >, Amesos2::SolverCore< Amesos2::KLU2, Matrix, Vector >, and Amesos2::SolverCore< Amesos2::PardisoMKL, Matrix, Vector >.
| virtual type& Amesos2::Solver< Matrix, Vector >::numericFactorization | ( | void | ) | [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::Superlumt, Matrix, Vector >, Amesos2::SolverCore< Amesos2::Superlu, Matrix, Vector >, Amesos2::SolverCore< Amesos2::Lapack, Matrix, Vector >, Amesos2::SolverCore< Amesos2::Superludist, Matrix, Vector >, Amesos2::SolverCore< Amesos2::Cholmod, Matrix, Vector >, Amesos2::SolverCore< Amesos2::KLU2, Matrix, Vector >, and Amesos2::SolverCore< Amesos2::PardisoMKL, Matrix, Vector >.
| virtual void Amesos2::Solver< Matrix, Vector >::solve | ( | void | ) | [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::Superlumt, Matrix, Vector >, Amesos2::SolverCore< Amesos2::Superlu, Matrix, Vector >, Amesos2::SolverCore< Amesos2::Lapack, Matrix, Vector >, Amesos2::SolverCore< Amesos2::Superludist, Matrix, Vector >, Amesos2::SolverCore< Amesos2::Cholmod, Matrix, Vector >, Amesos2::SolverCore< Amesos2::KLU2, Matrix, Vector >, and Amesos2::SolverCore< Amesos2::PardisoMKL, Matrix, Vector >.
| virtual void Amesos2::Solver< Matrix, Vector >::solve | ( | const Teuchos::Ptr< Vector > | X, |
| const Teuchos::Ptr< const Vector > | B | ||
| ) | const [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::Superlumt, Matrix, Vector >, Amesos2::SolverCore< Amesos2::Superlu, Matrix, Vector >, Amesos2::SolverCore< Amesos2::Lapack, Matrix, Vector >, Amesos2::SolverCore< Amesos2::Superludist, Matrix, Vector >, Amesos2::SolverCore< Amesos2::Cholmod, Matrix, Vector >, Amesos2::SolverCore< Amesos2::KLU2, Matrix, Vector >, and Amesos2::SolverCore< Amesos2::PardisoMKL, Matrix, Vector >.
| virtual void Amesos2::Solver< Matrix, Vector >::solve | ( | Vector * | X, |
| const Vector * | B | ||
| ) | const [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::Superlumt, Matrix, Vector >, Amesos2::SolverCore< Amesos2::Superlu, Matrix, Vector >, Amesos2::SolverCore< Amesos2::Lapack, Matrix, Vector >, Amesos2::SolverCore< Amesos2::Superludist, Matrix, Vector >, Amesos2::SolverCore< Amesos2::Cholmod, Matrix, Vector >, Amesos2::SolverCore< Amesos2::KLU2, Matrix, Vector >, and Amesos2::SolverCore< Amesos2::PardisoMKL, Matrix, Vector >.
| virtual type& Amesos2::Solver< Matrix, Vector >::setParameters | ( | const Teuchos::RCP< Teuchos::ParameterList > & | parameterList | ) | [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::Superlumt, Matrix, Vector >, Amesos2::SolverCore< Amesos2::Superlu, Matrix, Vector >, Amesos2::SolverCore< Amesos2::Lapack, Matrix, Vector >, Amesos2::SolverCore< Amesos2::Superludist, Matrix, Vector >, Amesos2::SolverCore< Amesos2::Cholmod, Matrix, Vector >, Amesos2::SolverCore< Amesos2::KLU2, Matrix, Vector >, and Amesos2::SolverCore< Amesos2::PardisoMKL, Matrix, Vector >.
| virtual void Amesos2::Solver< Matrix, Vector >::setA | ( | const Teuchos::RCP< const Matrix > | a, |
| EPhase | keep_phase = CLEAN |
||
| ) | [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::Superlumt, Matrix, Vector >, Amesos2::SolverCore< Amesos2::Superlu, Matrix, Vector >, Amesos2::SolverCore< Amesos2::Lapack, Matrix, Vector >, Amesos2::SolverCore< Amesos2::Superludist, Matrix, Vector >, Amesos2::SolverCore< Amesos2::Cholmod, Matrix, Vector >, Amesos2::SolverCore< Amesos2::KLU2, Matrix, Vector >, and Amesos2::SolverCore< Amesos2::PardisoMKL, Matrix, Vector >.
| virtual void Amesos2::Solver< Matrix, Vector >::setA | ( | const Matrix * | a, |
| EPhase | keep_phase = CLEAN |
||
| ) | [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::Superlumt, Matrix, Vector >, Amesos2::SolverCore< Amesos2::Superlu, Matrix, Vector >, Amesos2::SolverCore< Amesos2::Lapack, Matrix, Vector >, Amesos2::SolverCore< Amesos2::Superludist, Matrix, Vector >, Amesos2::SolverCore< Amesos2::Cholmod, Matrix, Vector >, Amesos2::SolverCore< Amesos2::KLU2, Matrix, Vector >, and Amesos2::SolverCore< Amesos2::PardisoMKL, Matrix, Vector >.
| virtual void Amesos2::Solver< Matrix, Vector >::describe | ( | Teuchos::FancyOStream & | out, |
| const Teuchos::EVerbosityLevel | verbLevel = Teuchos::Describable::verbLevel_default |
||
| ) | const [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::Superlumt, Matrix, Vector >, Amesos2::SolverCore< Amesos2::Superlu, Matrix, Vector >, Amesos2::SolverCore< Amesos2::Lapack, Matrix, Vector >, Amesos2::SolverCore< Amesos2::Superludist, Matrix, Vector >, Amesos2::SolverCore< Amesos2::Cholmod, Matrix, Vector >, Amesos2::SolverCore< Amesos2::KLU2, Matrix, Vector >, and Amesos2::SolverCore< Amesos2::PardisoMKL, Matrix, Vector >.
| virtual void Amesos2::Solver< Matrix, Vector >::getTiming | ( | Teuchos::ParameterList & | timingParameterList | ) | const [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::Superlumt, Matrix, Vector >, Amesos2::SolverCore< Amesos2::Superlu, Matrix, Vector >, Amesos2::SolverCore< Amesos2::Lapack, Matrix, Vector >, Amesos2::SolverCore< Amesos2::Superludist, Matrix, Vector >, Amesos2::SolverCore< Amesos2::Cholmod, Matrix, Vector >, Amesos2::SolverCore< Amesos2::KLU2, Matrix, Vector >, and Amesos2::SolverCore< Amesos2::PardisoMKL, Matrix, Vector >.
| Solver< Matrix, Vector > * create | ( | const Matrix * | A, |
| Vector * | X, | ||
| const Vector * | B | ||
| ) | [related] |
Creates an Amesos2 Solver interface with Matrix A, LHS vector X, and RHS vector B.
This is the default option which interfaces with the native KLU2 solver.
| [in] | A | pointer to a matrix of coefficients |
| [in] | X | pointer to LHS solution vector |
| [in] | B | pointer to RHS vector |
C pointer to a KLU2 solver interface. | Teuchos::RCP< Solver< Matrix, Vector > > create | ( | Teuchos::RCP< const Matrix > | A, |
| Teuchos::RCP< Vector > | X, | ||
| Teuchos::RCP< const Vector > | B | ||
| ) | [related] |
Creates an Amesos2 Solver interface with Matrix A, LHS vector X, and RHS vector B.
This is the default option which interfaces with the native KLU2 solver.
| [in] | A | Teuchos::RCP to the coefficient matrix |
| [in] | X | Teuchos::RCP to LHS solution vector |
| [in] | B | Teuchos::RCP to RHS vector |
Teuchos::RCP to a KLU2 solver interface. | Solver< Matrix, Vector > * create | ( | const char * | solverName, |
| const Matrix * | A, | ||
| Vector * | X, | ||
| const Vector * | B | ||
| ) | [related] |
Creates an Amesos2 Solver interface with Matrix A, LHS vector X, and RHS vector B.
| [in] | solverName | A C character string with the name of the underlying third-party solver desired. |
| [in] | A | pointer to a matrix of coefficients |
| [in] | X | pointer to LHS solution vector |
| [in] | B | pointer to RHS vector |
C pointer to an Amesos2 solver interface.| std::invalid_argument | The third-party solver named by solverName is not supported. |
| Teuchos::RCP< Solver< Matrix, Vector > > create | ( | const char * | solverName, |
| const Teuchos::RCP< const Matrix > | A, | ||
| const Teuchos::RCP< Vector > | X, | ||
| const Teuchos::RCP< const Vector > | B | ||
| ) | [related] |
Creates an Amesos2 Solver interface with Matrix A, LHS vector X, and RHS vector B.
| [in] | solverName | The name of the desired third-party solver |
| [in] | A | Teuchos::RCP to the coefficient matrix |
| [in] | X | Teuchos::RCP to LHS solution vector |
| [in] | B | Teuchos::RCP to RHS vector |
Teuchos::RCP to an Amesos2 solver interface.| std::invalid_argument | The third-party solver named by solverName is not supported. |
| Solver< Matrix, Vector > * create | ( | const std::string | solverName, |
| const Matrix * | A, | ||
| Vector * | X, | ||
| const Vector * | B | ||
| ) | [related] |
Creates an Amesos2 Solver interface with Matrix A, LHS vector X, and RHS vector B.
| [in] | solverName | The name of the desired third-party solver |
| [in] | A | C pointer to the coefficient matrix |
| [in] | X | C pointer to LHS solution vector |
| [in] | B | C pointer to RHS vector |
C pointer to an Amesos2 solver interface.| std::invalid_argument | The third-party solver named by solverName is not supported. |
| Teuchos::RCP< Solver< Matrix, Vector > > create | ( | const std::string | solverName, |
| const Teuchos::RCP< const Matrix > | A, | ||
| const Teuchos::RCP< Vector > | X, | ||
| const Teuchos::RCP< const Vector > | B | ||
| ) | [related] |
Creates an Amesos2 Solver interface with Matrix A, LHS vector X, and RHS vector B.
| [in] | solverName | The name of the desired third-party solver |
| [in] | A | Teuchos::RCP to the coefficient matrix |
| [in] | X | Teuchos::RCP to LHS solution vector |
| [in] | B | Teuchos::RCP to RHS vector |
Teuchos::RCP to an Amesos2 solver interface.| std::invalid_argument | The third-party solver named by solverName is not supported. |
| Solver< Matrix, Vector > * create | ( | const std::string | solverName, |
| const Matrix * | A | ||
| ) | [related] |
Creates an Amesos2 Solver interface with Matrix A.
Suitable for cases where numeric factorization must be performed before the X and B vectors are known. Before a solve, the setX() and setB() functions should be used to set X and B, or the overloaded solve(X,B) method should be used.
| [in] | solverName | The name of the desired third-party solver |
| [in] | A | C pointer to the coefficient matrix |
C pointer to an Amesos2 solver interface.| std::invalid_argument | The third-party solver named by solverName is not supported. |
| Teuchos::RCP< Solver< Matrix, Vector > > create | ( | const std::string | solverName, |
| const Teuchos::RCP< const Matrix > | A | ||
| ) | [related] |
Creates an Amesos2 Solver interface with Matrix A.
Suitable for cases where numeric factorization must be performed before the X and B vectors are known. Before a solve, the setX() and setB() functions should be used to set X and B, or the overloaded solve(X,B) method should be used.
| [in] | solverName | The name of the desired third-party solver |
| [in] | A | Teuchos::RCP to the coefficient matrix |
Teuchos::RCP to an Amesos2 solver interface.| std::invalid_argument | The third-party solver named by solverName is not supported. |
| bool query | ( | const char * | solverName | ) | [related] |
Queries the Factory for support of the named third-party library.
true if the solver is supported. | bool query | ( | const std::string | solverName | ) | [related] |
Queries the Factory for support of the named third-party library.
true if the solver is supported.
1.7.6.1