Linear solver interface. More...
#include <core/alien/core/backend/LinearSolver.h>
Public Types | |
| typedef AlgebraTraits< Tag >::solver_type | KernelSolver |
| The type of the solver. | |
| Public Types inherited from Alien::ILinearSolver | |
| typedef SolverStatus | Status |
| Type of the solver status. | |
Public Member Functions | |
| template<typename... T> | |
| LinearSolver (T... args) | |
| Creates a linear solver. | |
| virtual | ~LinearSolver () |
| Free resources. | |
| Arccore::String | getBackEndName () const |
| Get package back end name. | |
| void | init () |
| Initialize the linear solver. | |
| void | end () |
| Finalize the linear solver. | |
| void | updateParallelMng (Arccore::MessagePassing::IMessagePassingMng *pm) |
| update parallel_mng, required for redistribution For some solver libraries, Solver is kind of a global object and must be updated accordingly with Matrices and Vectors (Think PETScInit) | |
| bool | solve (const IMatrix &A, const IVector &b, IVector &x) |
| Solve the linear system A * x = b. | |
| const SolverStat & | getSolverStat () const |
| Get statistics on the solve phase. | |
| bool | hasParallelSupport () const |
| Indicates if the kernel is parallel. | |
| const SolverStatus & | getStatus () const |
| Get solver resolution status. | |
| std::shared_ptr< ILinearAlgebra > | algebra () const |
| Get compatible linear algebra. | |
| KernelSolver * | implem () |
| Get kernel solver implementation. | |
| virtual void | setNullSpaceConstantOption (bool flag) |
| Option to add an extra-equation. | |
| Public Member Functions inherited from Alien::ILinearSolver | |
| ILinearSolver () | |
| Constructor. | |
| virtual | ~ILinearSolver () |
| Free resources. | |
Private Attributes | |
| std::unique_ptr< KernelSolver > | m_solver |
| The linear solver kernel. | |
| SolverStater< KernelSolver > | m_stater |
Linear solver interface.
Interface for all linear solver package
| Tag | The tag of the type of solvers used |
Definition at line 63 of file LinearSolver.h.
| typedef AlgebraTraits<Tag>::solver_type Alien::LinearSolver< Tag >::KernelSolver |
The type of the solver.
Definition at line 67 of file LinearSolver.h.
|
inline |
Creates a linear solver.
Creates a linear solver using traits and the linear solver factory
| T | Variadics type of linear solver |
| [in] | args | Linear solvers |
Definition at line 79 of file LinearSolver.h.
References m_solver.
|
virtual |
Free resources.
Definition at line 43 of file LinearSolverT.h.
|
virtual |
Get compatible linear algebra.
Implements Alien::ILinearSolver.
Definition at line 157 of file LinearSolverT.h.
References m_solver.
|
virtual |
Finalize the linear solver.
Implements Alien::ILinearSolver.
Definition at line 103 of file LinearSolverT.h.
References m_solver.
|
virtual |
Get package back end name.
Implements Alien::ILinearSolver.
Definition at line 50 of file LinearSolverT.h.
|
virtual |
Get statistics on the solve phase.
Get statistics on the solver phase, such as iteration count, initialization time, solve time, etc.
Implements Alien::ILinearSolver.
Definition at line 118 of file LinearSolverT.h.
References m_solver.
|
virtual |
Get solver resolution status.
Implements Alien::ILinearSolver.
Definition at line 137 of file LinearSolverT.h.
References m_solver.
|
virtual |
Indicates if the kernel is parallel.
Implements Alien::ILinearSolver.
Definition at line 127 of file LinearSolverT.h.
References m_solver.
| LinearSolver< Tag >::KernelSolver * Alien::LinearSolver< Tag >::implem | ( | ) |
Get kernel solver implementation.
Definition at line 147 of file LinearSolverT.h.
References m_solver.
|
virtual |
Initialize the linear solver.
Implements Alien::ILinearSolver.
Definition at line 93 of file LinearSolverT.h.
References m_solver.
|
inlinevirtual |
Option to add an extra-equation.
Option to add an extra-equation to the linear system such as a constraint equation
| [in] | flag | If the option is activated |
Implements Alien::ILinearSolver.
Definition at line 160 of file LinearSolver.h.
|
virtual |
Solve the linear system A * x = b.
| [in] | A | The matrix to invert |
| [in] | b | The right hand side |
| [in,out] | x | The solution |
Implements Alien::ILinearSolver.
Definition at line 62 of file LinearSolverT.h.
References Alien::MultiMatrixImpl::distribution(), Alien::MultiMatrixImpl::get(), Alien::MultiVectorImpl::get(), Alien::IMatrix::impl(), Alien::IVector::impl(), m_solver, and Alien::MatrixDistribution::parallelMng().
|
virtual |
update parallel_mng, required for redistribution For some solver libraries, Solver is kind of a global object and must be updated accordingly with Matrices and Vectors (Think PETScInit)
| [in] | pm | : new parallel mng |
Implements Alien::ILinearSolver.
Definition at line 109 of file LinearSolverT.h.
References m_solver.
|
private |
The linear solver kernel.
Definition at line 167 of file LinearSolver.h.
Referenced by algebra(), end(), getSolverStat(), getStatus(), hasParallelSupport(), implem(), init(), LinearSolver(), solve(), and updateParallelMng().
|
private |
Definition at line 168 of file LinearSolver.h.