All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
viennacl::linalg::gmres_tag Class Reference

A tag for the solver GMRES. Used for supplying solver parameters and for dispatching the solve() function. More...

`#include <gmres.hpp>`

## Public Member Functions

| gmres_tag (double tol=1e-10, unsigned int max_iterations=300, unsigned int krylov_dim=20)
| The constructor. More...
double | tolerance () const
| Returns the relative tolerance. More...
double | abs_tolerance () const
| Returns the absolute tolerance. More...
void | abs_tolerance (double new_tol)
| Sets the absolute tolerance. More...
unsigned int | max_iterations () const
| Returns the maximum number of iterations. More...
unsigned int | krylov_dim () const
| Returns the maximum dimension of the Krylov space before restart. More...
unsigned int | max_restarts () const
| Returns the maximum number of GMRES restarts. More...
unsigned int | iters () const
| Return the number of solver iterations: More...
void | iters (unsigned int i) const
| Set the number of solver iterations (should only be modified by the solver) More...
double | error () const
| Returns the estimated relative error at the end of the solver run. More...
void | error (double e) const
| Sets the estimated relative error at the end of the solver run. More...

## Detailed Description

A tag for the solver GMRES. Used for supplying solver parameters and for dispatching the solve() function.

Examples:
  iterative-armadillo.cpp, iterative-custom.cpp, iterative-eigen.cpp, iterative-mtl4.cpp, iterative-ublas.cpp, and iterative.cpp.

Definition at line 49 of file gmres.hpp.

## Constructor & Destructor Documentation

viennacl::linalg::gmres_tag::gmres_tag | ( | double | tol = `1e-10`,
|  | unsigned int | max_iterations = `300`,
|  | unsigned int | krylov_dim = `20`
| ) |  |

inline

The constructor.

Parameters

  tol | Relative tolerance for the residual (solver quits if ||r|| < tol * ||r_initial||)
  max_iterations | The maximum number of iterations (including restarts
  krylov_dim | The maximum dimension of the Krylov space before restart (number of restarts is found by max_iterations / krylov_dim)

Definition at line 58 of file gmres.hpp.

## Member Function Documentation

double viennacl::linalg::gmres_tag::abs_tolerance | ( |  | ) | const

inline

Returns the absolute tolerance.

Definition at line 65 of file gmres.hpp.

void viennacl::linalg::gmres_tag::abs_tolerance | ( | double | new_tol | ) |

inline

Sets the absolute tolerance.

Definition at line 67 of file gmres.hpp.

double viennacl::linalg::gmres_tag::error | ( |  | ) | const

inline

Returns the estimated relative error at the end of the solver run.

Definition at line 88 of file gmres.hpp.

void viennacl::linalg::gmres_tag::error | ( | double | e | ) | const

inline

Sets the estimated relative error at the end of the solver run.

Definition at line 90 of file gmres.hpp.

unsigned int viennacl::linalg::gmres_tag::iters | ( |  | ) | const

inline

Return the number of solver iterations:

Definition at line 83 of file gmres.hpp.

void viennacl::linalg::gmres_tag::iters | ( | unsigned int | i | ) | const

inline

Set the number of solver iterations (should only be modified by the solver)

Definition at line 85 of file gmres.hpp.

unsigned int viennacl::linalg::gmres_tag::krylov_dim | ( |  | ) | const

inline

Returns the maximum dimension of the Krylov space before restart.

Definition at line 72 of file gmres.hpp.

unsigned int viennacl::linalg::gmres_tag::max_iterations | ( |  | ) | const

inline

Returns the maximum number of iterations.

Definition at line 70 of file gmres.hpp.

unsigned int viennacl::linalg::gmres_tag::max_restarts | ( |  | ) | const

inline

Returns the maximum number of GMRES restarts.

Definition at line 74 of file gmres.hpp.

double viennacl::linalg::gmres_tag::tolerance | ( |  | ) | const

inline

Returns the relative tolerance.

Definition at line 62 of file gmres.hpp.

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

- viennacl/linalg/gmres.hpp