|
Mundy: Multibody Nonlocal Dynamics Version of the Day
|
Wraps an SPD operator as its inverse: apply(rhs, out) solves op * out = rhs via matrix-free CG. More...
#include <linear_system.hpp>
Public Types | |
| using | backend_t = Backend |
| using | x_vector_t = decltype(Backend::make_domain_vector(std::declval<const Op&>())) |
| using | range_vector_t = decltype(Backend::make_range_vector(std::declval<const Op&>())) |
| using | op_workspace_t = impl::workspace_for_t<Op> |
| using | value_type = impl::vector_value_type<x_vector_t> |
| using | config_t = CGConfig<value_type> |
Public Member Functions | |
| CGInvOp (Backend, Op &&op, const config_t &cfg, bool warm_start=false) | |
| Backend | backend () const |
| size_t | domain_size () const |
| size_t | range_size () const |
| auto | make_domain_vector () const |
| auto | make_range_vector () const |
| template<class RhsVector, class OutVector> | |
| void | apply (const RhsVector &rhs, OutVector &out) const |
| out := op^{-1} rhs, via CG. | |
| const CGResult< value_type > & | last_result () const |
x/r/p/Ap and the operator's own workspace are allocated once at construction and reused; only the lightweight per-call CGState/LinearSystem wrappers are rebuilt in apply(). Warm-starting is an explicit constructor flag, not hidden in the algorithm – solve_linear_system always treats state.x() as the caller's initial guess.
| using mundy::CGInvOp< Backend, Op >::backend_t = Backend |
| using mundy::CGInvOp< Backend, Op >::x_vector_t = decltype(Backend::make_domain_vector(std::declval<const Op&>())) |
| using mundy::CGInvOp< Backend, Op >::range_vector_t = decltype(Backend::make_range_vector(std::declval<const Op&>())) |
| using mundy::CGInvOp< Backend, Op >::op_workspace_t = impl::workspace_for_t<Op> |
| using mundy::CGInvOp< Backend, Op >::value_type = impl::vector_value_type<x_vector_t> |
| using mundy::CGInvOp< Backend, Op >::config_t = CGConfig<value_type> |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |