Newton-Raphson solver with subsidiary function. More...
#include <ikarus/solver/nonlinearsolver/newtonraphsonwithscalarsubsidiaryfunction.hh>
Public Types | |
using | ValueType = typename NonLinearOperatorImpl::template ParameterValue< 0 > |
Type representing the update function. More... | |
using | UpdateFunctionType = UpdateFunctionTypeImpl |
using | NonLinearOperator = NonLinearOperatorImpl |
Type of the non-linear operator. More... | |
Public Member Functions | |
NewtonRaphsonWithSubsidiaryFunction (const NonLinearOperatorImpl &p_nonLinearOperator, LinearSolver &&p_linearSolver={}, UpdateFunctionType p_updateFunction={}) | |
Constructor for NewtonRaphsonWithSubsidiaryFunction. More... | |
void | setup (const NewtonRaphsonWithSubsidiaryFunctionSettings &p_settings) |
Setup the Newton-Raphson solver with subsidiary function. More... | |
template<typename SolutionType = NoPredictor, typename SubsidiaryType > requires std::is_same_v<SolutionType, NoPredictor> || std::is_convertible_v< SolutionType, std::remove_cvref_t<typename NonLinearOperatorImpl::ValueType>> | |
NonLinearSolverInformation | solve (SubsidiaryType &subsidiaryFunction, SubsidiaryArgs &subsidiaryArgs, const SolutionType &dx_predictor=NoPredictor{}) |
Solve the nonlinear system using the Newton-Raphson method with subsidiary function. More... | |
auto & | nonLinearOperator () |
Access the nonlinear operator. More... | |
void | subscribe (NonLinearSolverMessages message, std::shared_ptr< IObserver< NonLinearSolverMessages > > observer) |
Subscribe an observer to receive notifications for a specific message type. More... | |
void | subscribeAll (std::shared_ptr< IObserver< NonLinearSolverMessages > > observer) |
Subscribe an observer to receive notifications for all message types. More... | |
void | subscribeAll (std::initializer_list< std::shared_ptr< IObserver< NonLinearSolverMessages > > > observers) |
Subscribe multiple observers to receive notifications for all message types. More... | |
void | unSubscribe (NonLinearSolverMessages message, std::shared_ptr< IObserver< NonLinearSolverMessages > > observer) |
Unsubscribe an observer from receiving notifications for a specific message type. More... | |
void | unSubscribeAll (std::shared_ptr< IObserver< NonLinearSolverMessages > > observer) |
Unsubscribe an observer from receiving notifications for all message types. More... | |
void | notify (NonLinearSolverMessages message) |
Notify observers about a specific message type. More... | |
void | notify (NonLinearSolverMessages message, ScalarType val) |
Notify observers about a specific message type with a floating-point value. More... | |
void | notify (NonLinearSolverMessages message, int val) |
Notify observers about a specific message type with an integer value. More... | |
void | notify (NonLinearSolverMessages message, const std::string &val) |
Notify observers about a specific message type with a string value. More... | |
void | notify (NonLinearSolverMessages message, int val1, double val2) |
Notify observers about a specific message type with an integer and a double value. More... | |
void | notify (NonLinearSolverMessages message, int val1, const std::string &val2) |
Notify observers about a specific message type with an integer value and a string value. More... | |
void | notify (NonLinearSolverMessages message, Eigen::VectorX< ScalarType > vec) |
Notify observers about a specific message type with an Eigen::VectorX. More... | |
Static Public Attributes | |
static constexpr bool | isLinearSolver |
< Compile-time boolean indicating if the linear solver satisfies the non-linear solver concept More... | |
This class provides a Newton-Raphson solver for solving nonlinear systems with a subsidiary function. It uses a linear solver to handle the linear system arising in each iteration.
NonLinearOperatorImpl | Type of the nonlinear operator. |
LinearSolver | Type of the linear solver used internally (default is SolverDefault). |
UpdateFunctionTypeImpl | Type of the update function (default is UpdateDefault). |
using Ikarus::NewtonRaphsonWithSubsidiaryFunction< NonLinearOperatorImpl, LinearSolver, UpdateFunctionTypeImpl >::NonLinearOperator = NonLinearOperatorImpl |
using Ikarus::NewtonRaphsonWithSubsidiaryFunction< NonLinearOperatorImpl, LinearSolver, UpdateFunctionTypeImpl >::UpdateFunctionType = UpdateFunctionTypeImpl |
using Ikarus::NewtonRaphsonWithSubsidiaryFunction< NonLinearOperatorImpl, LinearSolver, UpdateFunctionTypeImpl >::ValueType = typename NonLinearOperatorImpl::template ParameterValue<0> |
|
inlineexplicit |
p_nonLinearOperator | Nonlinear operator to solve. |
p_linearSolver | Linear solver used internally (default is SolverDefault). |
p_updateFunction | Update function (default is UpdateDefault). |
|
inline |
|
inherited |
message | The message type to notify about. |
|
inherited |
message | The message type to notify about. |
val | The string value to be sent with the notification. |
|
inherited |
ScalarType | The type of the elements in the Eigen::VectorX. |
message | The message type to notify about. |
vec | The Eigen::VectorX to be sent with the notification. |
|
inherited |
message | The message type to notify about. |
val | The integer value to be sent with the notification. |
|
inherited |
message | The message type to notify about. |
val1 | The integer value to be sent with the notification. |
val2 | The string value to be sent with the notification. |
|
inherited |
message | The message type to notify about. |
val1 | The integer value to be sent with the notification. |
val2 | The double value to be sent with the notification. |
|
inherited |
ScalarType | The type of the floating-point value. |
message | The message type to notify about. |
val | The floating-point value to be sent with the notification. |
|
inline |
p_settings | Settings for the solver. |
|
inline |
SolutionType | Type of the solution predictor (default is NoPredictor). |
SubsidiaryType | Type of the subsidiary function. |
subsidiaryFunction | Subsidiary function to be solved. |
subsidiaryArgs | Additional arguments for the subsidiary function. |
dx_predictor | Predictor for the solution increment (default is NoPredictor). |
Initializations
Determine Fext0 It is assumed that Fext = Fext0 * lambda such that dRdlambda = Fext0 Generalization for Fext0 = Fext0(lambda) is not implemented
Iterative solving scheme
Two-step solving procedure
|
inherited |
message | The message type to subscribe to. |
observer | The observer to be subscribed. |
|
inherited |
observers | List of observers to be subscribed. |
|
inherited |
observer | The observer to be subscribed. |
|
inherited |
message | The message type to unsubscribe from. |
observer | The observer to be unsubscribed. |
|
inherited |
observer | The observer to be unsubscribed. |
|
staticconstexpr |
Type representing the parameter vector of the nonlinear operator.