template<class LinearSystem>
SolverBase class
Abstract base class for linear algebra solvers.
Template parameters | |
---|---|
LinearSystem | Type of linear system to solve |
Base class for linear system solvers.
Represents an object which can solve sysystems of the type:
where has type , the solution has type , and the right hand side has type .
This abstract base class defines the interface for solving linear systems of equations. Derived classes implement specific solver algorithms such as direct factorization methods or iterative methods.
Base classes
- class Copyable
- Abstract base class for objects that can be copied.
Public types
-
using ScalarType = typename FormLanguage::
Traits<LinearSystem>::ScalarType - Scalar type used in the linear system.
-
using VectorType = typename FormLanguage::
Traits<LinearSystem>::VectorType - Vector type for solution and right-hand side.
-
using OperatorType = typename FormLanguage::
Traits<LinearSystem>::OperatorType - Operator (matrix) type for the linear system.
-
using ProblemBaseType = Variational::
ProblemBase<LinearSystem> - Base problem type.
- using Parent = Copyable
- Parent class type.
Constructors, destructors, conversion operators
- ~SolverBase() defaulted virtual
- Default virtual destructor.
- SolverBase(ProblemBaseType& pb)
- Constructs a solver for the given problem.
- SolverBase(const SolverBase& other)
- Copy constructor.
- SolverBase(SolverBase&& other)
- Move constructor.
Public functions
Function documentation
template<class LinearSystem>
Rodin:: Solver:: SolverBase<LinearSystem>:: SolverBase(ProblemBaseType& pb)
Constructs a solver for the given problem.
Parameters | |
---|---|
pb | Reference to the problem to solve |
template<class LinearSystem>
Rodin:: Solver:: SolverBase<LinearSystem>:: SolverBase(const SolverBase& other)
Copy constructor.
Parameters | |
---|---|
other | Solver to copy from |
template<class LinearSystem>
Rodin:: Solver:: SolverBase<LinearSystem>:: SolverBase(SolverBase&& other)
Move constructor.
Parameters | |
---|---|
other | Solver to move from |
template<class LinearSystem>
void Rodin:: Solver:: SolverBase<LinearSystem>:: solve()
Solves the associated problem.
This method delegates solving to the problem's solve method, passing this solver as the argument.
template<class LinearSystem>
void Rodin:: Solver:: SolverBase<LinearSystem>:: solve(LinearSystem& system) pure virtual
Solves the linear system.
Parameters | |
---|---|
system in/out | The linear system to solve. The solution is stored in the system's solution vector. |
Solves the linear system where is the matrix operator, is the solution vector, and is the right-hand side vector.