KrisLibrary  1.0.0
Classes | Namespaces | Functions
conjgrad.h File Reference

Template routine using preconditioned conjugate gradient to solve a linear system. More...

#include <KrisLibrary/Logger.h>
#include "vector.h"

Go to the source code of this file.

Classes

struct  Math::NullPreconditioner< Matrix >
 Identity precondtioner. More...
 
struct  Math::JacobiPreconditioner< Matrix >
 Jacobi preconditioning (inverse of diagonal) More...
 

Namespaces

 Math
 Contains all definitions in the Math package.
 

Functions

template<class Matrix , class Preconditioner >
int Math::CG (const Matrix &A, Vector &x, const Vector &b, const Preconditioner &M, int &max_iter, Real &tol)
 

Detailed Description

Template routine using preconditioned conjugate gradient to solve a linear system.