numerics 0.1.0
Loading...
Searching...
No Matches
linear_solver.hpp File Reference

Universal linear solver callable type. More...

#include "core/vector.hpp"
#include "linalg/solvers/solver_result.hpp"
#include <functional>

Go to the source code of this file.

Namespaces

namespace  num
 

Typedefs

using num::LinearSolver = std::function< SolverResult(const Vector &rhs, Vector &x)>
 

Detailed Description

Universal linear solver callable type.

LinearSolver is a first-class callable: given a right-hand side vector, it solves A*x = rhs in-place. Any algorithm (CG, LU, Cholesky, ...) that satisfies this contract can be stored as a LinearSolver and passed to ODE integrators, PDE time-steppers, or nonlinear solvers without change.

Factory functions in linalg/solvers/ return LinearSolver: num::make_cg_solver(A) num::make_lu_solver(A) (planned) num::make_chol_solver(A) (planned)

Definition in file linear_solver.hpp.