Implements a conjugate gradient method as sparse linear algebra solver for non-symmetric linear systems. More...
#include <normal_conjugate_gradient_method.hpp>
Public Member Functions | |
virtual SparseSolver * | clone () const |
NormalConjugateGradientMethod () | |
NormalConjugateGradientMethod (const NormalConjugateGradientMethod &arg) | |
virtual returnValue | setIndices (const int *rowIdx_, const int *colIdx_) |
virtual returnValue | setIndices (const int *indices_) |
virtual | ~NormalConjugateGradientMethod () |
Protected Member Functions | |
virtual returnValue | applyInversePreconditioner (double *x_) |
virtual returnValue | applyPreconditioner (double *b) |
virtual returnValue | computePreconditioner (double *A_) |
virtual void | multiply (double *xx, double *result) |
Protected Attributes | |
int ** | index |
double * | iResult |
int * | nIndex |
Implements a conjugate gradient method as sparse linear algebra solver for non-symmetric linear systems.
The class NormalConjugateGradientMethod is a conjugate gradient method
which allows to specify any (possibly non-symetric) matrix A. This
method might not work properly for highly ill-conditioned systems. If
the matrix A is symmetric and positive definite the class
SymmetricConjugateGradientMethod should be preferred.
Definition at line 58 of file normal_conjugate_gradient_method.hpp.
Default constructor.
Definition at line 46 of file normal_conjugate_gradient_method.cpp.
NormalConjugateGradientMethod::NormalConjugateGradientMethod | ( | const NormalConjugateGradientMethod & | arg | ) |
Copy constructor (deep copy).
Definition at line 55 of file normal_conjugate_gradient_method.cpp.
Destructor.
Definition at line 88 of file normal_conjugate_gradient_method.cpp.
returnValue NormalConjugateGradientMethod::applyInversePreconditioner | ( | double * | x_ | ) | [protected, virtual] |
Applies the inverse of the preconditioner to the vector x (only internal use)
Implements ConjugateGradientMethod.
Definition at line 290 of file normal_conjugate_gradient_method.cpp.
returnValue NormalConjugateGradientMethod::applyPreconditioner | ( | double * | b | ) | [protected, virtual] |
Applies the preconditioner to the vector b (only internal use)
Implements ConjugateGradientMethod.
Definition at line 264 of file normal_conjugate_gradient_method.cpp.
SparseSolver * NormalConjugateGradientMethod::clone | ( | ) | const [virtual] |
Clone operator (deep copy).
Implements ConjugateGradientMethod.
Definition at line 105 of file normal_conjugate_gradient_method.cpp.
returnValue NormalConjugateGradientMethod::computePreconditioner | ( | double * | A_ | ) | [protected, virtual] |
Computes the preconditioner and Applies it to the input matrix.
Implements ConjugateGradientMethod.
Definition at line 227 of file normal_conjugate_gradient_method.cpp.
void NormalConjugateGradientMethod::multiply | ( | double * | xx, |
double * | result | ||
) | [protected, virtual] |
Evaluates the matrix-vector product result = A*xx efficiently. (only internal use)
Implements ConjugateGradientMethod.
Definition at line 196 of file normal_conjugate_gradient_method.cpp.
returnValue NormalConjugateGradientMethod::setIndices | ( | const int * | rowIdx_, |
const int * | colIdx_ | ||
) | [virtual] |
Sets an index list containing the positions of the
non-zero elements in the matrix A.
Implements ConjugateGradientMethod.
Definition at line 111 of file normal_conjugate_gradient_method.cpp.
returnValue NormalConjugateGradientMethod::setIndices | ( | const int * | indices_ | ) | [virtual] |
Sets an index list containing the positions of the
non-zero elements in the matrix A.
Definition at line 117 of file normal_conjugate_gradient_method.cpp.
int** NormalConjugateGradientMethod::index [protected] |
Definition at line 120 of file normal_conjugate_gradient_method.hpp.
double* NormalConjugateGradientMethod::iResult [protected] |
Definition at line 123 of file normal_conjugate_gradient_method.hpp.
int* NormalConjugateGradientMethod::nIndex [protected] |
Definition at line 121 of file normal_conjugate_gradient_method.hpp.