|
MFEM v2.0
|
#include <iostream>#include <iomanip>#include "vector.hpp"#include "matrix.hpp"#include "sparsemat.hpp"
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 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().
1.7.4