Free Electron
|
solve Ax=b for x More...
#include <ConjugateGradient2.h>
Public Types | |
enum | Preconditioning { e_none, e_diagonal_A } |
Choice to alter matrix during solve. More... | |
Public Member Functions | |
void | solve (VECTOR &x, const MATRIX &A, const VECTOR &b) |
void | setThreshold (F64 threshold) |
void | setPreconditioning (Preconditioning preconditioning) |
Private Attributes | |
VECTOR | r |
VECTOR | r_1 |
VECTOR | r_2 |
VECTOR | p |
VECTOR | p_1 |
VECTOR | temp |
VECTOR | Ap |
VECTOR | y |
VECTOR | m_AT_b |
VECTOR | m_preconditionedVector |
MATRIX | m_tempMatrix |
MATRIX | m_AT |
MATRIX | m_AT_A |
MATRIX | m_preconditionedMatrix |
F64 | m_threshold |
Preconditioning | m_preconditioning |
solve Ax=b for x
Uses Conjugate-Gradient. The matrix must be positive-definite and symmetric.
The arguments are templated, so any argument types should work, given that they have the appropriate methods and operators.
TODO try seeding with previous x instead of clearing to zero.
enum fe::ext::ConjugateGradient2::Preconditioning |
Choice to alter matrix during solve.