|
numerics 0.1.0
|
Problem-level solve(): the uniform solve(problem, algorithm) -> result verb over ODEProblem and LinearProblem. Repeated or warm-started linear solves use init(problem, algorithm) + solve(cache). The low-level cg()/gmres()/... kernels and ODE steppers remain the in-place primitives underneath. Stochastic sampling (MCMC) lives in solve/sample.hpp as sample(model, sampler). More...
#include "core/concepts.hpp"#include "linalg/matrix_properties.hpp"#include "linalg/solvers/cg.hpp"#include "linalg/solvers/gmres.hpp"#include "linalg/solvers/minres.hpp"#include "linalg/solvers/pcg.hpp"#include "linalg/solvers/solver_result.hpp"#include "ode/ode.hpp"#include "solve/algorithms.hpp"#include "solve/problems.hpp"#include <utility>Go to the source code of this file.
Classes | |
| struct | num::LinearSolution |
| Result of a linear solve: the solution vector plus convergence stats. More... | |
| struct | num::LinearCache< Op, Alg > |
Reusable linear-solve cache (CommonSolve init/solve!): a view of the problem plus the algorithm and the current iterate. Re-solving warm-starts from cache.u. More... | |
Namespaces | |
| namespace | num |
| namespace | num::detail |
Functions | |
| template<IsODEProblem P> | |
| ODEResult | num::solve (const P &prob, const RK45 &alg, ObserverFn obs=nullptr) |
| template<IsODEProblem P> | |
| ODEResult | num::solve (const P &prob, const RK4 &alg, ObserverFn obs=nullptr) |
| template<IsODEProblem P> | |
| ODEResult | num::solve (const P &prob, const Euler &alg, ObserverFn obs=nullptr) |
| SolverResult | num::detail::run (const linalg::SPDMatrix< Matrix > &A, const Vector &b, Vector &u, const CG &a) |
| template<class Op > requires SPDLinearOperator<Op, Vector, Vector> | |
| SolverResult | num::detail::run (const Op &A, const Vector &b, Vector &u, const CG &a) |
| SolverResult | num::detail::run (const Matrix &A, const Vector &b, Vector &u, const GMRES &a) |
| SolverResult | num::detail::run (const SparseMatrix &A, const Vector &b, Vector &u, const GMRES &a) |
| template<class Op > requires LinearOperator<Op, Vector, Vector> | |
| SolverResult | num::detail::run (const Op &A, const Vector &b, Vector &u, const GMRES &a) |
| template<class Op > requires SymmetricLinearOperator<Op, Vector, Vector> | |
| SolverResult | num::detail::run (const Op &A, const Vector &b, Vector &u, const MINRES &a) |
| template<class Op , class M > requires SPDLinearOperator<Op, Vector, Vector> && Preconditioner<M> | |
| SolverResult | num::detail::run (const Op &A, const Vector &b, Vector &u, const PCG< M > &a) |
| template<class Op , class Alg > | |
| LinearCache< Op, Alg > | num::init (const LinearProblem< Op > &prob, const Alg &alg) |
| Build a solve cache; the iterate starts at zero. | |
| template<class Op , class Alg > | |
| LinearCache< Op, Alg > | num::init (const LinearProblem< Op > &prob, const Alg &alg, Vector u0) |
| Build a solve cache seeded with an initial guess u0 (warm start). | |
| template<class Op , class Alg > | |
| LinearSolution | num::solve (LinearCache< Op, Alg > &cache) |
Re-solve from a cache, warm-starting from its current iterate; cache.u is updated in place (the C++ spelling of CommonSolve solve!). | |
| template<class Op , class Alg > | |
| LinearSolution | num::solve (const LinearProblem< Op > &prob, const Alg &alg) |
| One-shot linear solve: solve(problem, algorithm) == solve(init(...)). | |
Problem-level solve(): the uniform solve(problem, algorithm) -> result verb over ODEProblem and LinearProblem. Repeated or warm-started linear solves use init(problem, algorithm) + solve(cache). The low-level cg()/gmres()/... kernels and ODE steppers remain the in-place primitives underneath. Stochastic sampling (MCMC) lives in solve/sample.hpp as sample(model, sampler).
Definition in file solve.hpp.