Free Electron
Public Types | Public Member Functions | Private Attributes | List of all members
fe::ext::BiconjugateGradient< MATRIX, VECTOR > Class Template Reference

solve Ax=b for x More...

#include <BiconjugateGradient.h>

Inheritance diagram for fe::ext::BiconjugateGradient< MATRIX, VECTOR >:
Inheritance graph
[legend]

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
 

Detailed Description

template<typename MATRIX, typename VECTOR>
class fe::ext::BiconjugateGradient< MATRIX, VECTOR >

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.

Member Enumeration Documentation

◆ Preconditioning

template<typename MATRIX, typename VECTOR>
enum fe::ext::BiconjugateGradient::Preconditioning

Choice to alter matrix during solve.


The documentation for this class was generated from the following file: