
Classes | |
| struct | AdditionalData |
Public Member Functions | |
| SolverBicgstab (SolverControl &cn, VectorMemory< VECTOR > &mem, const AdditionalData &data=AdditionalData()) | |
| SolverBicgstab (SolverControl &cn, const AdditionalData &data=AdditionalData()) | |
| virtual | ~SolverBicgstab () |
| template<class MATRIX , class PRECONDITIONER > | |
| void | solve (const MATRIX &A, VECTOR &x, const VECTOR &b, const PRECONDITIONER &precondition) |
Protected Member Functions | |
| template<class MATRIX > | |
| double | criterion (const MATRIX &A, const VECTOR &x, const VECTOR &b) |
| virtual void | print_vectors (const unsigned int step, const VECTOR &x, const VECTOR &r, const VECTOR &d) const |
Protected Attributes | |
| VECTOR * | Vx |
| VECTOR * | Vr |
| VECTOR * | Vrbar |
| VECTOR * | Vp |
| VECTOR * | Vy |
| VECTOR * | Vz |
| VECTOR * | Vs |
| VECTOR * | Vt |
| VECTOR * | Vv |
| const VECTOR * | Vb |
| double | alpha |
| double | beta |
| double | omega |
| double | rho |
| double | rhobar |
| unsigned int | step |
| double | res |
| AdditionalData | additional_data |
Private Member Functions | |
| template<class MATRIX > | |
| SolverControl::State | start (const MATRIX &A) |
| template<class MATRIX , class PRECONDITIONER > | |
| bool | iterate (const MATRIX &A, const PRECONDITIONER &precondition) |
Bicgstab algorithm by van der Vorst.
For the requirements on matrices and vectors in order to work with this class, see the documentation of the Solver base class.
Like all other solver classes, this class has a local structure called AdditionalData which is used to pass additional parameters to the solver, like damping parameters or the number of temporary vectors. We use this additional structure instead of passing these values directly to the constructor because this makes the use of the SolverSelector and other classes much easier and guarantees that these will continue to work even if number or type of the additional parameters for a certain solver changes.
The Bicgstab-method has two additional parameters: the first is a boolean, deciding whether to compute the actual residual in each step (true) or to use the length of the computed orthogonal residual (false). Note that computing the residual causes a third matrix-vector-multiplication, though no additional preconditioning, in each step. The reason for doing this is, that the size of the orthogonalized residual computed during the iteration may be larger by orders of magnitude than the true residual. This is due to numerical instabilities related to badly conditioned matrices. Since this instability results in a bad stopping criterion, the default for this parameter is true. Whenever the user knows that the estimated residual works reasonably as well, the flag should be set to false in order to increase the performance of the solver.
The second parameter is the size of a breakdown criterion. It is difficult to find a general good criterion, so if things do not work for you, try to change this value.
Definition at line 62 of file solver_bicgstab.h.
| SolverBicgstab< VECTOR >::SolverBicgstab | ( | SolverControl & | cn, |
| VectorMemory< VECTOR > & | mem, | ||
| const AdditionalData & | data = AdditionalData() |
||
| ) |
Constructor.
| SolverBicgstab< VECTOR >::SolverBicgstab | ( | SolverControl & | cn, |
| const AdditionalData & | data = AdditionalData() |
||
| ) |
Constructor. Use an object of type GrowingVectorMemory as a default to allocate memory.
| virtual SolverBicgstab< VECTOR >::~SolverBicgstab | ( | ) | [virtual] |
Virtual destructor.
| void SolverBicgstab< VECTOR >::solve | ( | const MATRIX & | A, |
| VECTOR & | x, | ||
| const VECTOR & | b, | ||
| const PRECONDITIONER & | precondition | ||
| ) |
Solve primal problem only.
Referenced by SolverSelector< VECTOR >::solve().
| double SolverBicgstab< VECTOR >::criterion | ( | const MATRIX & | A, |
| const VECTOR & | x, | ||
| const VECTOR & | b | ||
| ) | [protected] |
Computation of the stopping criterion.
| virtual void SolverBicgstab< VECTOR >::print_vectors | ( | const unsigned int | step, |
| const VECTOR & | x, | ||
| const VECTOR & | r, | ||
| const VECTOR & | d | ||
| ) | const [protected, virtual] |
Interface for derived class. This function gets the current iteration vector, the residual and the update vector in each step. It can be used for a graphical output of the convergence history.
| SolverControl::State SolverBicgstab< VECTOR >::start | ( | const MATRIX & | A ) | [private] |
Everything before the iteration loop.
| bool SolverBicgstab< VECTOR >::iterate | ( | const MATRIX & | A, |
| const PRECONDITIONER & | precondition | ||
| ) | [private] |
The iteration loop itself.
VECTOR* SolverBicgstab< VECTOR >::Vx [protected] |
Auxiliary vector.
Definition at line 158 of file solver_bicgstab.h.
VECTOR* SolverBicgstab< VECTOR >::Vr [protected] |
Auxiliary vector.
Definition at line 162 of file solver_bicgstab.h.
VECTOR* SolverBicgstab< VECTOR >::Vrbar [protected] |
Auxiliary vector.
Definition at line 166 of file solver_bicgstab.h.
VECTOR* SolverBicgstab< VECTOR >::Vp [protected] |
Auxiliary vector.
Definition at line 170 of file solver_bicgstab.h.
VECTOR* SolverBicgstab< VECTOR >::Vy [protected] |
Auxiliary vector.
Definition at line 174 of file solver_bicgstab.h.
VECTOR* SolverBicgstab< VECTOR >::Vz [protected] |
Auxiliary vector.
Definition at line 178 of file solver_bicgstab.h.
VECTOR* SolverBicgstab< VECTOR >::Vs [protected] |
Auxiliary vector.
Definition at line 182 of file solver_bicgstab.h.
VECTOR* SolverBicgstab< VECTOR >::Vt [protected] |
Auxiliary vector.
Definition at line 186 of file solver_bicgstab.h.
VECTOR* SolverBicgstab< VECTOR >::Vv [protected] |
Auxiliary vector.
Definition at line 190 of file solver_bicgstab.h.
const VECTOR* SolverBicgstab< VECTOR >::Vb [protected] |
Right hand side vector.
Definition at line 194 of file solver_bicgstab.h.
double SolverBicgstab< VECTOR >::alpha [protected] |
Auxiliary value.
Definition at line 199 of file solver_bicgstab.h.
double SolverBicgstab< VECTOR >::beta [protected] |
Auxiliary value.
Definition at line 203 of file solver_bicgstab.h.
double SolverBicgstab< VECTOR >::omega [protected] |
Auxiliary value.
Definition at line 207 of file solver_bicgstab.h.
double SolverBicgstab< VECTOR >::rho [protected] |
Auxiliary value.
Definition at line 211 of file solver_bicgstab.h.
double SolverBicgstab< VECTOR >::rhobar [protected] |
Auxiliary value.
Definition at line 215 of file solver_bicgstab.h.
unsigned int SolverBicgstab< VECTOR >::step [protected] |
Current iteration step.
Definition at line 220 of file solver_bicgstab.h.
double SolverBicgstab< VECTOR >::res [protected] |
Residual.
Definition at line 225 of file solver_bicgstab.h.
AdditionalData SolverBicgstab< VECTOR >::additional_data [protected] |
Additional parameters.
Definition at line 230 of file solver_bicgstab.h.
documentation generated on Fri Feb 3 2012 06:04:11 by
doxygen
1.7.2