|
|
|
|
|
Nonlinear problems can be solved in a variety of ways in GetDP:
|
|
|
* By explicitly writing the nonlinear solver in the `Resolution` operations
|
|
|
* By explicitly writing the nonlinear solver in the `Resolution` operations, using the built-in `While` function
|
|
|
* By using the built-in `IterativeLoop` function in `Resolution`
|
|
|
* By using the built-in `IterativeLoopN` function in `Resolution`
|
|
|
|
|
|
All the techniques are based on a linearization of the original nonlinear problem, leading to an iterative algorithm where a linear system is solved at each step.
|
|
|
|
|
|
The explicit specification of the iterative algorithm in `Resolution` operations (using the built-in `While` function) is the most flexible solution, but is also the most involved. `IterativeLoop` and `IterativeLoopN` hide some of the complexity by automatically assessing the convergence: `IterativeLoop` uses an empirical algorithm for calculating the error whereas `IterativeLoopN` allows to specify
|
|
|
The explicit specification of the iterative algorithm in `Resolution` operations is the most flexible solution, but is also the most involved. `IterativeLoop` and `IterativeLoopN` hide some of the complexity by automatically assessing the convergence: `IterativeLoop` uses an empirical algorithm for calculating the error whereas `IterativeLoopN` allows to specify
|
|
|
in detail the error calculation and the allowed tolerances.
|
|
|
|
|
|
In all cases, several functions can be used to generate (`Generate`, `GenerateJac`) and solve (`Solve`, `SolveJac`) the corresponding linear systems. The function `GetResidual` can also be used to explicitly evaluate the residual (see below).
|
... | ... | |