Loading...
Searching...
No Matches
terra::linalg::solvers::IdentitySolver< OperatorT > Class Template Reference

"Identity solver" for linear systems. More...

#include <identity_solver.hpp>

Public Types

using OperatorType = OperatorT
 Operator type to be solved.
 
using SolutionVectorType = SrcOf< OperatorType >
 Solution vector type.
 
using RHSVectorType = DstOf< OperatorType >
 Right-hand side vector type.
 

Public Member Functions

void solve_impl (OperatorType &A, SolutionVectorType &x, const RHSVectorType &b)
 Solve the linear system by assigning the right-hand side to the solution. Implements \( x = b \).
 

Detailed Description

template<OperatorLike OperatorT>
class terra::linalg::solvers::IdentitySolver< OperatorT >

"Identity solver" for linear systems.

Implements a "no-op" solve operation by directly assigning the right-hand side to the solution vector: \( x \gets b \). Satisfies the SolverLike concept (see solver.hpp). Can be used as a placeholder for "no preconditioner".

OperatorT is essentially ignored (does not need to be the identity operator).

Template Parameters
OperatorTOperator type (must satisfy OperatorLike).

Member Typedef Documentation

◆ OperatorType

template<OperatorLike OperatorT>
using terra::linalg::solvers::IdentitySolver< OperatorT >::OperatorType = OperatorT

Operator type to be solved.

◆ RHSVectorType

template<OperatorLike OperatorT>
using terra::linalg::solvers::IdentitySolver< OperatorT >::RHSVectorType = DstOf< OperatorType >

Right-hand side vector type.

◆ SolutionVectorType

template<OperatorLike OperatorT>
using terra::linalg::solvers::IdentitySolver< OperatorT >::SolutionVectorType = SrcOf< OperatorType >

Solution vector type.

Member Function Documentation

◆ solve_impl()

template<OperatorLike OperatorT>
void terra::linalg::solvers::IdentitySolver< OperatorT >::solve_impl ( OperatorType A,
SolutionVectorType x,
const RHSVectorType b 
)
inline

Solve the linear system by assigning the right-hand side to the solution. Implements \( x = b \).

Parameters
AOperator (matrix), unused.
xSolution vector (output).
bRight-hand side vector (input).

The documentation for this class was generated from the following file: