Public Attributes | |
sofa::simulation::common::MechanicalOperations & | mop |
core::behavior::MultiVecCoord & | x |
core::behavior::MultiVecDeriv & | force |
core::behavior::MultiVecDeriv & | dx |
core::behavior::LinearSolver * | linearSolver { nullptr } |
Public Member Functions | |
void | evaluateCurrentGuess () override |
SReal | squaredNormLastEvaluation () override |
void | computeGradientFromCurrentGuess () override |
void | updateGuessFromLinearSolution (SReal alpha) override |
void | solveLinearEquation () override |
SReal | squaredNormDx () override |
SReal | squaredLastEvaluation () override |
StaticResidualFunction (sofa::simulation::common::MechanicalOperations &mop, core::behavior::MultiVecCoord &x, core::behavior::MultiVecDeriv &force, core::behavior::MultiVecDeriv &dx, core::behavior::LinearSolver *linearSolver) | |
![]() | |
virtual | ~BaseNonLinearFunction ()=default |
virtual void | startNewtonIteration () |
virtual void | endNewtonIteration () |
core::behavior::MultiVecDeriv& sofa::component::odesolver::backward::StaticResidualFunction::dx |
core::behavior::MultiVecDeriv& sofa::component::odesolver::backward::StaticResidualFunction::force |
core::behavior::LinearSolver* sofa::component::odesolver::backward::StaticResidualFunction::linearSolver { nullptr } |
sofa::simulation::common::MechanicalOperations& sofa::component::odesolver::backward::StaticResidualFunction::mop |
core::behavior::MultiVecCoord& sofa::component::odesolver::backward::StaticResidualFunction::x |
|
inline |
|
inlineoverridevirtual |
Compute the gradient internally. It is not necessary to share this gradient with the outside
Implements sofa::component::odesolver::backward::newton_raphson::BaseNonLinearFunction.
|
inlineoverridevirtual |
Evaluation of the function where the input is the current guess. If the function is called for the first time, then it is called on the initial guess. The evaluation is computed internally. It is not necessary to share this evaluation with the outside.
Implements sofa::component::odesolver::backward::newton_raphson::BaseNonLinearFunction.
|
inlineoverridevirtual |
Solve the linear equation from a Newton iteration, i.e. it computes (x^{i+1}-x^i). It is solved internally. It is not necessary to share the result with the outside
Implements sofa::component::odesolver::backward::newton_raphson::BaseNonLinearFunction.
|
inlineoverridevirtual |
Compute ||x^{i+1}||^2
Implements sofa::component::odesolver::backward::newton_raphson::BaseNonLinearFunction.
|
inlineoverridevirtual |
Compute ||x^{i+1}-x^i||^2
Implements sofa::component::odesolver::backward::newton_raphson::BaseNonLinearFunction.
|
inlineoverridevirtual |
Returns the squared norm of the last evaluation of the function
Implements sofa::component::odesolver::backward::newton_raphson::BaseNonLinearFunction.
|
inlineoverridevirtual |
Once (x^{i+1}-x^i) has been computed, the result is used internally to update the current guess. It computes x^{i+1} += alpha * dx, where dx is the result of the linear system. It is not necessary to share the result with the Newton-Raphson method.
Implements sofa::component::odesolver::backward::newton_raphson::BaseNonLinearFunction.