KASKADE 7 development version
|
Solution of a nonlinear system of equations by a damped Newton-method. More...
#include <nleq_err.hh>
Solution of a nonlinear system of equations by a damped Newton-method.
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 289 of file nleq_err.hh.
Classes | |
struct | NleqInfo |
Public Types | |
enum | PrintLevel { none =0 , minimum =1 , verbose =2 , debug =3 } |
enum | NonlinProblemType { mildlyNonlinear =2 , highlyNonlinear =3 , extremelyNonlinear =4 } |
Public Member Functions | |
NleqSolver () | |
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 | 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 | 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 nleqErr, getInfo returns the info structure contents. More... | |
void | nleqErr (GridManager< Grid > &gridManager, Equation &eq, VariableSet const &variableSet, typename VariableSet::VariableSet *x, Spaces const &spaces, Timings &timer=Timings::instance()) |
Calls the nleqErr damped Newton-iteration solver. More... | |
enum Kaskade::NleqSolver::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 303 of file nleq_err.hh.
enum Kaskade::NleqSolver::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 292 of file nleq_err.hh.
|
inline |
Definition at line 359 of file nleq_err.hh.
|
inline |
After calling nleqErr, getInfo returns the info structure contents.
Definition at line 488 of file nleq_err.hh.
|
inline |
Calls the nleqErr 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 502 of file nleq_err.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 458 of file nleq_err.hh.
|
inline |
Sets the error-output level. The default error-output level is verbose.
errorLevel_ | The desired error-output level. |
Definition at line 444 of file nleq_err.hh.
|
inline |
Sets the error-output stream. The default error-output stream is std::cerr.
errorStream_ | The desired error-output stream. |
Definition at line 430 of file nleq_err.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 400 of file nleq_err.hh.
|
inline |
Sets the monitor-output level. The default monitor-output level is none.
monitorLevel_ | The desired monitor-output level. |
Definition at line 451 of file nleq_err.hh.
|
inline |
Sets the monitor-output stream. The default monitor-output stream is std::cout.
monitorStream_ | The desired monitor-output stream. |
Definition at line 437 of file nleq_err.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 394 of file nleq_err.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 473 of file nleq_err.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 406 of file nleq_err.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 423 of file nleq_err.hh.
|
inline |
Sets a user-defined scaling-threshold vector.
*scale_ | A pointer to the selected scaling-threshold vector. |
Definition at line 479 of file nleq_err.hh.
|
inline |
Sets the Timings statistics flag. The default Timings statistics flag level is off.
statistics_ | false=off, true=on. |
Definition at line 465 of file nleq_err.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 380 of file nleq_err.hh.