KASKADE 7 development version
|
Solution of a nonlinear system of equations by a damped Newton-method with adaptive precision control of the used iterative linear solver Gbit. More...
#include <giant_gbit.hh>
Solution of a nonlinear system of equations by a damped Newton-method with adaptive precision control of the used iterative linear solver Gbit.
Grid | The underlying Grid, eg. UGGrid, AlbertaGrid or some type of ALUGrid. |
Equation | The name of the equation class, which defines the subclass DomainCache with d1, d2 and BoundaryCache with d1, d2. |
VariableSet | The VariableSet of which representation-type is the Newton-iteration vector. |
Spaces | The spaces used in the problem formulation. |
Definition at line 305 of file giant_gbit.hh.
Classes | |
struct | NleqInfo |
Public Types | |
enum | PrintLevel { none =0 , minimum =1 , verbose =2 , debug =3 } |
enum | NonlinProblemType { mildlyNonlinear =2 , highlyNonlinear =3 , extremelyNonlinear =4 } |
enum | AdaptMode { standardMode =0 , quadraticMode =1 } |
Public Member Functions | |
Giant () | |
void | setTolerance (double tol_) |
Sets the error tolerance which the final approximate solution \(x_k\) must fit. The default value is 1.0e-5. More... | |
void | setNonlinProblemType (NonlinProblemType nonlinType_) |
Set the classification of the nonlinear problem. The default value is highlyNonlinear. More... | |
void | setSafetyFactor (double safetyFactor_) |
Sets the safety factor for the precision control within the linear solver Gbit. The default value is 0.25. More... | |
void | setMaximumNoIterations (int maximumIter_) |
Sets the maximum allowed number of Newton-iterations. The default value is 50. More... | |
void | setPreconFillLevel (int preconFillLevel_) |
Sets the fillin-level of the preconditioner PrecondType::ILUK. The default fillin-level is 0. More... | |
void | setRestricted (bool restricted_) |
Sets the restricted monotonicity-test flag. The default value depends on the selected NonlinProblemType. More... | |
void | setAdaptMode (AdaptMode adaptMode_) |
Sets the adapt-mode (linear solver precision control). The default adapt-mode is standardMode. 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 none. More... | |
void | setDataLevel (PrintLevel dataLevel_) |
Sets the plot-data-output level. The default plot-data-output level is none. More... | |
void | setStatistics (bool statistics_) |
Sets the Timings statistics flag. The default Timings statistics flag level is off. More... | |
void | setOutFilePrefix (const std::string &outFilePrefix_) |
Sets the prefix of the output-files named <prefix>nnn.vtu, where n denotes a decimal digit. The default-prefix is iter_ . More... | |
void | setScalingVector (std::vector< double > *scale_) |
Sets a user-defined scaling-threshold vector. More... | |
struct NleqInfo | getInfo () |
After calling giantGbit, getInfo returns the info structure contents. More... | |
void | giantGbit (GridManager< Grid > &gridManager, Equation &eq, VariableSet const &variableSet, typename VariableSet::VariableSet *x, Spaces const &spaces, Timings &timer=Timings::instance()) |
Calls the giantGbit inexact damped Newton-iteration solver. More... | |
enum Kaskade::Giant::AdaptMode |
The mode of controlling the required precision of the iterative linear solver.
Enumerator | |
---|---|
standardMode | standard precision control strategy |
quadraticMode | quadratic mode precision control strategy |
Definition at line 329 of file giant_gbit.hh.
enum Kaskade::Giant::NonlinProblemType |
The nonlinearity-level of the problem to be solved.
Enumerator | |
---|---|
mildlyNonlinear | problem is mildly nonlinear |
highlyNonlinear | problem is highly nonlinear |
extremelyNonlinear | problem is extremely nonlinear |
Definition at line 319 of file giant_gbit.hh.
enum Kaskade::Giant::PrintLevel |
The level of error-, monitor- and data-output.
Enumerator | |
---|---|
none | no output |
minimum | summary output |
verbose | detailed output - info about each iterate |
debug | additional debug output - reserved for future use |
Definition at line 308 of file giant_gbit.hh.
|
inline |
Definition at line 396 of file giant_gbit.hh.
|
inline |
After calling giantGbit, getInfo returns the info structure contents.
Definition at line 542 of file giant_gbit.hh.
|
inline |
Calls the giantGbit inexact damped Newton-iteration solver.
gridManager | The GridManager where the Grid is associated to. |
eq | The weak formulation class instance with the problem- and Jacobian functions. |
variableSet | The underlying VariableSet. |
x | On input, the start-vector for the damped Newton-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. |
spaces | The underlying problem spaces. |
Definition at line 556 of file giant_gbit.hh.
|
inline |
Sets the adapt-mode (linear solver precision control). The default adapt-mode is standardMode.
adaptMode_ | The desired adapt-mode. Valid values are standardMode and quadraticMode. |
Definition at line 478 of file giant_gbit.hh.
|
inline |
Sets the plot-data-output level. The default plot-data-output level is none.
dataLevel_ | The desired plot-data-output level. |
Definition at line 513 of file giant_gbit.hh.
|
inline |
Sets the error-output level. The default error-output level is verbose.
errorLevel_ | The desired error-output level. |
Definition at line 499 of file giant_gbit.hh.
|
inline |
Sets the error-output stream. The default error-output stream is std::cerr.
errorStream_ | The desired error-output stream. |
Definition at line 485 of file giant_gbit.hh.
|
inline |
Sets the maximum allowed number of Newton-iterations. The default value is 50.
maximumIter_ | The desired maximum number of Newton-iterations. |
Definition at line 447 of file giant_gbit.hh.
|
inline |
Sets the monitor-output level. The default monitor-output level is none.
monitorLevel_ | The desired monitor-output level. |
Definition at line 506 of file giant_gbit.hh.
|
inline |
Sets the monitor-output stream. The default monitor-output stream is std::cout.
monitorStream_ | The desired monitor-output stream. |
Definition at line 492 of file giant_gbit.hh.
|
inline |
Set the classification of the nonlinear problem. The default value is highlyNonlinear.
nonlinType_ | The following classifications may be used: mildlyNonlinear: The problem is considered to be mildly nonlinear and NleqSolver starts up with dampingfactor=1. highlyNonlinear: The problem is considered to be highly nonlinear and NleqSolver starts up with dampingfactor=1.0e-4. extremelyNonlinear: The problem is considered to be extremely nonlinear and NleqSolver starts up with dampingfactor=1.0e-6. Moreover, restricted is set automatically to true. |
Definition at line 434 of file giant_gbit.hh.
|
inline |
Sets the prefix of the output-files named <prefix>nnn.vtu, where n denotes a decimal digit. The default-prefix is iter_ .
outFilePrefix_ | The desired filename-prefix. |
Definition at line 527 of file giant_gbit.hh.
|
inline |
Sets the fillin-level of the preconditioner PrecondType::ILUK. The default fillin-level is 0.
preconFillLevel_ | The desired PrecondType::ILUK fillin-level. |
Definition at line 453 of file giant_gbit.hh.
|
inline |
Sets the restricted monotonicity-test flag. The default value depends on the selected NonlinProblemType.
restricted_ | true means the the restricted damping-strategy is applied. This means, that the restricted monotonicity test will be applied for determination whether the next iterate (and the associate damping factor lambda) will be accepted. With \( \theta = \parallel \overline{\Delta x}_{k+1} \parallel / \parallel \Delta x_{k} \parallel \), (where \( \Delta x_{k} \) denotes the k-th Newton correction, and \( \overline{\Delta x}_{k+1} \) denotes the sucessive simplified Newton correction) the condition \( \theta <= 1 - \lambda / 4 \) must be fit. If set to false, then the standard monotonicity test will be applied, i.e. the following condition must be fit: \( \theta < 1 \) . |
Definition at line 470 of file giant_gbit.hh.
|
inline |
Sets the safety factor for the precision control within the linear solver Gbit. The default value is 0.25.
safetyFactor_ | The desired safety factor. |
Definition at line 441 of file giant_gbit.hh.
|
inline |
Sets a user-defined scaling-threshold vector.
*scale_ | A pointer to the selected scaling-threshold vector. |
Definition at line 533 of file giant_gbit.hh.
|
inline |
Sets the Timings statistics flag. The default Timings statistics flag level is off.
statistics_ | false=off, true=on. |
Definition at line 520 of file giant_gbit.hh.
|
inline |
Sets the error tolerance which the final approximate solution \(x_k\) must fit. The default value is 1.0e-5.
tol_ | The desired error for the solution. |
Definition at line 420 of file giant_gbit.hh.