Public Member Functions |
Static Public Member Functions |
Protected Member Functions |
Static Protected Member Functions |
Protected Attributes |
List of all members
Opm::NewtonMethod< TypeTag > Class Template Reference The multi-dimensional Newton method. More...
Inheritance diagram for Opm::NewtonMethod< TypeTag >:
Detailed Descriptiontemplate<class TypeTag> class Opm::NewtonMethod< TypeTag > The multi-dimensional Newton method. This class uses static polymorphism to allow implementations to implement different update/convergence strategies. Constructor & Destructor Documentation◆ NewtonMethod()
template<class TypeTag >
Member Function Documentation◆ apply()
template<class TypeTag >
Run the Newton method. The actual implementation can influence all the strategic decisions via callbacks using static polymorphism. References Opm::NewtonMethod< TypeTag >::converged(), Opm::Timer::halt(), Opm::NewtonMethod< TypeTag >::linearizeTimer_, Opm::NewtonMethod< TypeTag >::linearSolver_, Opm::NewtonMethod< TypeTag >::model(), Opm::NewtonMethod< TypeTag >::prePostProcessTimer_, Opm::NewtonMethod< TypeTag >::proceed_(), Opm::Timer::realTimeElapsed(), Opm::NewtonMethod< TypeTag >::solveTimer_, Opm::Timer::start(), Opm::Timer::stop(), Opm::NewtonMethod< TypeTag >::updateTimer_, and Opm::NewtonMethod< TypeTag >::verbose_(). ◆ begin_()
template<class TypeTag >
Called before the Newton method is applied to an non-linear system of equations.
References Opm::NewtonMethod< TypeTag >::convergenceWriter_, and Opm::NewtonMethod< TypeTag >::numIterations_. ◆ beginIteration_()
template<class TypeTag >
Indicates the beginning of a Newton iteration. References Opm::NewtonMethod< TypeTag >::endIterMsgStream_, Opm::NewtonMethod< TypeTag >::error_, Opm::NewtonMethod< TypeTag >::lastError_, Opm::NewtonMethod< TypeTag >::problem(), and Opm::NewtonMethod< TypeTag >::simulator_. Referenced by Opm::FvBaseNewtonMethod< TypeTag >::beginIteration_(). ◆ converged()
template<class TypeTag >
Returns true if the error of the solution is below the tolerance. References Opm::NewtonMethod< TypeTag >::error_, and Opm::NewtonMethod< TypeTag >::tolerance(). Referenced by Opm::NewtonMethod< TypeTag >::apply(), and Opm::NewtonMethod< TypeTag >::proceed_(). ◆ enableConstraints_()
template<class TypeTag >
Referenced by Opm::NewtonMethod< TypeTag >::preSolve_(), and Opm::NewtonMethod< TypeTag >::update_(). ◆ end_()
template<class TypeTag >
Indicates that we're done solving the non-linear system of equations. References Opm::NewtonMethod< TypeTag >::convergenceWriter_. ◆ endIteration_()
template<class TypeTag >
Indicates that one Newton iteration was finished.
References Opm::NewtonMethod< TypeTag >::endIterMsg(), Opm::NewtonMethod< TypeTag >::error_, Opm::NewtonMethod< TypeTag >::numIterations_, Opm::NewtonMethod< TypeTag >::problem(), Opm::NewtonMethod< TypeTag >::simulator_, and Opm::NewtonMethod< TypeTag >::verbose_(). ◆ endIterMsg()
template<class TypeTag >
Message that should be printed for the user after the end of an iteration. References Opm::NewtonMethod< TypeTag >::endIterMsgStream_. Referenced by Opm::NewtonMethod< TypeTag >::endIteration_(). ◆ eraseMatrix()
template<class TypeTag >
Causes the solve() method to discared the structure of the linear system of equations the next time it is called. References Opm::NewtonMethod< TypeTag >::linearSolver_. ◆ failed_()
template<class TypeTag >
Called if the Newton method broke down. This method is called after end_() References Opm::NewtonMethod< TypeTag >::numIterations_, and Opm::NewtonMethod< TypeTag >::targetIterations_(). ◆ finishInit()
template<class TypeTag >
Finialize the construction of the object. At this point, it can be assumed that all objects featured by the simulator have been allocated. (But not that they have been fully initialized yet.) ◆ linearizeAuxiliaryEquations_()
template<class TypeTag >
References Opm::NewtonMethod< TypeTag >::model(). ◆ linearizeDomain_()
template<class TypeTag >
Linearize the global non-linear system of equations associated with the spatial domain. References Opm::NewtonMethod< TypeTag >::model(). ◆ linearizeTimer()
template<class TypeTag >
References Opm::NewtonMethod< TypeTag >::linearizeTimer_. ◆ linearSolver() [1/2]
template<class TypeTag >
Returns the linear solver backend object for external use. References Opm::NewtonMethod< TypeTag >::linearSolver_. ◆ linearSolver() [2/2]
template<class TypeTag >
Returns the linear solver backend object for external use. References Opm::NewtonMethod< TypeTag >::linearSolver_. ◆ maxIterations_()
template<class TypeTag >
Referenced by Opm::NewtonMethod< TypeTag >::proceed_(). ◆ model() [1/2]
template<class TypeTag >
Returns a reference to the numeric model. References Opm::NewtonMethod< TypeTag >::simulator_. Referenced by Opm::NewtonMethod< TypeTag >::apply(), Opm::NewtonMethod< TypeTag >::linearizeAuxiliaryEquations_(), Opm::NewtonMethod< TypeTag >::linearizeDomain_(), Opm::FvBaseNewtonMethod< TypeTag >::model_(), Opm::NewtonMethod< TypeTag >::postSolve_(), Opm::NewtonMethod< TypeTag >::preSolve_(), and Opm::NewtonMethod< TypeTag >::update_(). ◆ model() [2/2]
template<class TypeTag >
Returns a reference to the numeric model. References Opm::NewtonMethod< TypeTag >::simulator_. ◆ numIterations()
template<class TypeTag >
Returns the number of iterations done since the Newton method was invoked. References Opm::NewtonMethod< TypeTag >::numIterations_. Referenced by Opm::NewtonMethod< TypeTag >::proceed_(). ◆ postSolve_()
template<class TypeTag >
Update the error of the solution given the previous iteration. For our purposes, the error of a solution is defined as the maximum of the weighted residual of a given solution.
References Opm::NewtonMethod< TypeTag >::model(), and Opm::NewtonMethod< TypeTag >::simulator_. ◆ prePostProcessTimer()
template<class TypeTag >
◆ preSolve_()
template<class TypeTag >
◆ problem() [1/2]
template<class TypeTag >
Returns a reference to the object describing the current physical problem. References Opm::NewtonMethod< TypeTag >::simulator_. Referenced by Opm::NewtonMethod< TypeTag >::beginIteration_(), Opm::NewtonMethod< TypeTag >::endIteration_(), and Opm::NewtonMethod< TypeTag >::suggestTimeStepSize(). ◆ problem() [2/2]
template<class TypeTag >
Returns a reference to the object describing the current physical problem. References Opm::NewtonMethod< TypeTag >::simulator_. ◆ proceed_()
template<class TypeTag >
Returns true iff another Newton iteration should be done. References Opm::NewtonMethod< TypeTag >::converged(), Opm::NewtonMethod< TypeTag >::error_, Opm::NewtonMethod< TypeTag >::lastError_, Opm::NewtonMethod< TypeTag >::maxIterations_(), and Opm::NewtonMethod< TypeTag >::numIterations(). Referenced by Opm::NewtonMethod< TypeTag >::apply(). ◆ registerParameters()
template<class TypeTag >
Register all run-time parameters for the Newton method. Referenced by Opm::FvBaseDiscretization< TypeTag >::registerParameters(). ◆ setIterationIndex()
template<class TypeTag >
Set the index of current iteration. Normally this does not need to be called, but if the non-linear solver is implemented externally, it needs to be set in order for the model to do the Right Thing (TM) while linearizing. References Opm::NewtonMethod< TypeTag >::numIterations_. ◆ setTolerance()
template<class TypeTag >
Set the current tolerance at which the Newton method considers itself to be converged. References Opm::NewtonMethod< TypeTag >::tolerance_. ◆ solveTimer()
template<class TypeTag >
References Opm::NewtonMethod< TypeTag >::solveTimer_. ◆ succeeded_()
template<class TypeTag >
Called if the Newton method was successful. This method is called after end_() ◆ suggestTimeStepSize()
template<class TypeTag >
Suggest a new time-step size based on the old time-step size. The default behavior is to suggest the old time-step size scaled by the ratio between the target iterations and the iterations required to actually solve the last time-step. References Opm::NewtonMethod< TypeTag >::numIterations_, Opm::NewtonMethod< TypeTag >::problem(), and Opm::NewtonMethod< TypeTag >::targetIterations_(). ◆ targetIterations_()
template<class TypeTag >
◆ tolerance()
template<class TypeTag >
Return the current tolerance at which the Newton method considers itself to be converged. References Opm::NewtonMethod< TypeTag >::tolerance_. Referenced by Opm::NewtonMethod< TypeTag >::converged(). ◆ update_()
template<class TypeTag >
Update the current solution with a delta vector. 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.
References Opm::NewtonMethod< TypeTag >::enableConstraints_(), and Opm::NewtonMethod< TypeTag >::model(). Referenced by Opm::FvBaseNewtonMethod< TypeTag >::update_(). ◆ updateConstraintDof_()
template<class TypeTag >
Update the primary variables for a degree of freedom which is constraint. ◆ updatePrimaryVariables_()
template<class TypeTag >
Update a single primary variables object. ◆ updateTimer()
template<class TypeTag >
References Opm::NewtonMethod< TypeTag >::updateTimer_. ◆ verbose_()
template<class TypeTag >
Returns true if the Newton method ought to be chatty. References Opm::NewtonMethod< TypeTag >::comm_. Referenced by Opm::NewtonMethod< TypeTag >::apply(), and Opm::NewtonMethod< TypeTag >::endIteration_(). ◆ writeConvergence_()
template<class TypeTag >
Write the convergence behaviour of the newton method to disk. This method is called as part of the update proceedure. References Opm::NewtonMethod< TypeTag >::convergenceWriter_. Member Data Documentation◆ comm_
template<class TypeTag >
Referenced by Opm::NewtonMethod< TypeTag >::preSolve_(), and Opm::NewtonMethod< TypeTag >::verbose_(). ◆ convergenceWriter_
template<class TypeTag >
◆ endIterMsgStream_
template<class TypeTag >
◆ error_
template<class TypeTag >
◆ lastError_
template<class TypeTag >
◆ linearizeTimer_
template<class TypeTag >
Referenced by Opm::NewtonMethod< TypeTag >::apply(), and Opm::NewtonMethod< TypeTag >::linearizeTimer(). ◆ linearSolver_
template<class TypeTag >
◆ numIterations_
template<class TypeTag >
Referenced by Opm::NewtonMethod< TypeTag >::begin_(), Opm::NewtonMethod< TypeTag >::endIteration_(), Opm::NewtonMethod< TypeTag >::failed_(), Opm::NewtonMethod< TypeTag >::NewtonMethod(), Opm::NewtonMethod< TypeTag >::numIterations(), Opm::NewtonMethod< TypeTag >::setIterationIndex(), and Opm::NewtonMethod< TypeTag >::suggestTimeStepSize(). ◆ prePostProcessTimer_
template<class TypeTag >
◆ simulator_
template<class TypeTag >
◆ solveTimer_
template<class TypeTag >
Referenced by Opm::NewtonMethod< TypeTag >::apply(), and Opm::NewtonMethod< TypeTag >::solveTimer(). ◆ tolerance_
template<class TypeTag >
◆ updateTimer_
template<class TypeTag >
Referenced by Opm::NewtonMethod< TypeTag >::apply(), and Opm::NewtonMethod< TypeTag >::updateTimer(). The documentation for this class was generated from the following file: |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||