KASKADE 7 development version
|
Iterative solution of a large linear system using an error based termination-criterium. Includes some special termination-criterium options which are used by the giantGbit code. More...
#include <gbit.hh>
Iterative solution of a large linear system using an error based termination-criterium. Includes some special termination-criterium options which are used by the giantGbit code.
LinearSpace | The underlying linear space of the unknown vector and right-hand-side. |
Classes | |
struct | GbitInfo |
Public Types | |
enum | PrintLevel { none =0 , minimum =1 , verbose =2 , debug =3 } |
typedef Dune::LinearOperator< LinearSpace, LinearSpace > | AssembledGalerkinOperator |
typedef Dune::Preconditioner< LinearSpace, LinearSpace > | Precond |
Public Member Functions | |
Gbit (AssembledGalerkinOperator &a_, Precond &precon_, double iteEps_=1.0e-10, int iteSteps_=MAXITER_DEFAULT, int verbosity_=0, int maxRestart_=9) | |
The Gbit constructor routine. More... | |
~Gbit () | |
void | setTolerance (double tol_) |
Sets the error tolerance which the final approximate solution \(x_k\) must fit. The default value is 1.0e-10. More... | |
void | setMaximumNoIterations (int maximumIter_) |
Sets the maximum allowed number of Newton-iterations. The default value is the value of the constructor argument iteSteps_, e.g. MAXITER_DEFAULT, if the iteSteps_ argument is not set. More... | |
void | setSafetyFactor (double safetyFactor_) |
Sets the safety factor for the precision control. Must be a positive number <= 1.0 by which the tolerance will be multiplied. The default value is 0.25. More... | |
void | setRescaleMode (bool rescale_) |
Sets the rescaling mode. The default value is true. More... | |
void | setGiantSimpleTermination (bool giantSimple_) |
Sets the termination-criterium mode. The default value is false. More... | |
void | setErrorStream (std::ostream &errorStream_) |
Sets the error-output stream. The default error-output stream is std::cerr. More... | |
void | setMonitorStream (std::ostream &monitorStream_) |
Sets the monitor-output stream. The default monitor-output stream is std::cout. More... | |
void | setErrorLevel (PrintLevel errorLevel_) |
Sets the error-output level. The default error-output level is verbose. More... | |
void | setMonitorLevel (PrintLevel monitorLevel_) |
Sets the monitor-output level. The default monitor-output level is the value of the constructur argument verbosity_ (casted to the corresponding PrintLevel value), e.g. 0, if the verbosity_ argument is not set. More... | |
void | setStatistics (bool statistics_) |
Sets the Timings statistics flag. The default Timings statistics flag level is off. More... | |
void | setScalingVector (std::vector< double > *scale_) |
Sets a user-defined scaling-threshold vector. More... | |
void | apply (LinearSpace &y, LinearSpace const &b, struct GbitInfo &res, Timings &timer=Timings::instance()) |
Calls the giantGbit inexact damped Newton-iteration solver. More... | |
typedef Dune::LinearOperator<LinearSpace,LinearSpace> Kaskade::Gbit< LinearSpace >::AssembledGalerkinOperator |
typedef Dune::Preconditioner<LinearSpace,LinearSpace> Kaskade::Gbit< LinearSpace >::Precond |
enum Kaskade::Gbit::PrintLevel |
|
inline |
The Gbit constructor routine.
a_ | The Dune-istl compatible linear operator A of the linear system \( A \dot x = b \). |
precon_ | The Dune-istl compatible preconditioner. |
iteEps_ | The prescribed precision for the solution. This is an optional argument for Dune-istl compatibility. |
iteSteps_ | The maximum number of allowed iteration-steps. This is an optional argument for Dune-istl compatibility. |
verbosity_ | The int equivalent of the monitor-output level. This is an optional argument for Dune-istl compatibility. |
maxRestart_ | The maximum number of iteration-steps before a restart occurs. Since this parameter mainly determines the amount of storage used by Gbit, there is no alternative set-method for this parameter available. |
|
inline |
|
inline |
Calls the giantGbit inexact damped Newton-iteration solver.
y | On input, the start-vector for the iteration. On output, the approximate solution vector \( x_k \), which fits the error condition \( \parallel x_k - x\star \parallel <= tol \) , where \( x\star \) denotes the exact solution, and \( \parallel \ldots \parallel \) is a scaled Euclidian norm. |
b | The right hand side vector of the linear system to be solved. |
res | An instance of type GbitInfo to hold the iteration info on termination of the apply routine. |
|
inline |
|
inline |
|
inline |
Sets the termination-criterium mode. The default value is false.
giantSimple_ | The desired termination-criterium mode. If it is set to true, a special termination criterium for computing the simplified Newton correction by giantGbit will be applied. If set to false, the standard termination-criterium will be applied. |
|
inline |
|
inline |
Sets the monitor-output level. The default monitor-output level is the value of the constructur argument verbosity_ (casted to the corresponding PrintLevel value), e.g. 0, if the verbosity_ argument is not set.
monitorLevel_ | The desired monitor-output level. |
|
inline |
|
inline |
Sets the rescaling mode. The default value is true.
rescale_ | The desired rescaling mode. If set to true, the scaling values, which are used in the norm computation, will be adjusted at the start and at each restart to the current iterate. If set to false, the initial scaling values are used unmodified throughout the whole iteration. |
|
inline |
|
inline |
|
inline |
|
inline |