MFEM v2.0
|
Go to the source code of this file.
Functions | |
void | CG (const Operator &A, const Vector &b, Vector &x, int print_iter=0, int max_num_iter=1000, double RTOLERANCE=10e-12, double ATOLERANCE=10e-24) |
void | PCG (const Operator &A, const Operator &B, const Vector &b, Vector &x, int print_iter=0, int max_num_iter=1000, double RTOLERANCE=10e-12, double ATOLERANCE=10e-24, int save=0) |
int | GMRES (const Operator &A, Vector &x, const Vector &b, const Operator &M, int &max_iter, int m, double &tol, double &atol, int printit) |
A GMRES solver. | |
int | aGMRES (const Operator &A, Vector &x, const Vector &b, const Operator &M, int &max_iter, int m_max, int m_min, int m_step, double cf, double &tol, double &atol, int printit) |
int | BiCGSTAB (const Operator &A, Vector &x, const Vector &b, const Operator &M, int &max_iter, double &tol, double atol, int printit) |
A BiCG-Stab solver. | |
void | SLI (const Operator &A, const Operator &B, const Vector &b, Vector &x, int print_iter=0, int max_num_iter=1000, double RTOLERANCE=10e-12, double ATOLERANCE=10e-24) |
Stationary linear iteration: x <- x + B (b - A x) |
int aGMRES | ( | const Operator & | A, |
Vector & | x, | ||
const Vector & | b, | ||
const Operator & | M, | ||
int & | max_iter, | ||
int | m_max, | ||
int | m_min, | ||
int | m_step, | ||
double | cf, | ||
double & | tol, | ||
double & | atol, | ||
int | printit | ||
) |
Adaptive restarted GMRES. m_max and m_min(=1) are the maximal and minimal restart parameters. m_step(=1) is the step to use for going from m_max and m_min. cf(=0.4) is a desired convergance factor.
Definition at line 200 of file gmres.cpp.
References DenseMatrix::Add(), Add(), ApplyPlaneRotation(), GeneratePlaneRotation(), Operator::Mult(), norm(), Operator::Size(), subtract(), and Update().
int BiCGSTAB | ( | const Operator & | A, |
Vector & | x, | ||
const Vector & | b, | ||
const Operator & | M, | ||
int & | max_iter, | ||
double & | tol, | ||
double | atol, | ||
int | printit | ||
) |
A BiCG-Stab solver.
Definition at line 39 of file bicgstab.cpp.
References Vector::Add(), add(), Operator::Mult(), Operator::Size(), and subtract().
void CG | ( | const Operator & | A, |
const Vector & | b, | ||
Vector & | x, | ||
int | print_iter = 0 , |
||
int | max_num_iter = 1000 , |
||
double | RTOLERANCE = 10e-12 , |
||
double | ATOLERANCE = 10e-24 |
||
) |
Conjugate gradient method. Given Matrix A, vector b and initial guess x, iteratively solve A x = b. When the default arguments are used CG doesn't print current residual and number of iterations, maximum number of iterations is 1000, the relative tolerance is 10e-12 and the absolute tolerance is 10e-24.
Definition at line 20 of file cgsolver.cpp.
References add(), Operator::Mult(), Vector::Size(), and subtract().
int GMRES | ( | const Operator & | A, |
Vector & | x, | ||
const Vector & | b, | ||
const Operator & | M, | ||
int & | max_iter, | ||
int | m, | ||
double & | tol, | ||
double & | atol, | ||
int | printit | ||
) |
A GMRES solver.
Definition at line 84 of file gmres.cpp.
References DenseMatrix::Add(), Add(), ApplyPlaneRotation(), GeneratePlaneRotation(), Operator::Mult(), norm(), Operator::Size(), subtract(), and Update().
void PCG | ( | const Operator & | A, |
const Operator & | B, | ||
const Vector & | b, | ||
Vector & | x, | ||
int | print_iter = 0 , |
||
int | max_num_iter = 1000 , |
||
double | RTOLERANCE = 10e-12 , |
||
double | ATOLERANCE = 10e-24 , |
||
int | save = 0 |
||
) |
Preconditioned conjugate gradient method. Given Matrix A, preconditioner Matrix B, vector b and initial guess x, iteratively solve A x = b. When the default arguments are used PCG doesn't print current residuals and number of iterations, maximum number of iterations is 1000, the relative tolerance is 10e-12 and the absolute tolerance is 10e-24. Remark : if no better initial guess is available, the user may set it as B b (since not done in PCG routine).
Definition at line 22 of file pcgsolver.cpp.
References add(), Operator::Mult(), Vector::Print(), Vector::Size(), and subtract().
Referenced by main().
void SLI | ( | const Operator & | A, |
const Operator & | B, | ||
const Vector & | b, | ||
Vector & | x, | ||
int | print_iter = 0 , |
||
int | max_num_iter = 1000 , |
||
double | RTOLERANCE = 10e-12 , |
||
double | ATOLERANCE = 10e-24 |
||
) |
Stationary linear iteration: x <- x + B (b - A x)
Definition at line 115 of file pcgsolver.cpp.
References add(), Operator::Mult(), Vector::Size(), and subtract().