Newton-Raphson solver with subsidiary function. More...
#include <ikarus/solver/nonlinearsolver/newtonraphsonwithscalarsubsidiaryfunction.hh>
Public Types | |
| using | Settings = NewtonRaphsonWithSubsidiaryFunctionSettings |
| using | SignatureTraits = typename F::Traits |
| using | Domain = typename SignatureTraits::Domain |
| Type representing the parameter vector of the Function. More... | |
| using | CorrectionType = typename SignatureTraits::template Range< 0 > |
| Type of the correction of x += deltaX. More... | |
| using | JacobianType = typename SignatureTraits::template Range< 1 > |
| Compile-time boolean indicating if the linear solver satisfies the non-linear solver concept. More... | |
| using | UpdateFunction = UF |
| using | DifferentiableFunction = F |
| Type of the non-linear operator. More... | |
| using | IDBCForceFunction = IDBCF |
| Type representing the force function to handle inhomogeneous Dirichlet BCs. More... | |
| using | State = NonlinearSolverStateType< F > |
| using | MessageType = NonLinearSolverMessages |
| using | Callback = std::function< void(NonLinearSolverMessages, const State &)> |
| using | Token = std::shared_ptr< Callback > |
Public Member Functions | |
| template<typename LS2 = LS, typename UF2 = UF, typename IDBCF2 = IDBCF> | |
| NewtonRaphsonWithSubsidiaryFunction (const DifferentiableFunction &residual, LS2 &&linearSolver={}, UF2 &&updateFunction={}, IDBCF2 &&idbcForceFunction={}) | |
| Constructor for NewtonRaphsonWithSubsidiaryFunction. More... | |
| void | setup (const Settings &settings) |
| Setup the Newton-Raphson solver with subsidiary function. More... | |
| template<typename SubsidiaryType > | |
| NonLinearSolverInformation | solve (Domain &req, SubsidiaryType &&subsidiaryFunction, SubsidiaryArgs &subsidiaryArgs) |
| Solve the nonlinear system using the Newton-Raphson method with subsidiary function. More... | |
| auto & | residual () |
| Access the residual function. More... | |
| const auto & | residual () const |
| Access the function. More... | |
| const UpdateFunction & | updateFunction () const |
| Access the update function. More... | |
| const IDBCForceFunction & | idbcForceFunction () const |
| Access the force function calculating internal forces due to inhomogeneous Dirichlet BCs. More... | |
| Token | registerListener (Callback callback) |
| This method is used to register a Listener function. More... | |
| void | unregisterListener (Token token) |
| deregisters a specific function More... | |
| void | notify (NonLinearSolverMessages message, const State &data) |
| This calls all the registered functions. More... | |
Static Public Attributes | |
| static constexpr bool | isLinearSolver = Ikarus::Concepts::LinearSolverCheck<LS, JacobianType, CorrectionType> |
| Type representing the update function. 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.
| F | Type of the function. |
| LS | Type of the linear solver used internally (default is SolverDefault). |
| UF | Type of the update function (default is UpdateDefault). |
| IDBCF | Type of the force function to handle inhomogeneous Dirichlet BCs (defaults to IDBCForceDefault). |
|
inherited |
| using Ikarus::NewtonRaphsonWithSubsidiaryFunction< F, LS, UF, IDBCF >::CorrectionType = typename SignatureTraits::template Range<0> |
| using Ikarus::NewtonRaphsonWithSubsidiaryFunction< F, LS, UF, IDBCF >::DifferentiableFunction = F |
| using Ikarus::NewtonRaphsonWithSubsidiaryFunction< F, LS, UF, IDBCF >::Domain = typename SignatureTraits::Domain |
| using Ikarus::NewtonRaphsonWithSubsidiaryFunction< F, LS, UF, IDBCF >::IDBCForceFunction = IDBCF |
| using Ikarus::NewtonRaphsonWithSubsidiaryFunction< F, LS, UF, IDBCF >::JacobianType = typename SignatureTraits::template Range<1> |
|
inherited |
| using Ikarus::NewtonRaphsonWithSubsidiaryFunction< F, LS, UF, IDBCF >::Settings = NewtonRaphsonWithSubsidiaryFunctionSettings |
| using Ikarus::NewtonRaphsonWithSubsidiaryFunction< F, LS, UF, IDBCF >::SignatureTraits = typename F::Traits |
|
inherited |
|
inherited |
| using Ikarus::NewtonRaphsonWithSubsidiaryFunction< F, LS, UF, IDBCF >::UpdateFunction = UF |
|
inlineexplicit |
| residual | residual to solve. |
| linearSolver | Linear solver used internally (default is SolverDefault). |
| updateFunction | Update function (default is UpdateDefault). |
| idbcForceFunction | Force function to handle inhomogeneous Dirichlet BCs (default is IDBCForceDefault). |
|
inline |
|
inlineinherited |
|
inlineinherited |
The function that is passed in is first stored in a shared_ptr. After this, the shared_ptr is added to the vector of listener functions, which leads to a implicit conversion to a weak_ptr. The shared_ptr is then returned to the Listener that has called this function to be stored in a vector of shared_ptr<void> listener.hh.
| callback | the callback function |
|
inline |
|
inline |
|
inline |
| p_settings | Settings for the solver. |
|
inline |
| SubsidiaryType | Type of the subsidiary function. |
| subsidiaryFunction | Subsidiary function to be solved. |
| req | Where the solution should be stored. |
| subsidiaryArgs | Additional arguments for the subsidiary function. |
| dxPredictor | Predictor for the solution increment (default is NoPredictor). |
Determine Fext0 It is assumed that Fext = Fext0 * lambda such that dRdlambda = Fext0 Generalization for Fext0 = Fext0(lambda) is not implemented Forces due to inhomogeneous Dirichlet BCs is treated separately
Iterative solving scheme
Two-step solving procedure
|
inlineinherited |
|
inline |
|
staticconstexpr |