version 0.4.1
Ikarus::LoadControl< NLS > Class Template Reference

The LoadControl control routine increases the parameter of the fe requirements given in run function and solves the corresponding differentiable function f for its root and calls a nonlinear solver. controlroutines This class represents the LoadControl control routine. It increments the parameter of the fe requirement and utilizes a nonlinear solver, such as Newton's method, to solve the resulting system at each step. More...

#include <ikarus/controlroutines/loadcontrol.hh>

Inheritance diagram for Ikarus::LoadControl< NLS >:
[legend]

Public Types

using State = ControlRoutineStateType< NLS::DifferentiableFunction >
 
using MessageType = ControlMessages
 
using Callback = std::function< void(ControlMessages, const State &)>
 
using Token = std::shared_ptr< Callback >
 

Public Member Functions

constexpr std::string name () const
 The name of the LoadControl method. More...
 
 LoadControl (const std::shared_ptr< NLS > &nonLinearSolver, int loadSteps, const std::array< double, 2 > &tbeginEnd)
 Constructor for LoadControl. More...
 
ControlInformation run (typename NLS::Domain &x)
 Executes the LoadControl routine. More...
 
NLS & nonLinearSolver ()
 
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 (ControlMessages message, const State &data)
 This calls all the registered functions. More...
 

Detailed Description

template<typename NLS>
class Ikarus::LoadControl< NLS >
Template Parameters
NLSType of the nonlinear solver used in the control routine.

Member Typedef Documentation

◆ Callback

using Ikarus::Broadcaster< ControlMessages , ControlRoutineStateType< NLS::DifferentiableFunction > >::Callback = std::function<void(ControlMessages , const State&)>
inherited

◆ MessageType

using Ikarus::Broadcaster< ControlMessages , ControlRoutineStateType< NLS::DifferentiableFunction > >::MessageType = ControlMessages
inherited

◆ State

using Ikarus::ControlRoutineBase< NLS::DifferentiableFunction , ControlRoutineStateType<NLS::DifferentiableFunction > , Args >::State = ControlRoutineStateType<NLS::DifferentiableFunction >
inherited

◆ Token

using Ikarus::Broadcaster< ControlMessages , ControlRoutineStateType< NLS::DifferentiableFunction > >::Token = std::shared_ptr<Callback>
inherited

Constructor & Destructor Documentation

◆ LoadControl()

template<typename NLS >
Ikarus::LoadControl< NLS >::LoadControl ( const std::shared_ptr< NLS > &  nonLinearSolver,
int  loadSteps,
const std::array< double, 2 > &  tbeginEnd 
)
inline
Parameters
nonLinearSolverShared pointer to the nonlinear solver.
loadStepsNumber of load steps in the control routine.
tbeginEndArray representing the range of load parameters [tbegin, tend].

Member Function Documentation

◆ name()

template<typename NLS >
constexpr std::string Ikarus::LoadControl< NLS >::name ( ) const
inlineconstexpr

◆ nonLinearSolver()

template<typename NLS >
NLS & Ikarus::LoadControl< NLS >::nonLinearSolver ( )
inline

◆ notify()

void Ikarus::Broadcaster< ControlMessages , ControlRoutineStateType< NLS::DifferentiableFunction > >::notify ( ControlMessages  message,
const State data 
)
inlineinherited

◆ registerListener()

Token Ikarus::Broadcaster< ControlMessages , ControlRoutineStateType< NLS::DifferentiableFunction > >::registerListener ( Callback  callback)
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.

Parameters
callbackthe callback function
Returns
Token

◆ run()

template<typename NLS >
ControlInformation Ikarus::LoadControl< NLS >::run ( typename NLS::Domain &  x)
Parameters
xThe solution.
Returns
ControlInformation structure containing information about the control results.

◆ unregisterListener()

void Ikarus::Broadcaster< ControlMessages , ControlRoutineStateType< NLS::DifferentiableFunction > >::unregisterListener ( Token  token)
inlineinherited

The documentation for this class was generated from the following files: