Public Member Functions | Protected Member Functions | Protected Attributes | List of all members

Implements a conjugate gradient method as sparse linear algebra solver for symmetric linear systems. More...

#include <symmetric_conjugate_gradient_method.hpp>

Inheritance diagram for SymmetricConjugateGradientMethod:
Inheritance graph
[legend]

Public Member Functions

virtual SparseSolverclone () const
 
virtual returnValue setIndices (const int *rowIdx_, const int *colIdx_)
 
virtual returnValue setIndices (const int *indices_)
 
 SymmetricConjugateGradientMethod ()
 
 SymmetricConjugateGradientMethod (const SymmetricConjugateGradientMethod &arg)
 
virtual ~SymmetricConjugateGradientMethod ()
 
- Public Member Functions inherited from ConjugateGradientMethod
 ConjugateGradientMethod ()
 
 ConjugateGradientMethod (const ConjugateGradientMethod &arg)
 
virtual returnValue getX (double *x_)
 
virtual returnValue setDimension (const int &n)
 
virtual returnValue setMatrix (double *A_)
 
virtual returnValue setNumberOfEntries (const int &nDense_)
 
virtual returnValue setPrintLevel (PrintLevel printLevel_)
 
virtual returnValue setTolerance (double TOL_)
 
virtual returnValue solve (double *b)
 
virtual ~ConjugateGradientMethod ()
 
- Public Member Functions inherited from SparseSolver
virtual returnValue factorize ()=0
 
virtual int_t getNegativeEigenvalues ()
 
virtual int_t getRank ()
 
virtual returnValue getZeroPivots (int_t *&zeroPivots)
 
virtual SparseSolveroperator= (const SparseSolver &rhs)
 
virtual returnValue reset ()
 
virtual returnValue setMatrixData (int_t dim, int_t numNonzeros, const int_t *const airn, const int_t *const acjn, const real_t *const avals)=0
 
virtual returnValue solve (int_t dim, const real_t *const rhs, real_t *const sol)=0
 
virtual returnValue solveTranspose (double *b)
 
 SparseSolver ()
 
 SparseSolver (const SparseSolver &rhs)
 
 SparseSolver ()
 
virtual ~SparseSolver ()
 
virtual ~SparseSolver ()
 

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 Member Functions inherited from ConjugateGradientMethod
double scalarProduct (double *aa, double *bb)
 
- Protected Member Functions inherited from SparseSolver
returnValue clear ()
 
returnValue copy (const SparseSolver &rhs)
 

Protected Attributes

int * diag
 
int ** index
 
int * nIndex
 
- Protected Attributes inherited from ConjugateGradientMethod
double * A
 
double * condScale
 
int dim
 
int nDense
 
double * norm2
 
double ** p
 
int pCounter
 
PrintLevel printLevel
 
double * r
 
double TOL
 
double * x
 

Detailed Description

Implements a conjugate gradient method as sparse linear algebra solver for symmetric linear systems.

The class SymmetricConjugateGradientMethod is a conjugate gradient method
which allows to solve symmetric linear equation of the form

A * x = b

where A is symmetric and positive definite.

Author
Boris Houska, Hans Joachim Ferreau
Date
2009

Definition at line 61 of file symmetric_conjugate_gradient_method.hpp.

Constructor & Destructor Documentation

BEGIN_NAMESPACE_ACADO SymmetricConjugateGradientMethod::SymmetricConjugateGradientMethod ( )

Default constructor.

Definition at line 46 of file symmetric_conjugate_gradient_method.cpp.

SymmetricConjugateGradientMethod::SymmetricConjugateGradientMethod ( const SymmetricConjugateGradientMethod arg)

Copy constructor (deep copy).

Definition at line 55 of file symmetric_conjugate_gradient_method.cpp.

SymmetricConjugateGradientMethod::~SymmetricConjugateGradientMethod ( )
virtual

Destructor.

Definition at line 88 of file symmetric_conjugate_gradient_method.cpp.

Member Function Documentation

returnValue SymmetricConjugateGradientMethod::applyInversePreconditioner ( double *  x_)
protectedvirtual

Applies the inverse of the preconditioner to the vector x (only internal use)

Implements ConjugateGradientMethod.

Definition at line 263 of file symmetric_conjugate_gradient_method.cpp.

returnValue SymmetricConjugateGradientMethod::applyPreconditioner ( double *  b)
protectedvirtual

Applies the preconditioner to the vector b (only internal use)

Implements ConjugateGradientMethod.

Definition at line 250 of file symmetric_conjugate_gradient_method.cpp.

SparseSolver * SymmetricConjugateGradientMethod::clone ( ) const
virtual

Clone operator (deep copy).

Implements ConjugateGradientMethod.

Definition at line 105 of file symmetric_conjugate_gradient_method.cpp.

returnValue SymmetricConjugateGradientMethod::computePreconditioner ( double *  A_)
protectedvirtual

Computes the preconditioner and Applies it to the input matrix.

Implements ConjugateGradientMethod.

Definition at line 227 of file symmetric_conjugate_gradient_method.cpp.

void SymmetricConjugateGradientMethod::multiply ( double *  xx,
double *  result 
)
protectedvirtual

Evaluates the matrix-vector product result = A*xx efficiently. (only internal use)

Implements ConjugateGradientMethod.

Definition at line 207 of file symmetric_conjugate_gradient_method.cpp.

returnValue SymmetricConjugateGradientMethod::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 symmetric_conjugate_gradient_method.cpp.

returnValue SymmetricConjugateGradientMethod::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 symmetric_conjugate_gradient_method.cpp.

Member Data Documentation

int* SymmetricConjugateGradientMethod::diag
protected

Definition at line 128 of file symmetric_conjugate_gradient_method.hpp.

int** SymmetricConjugateGradientMethod::index
protected

Definition at line 126 of file symmetric_conjugate_gradient_method.hpp.

int* SymmetricConjugateGradientMethod::nIndex
protected

Definition at line 127 of file symmetric_conjugate_gradient_method.hpp.


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


acado
Author(s): Milan Vukov, Rien Quirynen
autogenerated on Mon Jun 10 2019 12:35:27