|
opm-simulators
|
Newton method solving for generic TPSA model. More...
#include <tpsanewtonmethod.hpp>
Public Member Functions | |
| TpsaNewtonMethod (Simulator &simulator) | |
| Constructor. | |
| bool | apply () |
| Run the Newton method. | |
| bool | converged () const |
| Returns true if the error of the solution is below the tolerance. | |
| Problem & | problem () |
| Returns a reference to the object describing the current physical problem. | |
| const Problem & | problem () const |
| Returns a reference to the object describing the current physical problem. | |
| Model & | model () |
| Returns a reference to the geomechanics model. | |
| const Model & | model () const |
| Returns a reference to the geomechanics model. | |
| LinearSolverBackend & | linearSolver () |
| Returns the linear solver backend object for external use. | |
| const LinearSolverBackend & | linearSolver () const |
| Returns the linear solver backend object for external use. | |
| int | numIterations () const |
| Returns the number of iterations done since the Newton method was invoked. | |
| int | numLinearizations () const |
| Returns the number of linearizations that has done since the Newton method was invoked. | |
| Scalar | tolerance () const |
| Return the current tolerance at which the Newton method considers itself to be converged. | |
| Scalar | minIterations () const |
| Returns minimum number of Newton iterations used. | |
| const Timer & | prePostProcessTimer () const |
| Return post-process timer. | |
| const Timer & | linearizeTimer () const |
| Return linearization timer. | |
| const Timer & | solveTimer () const |
| Return linear solver timer. | |
| const Timer & | updateTimer () const |
| Return solution update timer. | |
Static Public Member Functions | |
| static void | registerParameters () |
| Register all run-time parameters for the Newton method. | |
Protected Member Functions | |
| int | verbosity_ () const |
| Verbosity level of Newton print messages. | |
| void | begin_ () |
| Called before the Newton method is applied to an non-linear system of equations. | |
| void | beginIteration_ () |
| Calculations at the beginning of a Newton iteration. | |
| void | linearizeDomain_ () |
| Linearize the global non-linear system of equations associated with the spatial domain. | |
| void | preSolve_ (const SolutionVector &, const GlobalEqVector ¤tResidual) |
| Compute error before a Newton iteration. | |
| void | update_ (SolutionVector &nextSolution, const SolutionVector ¤tSolution, const GlobalEqVector &solutionUpdate, const GlobalEqVector ¤tResidual) |
| Update the current solution with a delta vector. | |
| void | updatePrimaryVariables_ (unsigned, PrimaryVariables &nextValue, const PrimaryVariables ¤tValue, const EqVector &update, const EqVector &) |
| Update a single primary variables object. | |
| void | endIteration_ () |
| Indicates that one Newton iteration was finished. | |
| bool | proceed_ () const |
| Returns true iff another Newton iteration should be done. | |
| void | failed_ () |
| Called if the Newton method broke down. | |
Protected Attributes | |
| Simulator & | simulator_ |
| LinearSolverBackend | linearSolver_ |
| Timer | prePostProcessTimer_ |
| Timer | linearizeTimer_ |
| Timer | solveTimer_ |
| Timer | updateTimer_ |
| Scalar | error_ |
| Scalar | lastError_ |
| TpsaNewtonMethodParams< Scalar > | params_ |
| int | numIterations_ |
| int | numLinearizations_ |
Newton method solving for generic TPSA model.
Generates the Jacobian matrix, J(u^n) and residual vector, R(u^n), with a solution vector, u^n, at iteration n. Subsequently the linear system J(u^n)\delta u^n = -R(u^n) is solved to get u^{n+1} = u^n + \Delta u^n.
|
inlineexplicit |
Constructor.
| simulator | Simulator object |
|
inline |
Run the Newton method.
|
inline |
Returns true if the error of the solution is below the tolerance.
|
inline |
Return linearization timer.
|
inline |
Returns the linear solver backend object for external use.
|
inline |
Returns the linear solver backend object for external use.
|
inline |
Returns minimum number of Newton iterations used.
|
inline |
Returns a reference to the geomechanics model.
|
inline |
Returns a reference to the geomechanics model.
|
inline |
Returns the number of iterations done since the Newton method was invoked.
|
inline |
Returns the number of linearizations that has done since the Newton method was invoked.
|
inline |
Return post-process timer.
|
inlineprotected |
Compute error before a Newton iteration.
| currentSolution | Current solution vector |
| currentResidual | Current residual vector |
|
inline |
Returns a reference to the object describing the current physical problem.
|
inline |
Returns a reference to the object describing the current physical problem.
|
inlineprotected |
Returns true iff another Newton iteration should be done.
|
inline |
Return linear solver timer.
|
inline |
Return the current tolerance at which the Newton method considers itself to be converged.
|
inlineprotected |
Update the current solution with a delta vector.
| nextSolution | The solution vector after the current iteration |
| currentSolution | The solution vector after the last iteration |
| solutionUpdate | The delta vector as calculated by solving the linear system of equations |
| currentResidual | The residual vector of the current Newton-Raphson iteraton |
Different update strategies, such as chopped updates can be implemented by overriding this method. The default behavior is use the standard Newton-Raphson update strategy, i.e. u^{n+1} = u^n - \Delta u^n
|
inlineprotected |
Update a single primary variables object.
| nextValue | The solution vector after the current iteration |
| currentValue | The solution vector after the last iteration |
| update | The delta vector as calculated by solving the linear system of equations |
| currentResidual | The residual vector of the current Newton-Raphson iteraton |
|
inline |
Return solution update timer.
|
inlineprotected |
Verbosity level of Newton print messages.
Newton procedure verbosity: 0=none, 1=basic, 2=all