Free Electron
|
solve Ax=b for x More...
#include <BiconjugateGradient.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 | rbar |
VECTOR | rbar_1 |
VECTOR | rbar_2 |
VECTOR | p |
VECTOR | p_1 |
VECTOR | pbar |
VECTOR | pbar_1 |
VECTOR | temp |
VECTOR | Ap |
VECTOR | m_preconditionedVector |
MATRIX | m_preconditionedMatrix |
F64 | m_threshold |
Preconditioning | m_preconditioning |
solve Ax=b for x
Uses Biconjugate-Gradient. The matrix must be positive-definite, but not necessarily symmetric. For symmetric matrices, a regular Conjugate-Gradient can be about twice as fast.
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::BiconjugateGradient::Preconditioning |
Choice to alter matrix during solve.