13#include <dune/common/hybridutilities.hh>
22template <
typename NLS>
44template <
typename NLS>
46 return LoadControl(std::forward<NLS>(nonlinearSolver), config.
loadSteps, std::array{config.tbegin, config.tEnd});
58template <
typename NLS>
63 constexpr std::string
name()
const {
return "Load Control Method"; }
74 loadSteps_{loadSteps},
75 parameterBegin_{tbeginEnd[0]},
76 parameterEnd_{tbeginEnd[1]},
77 stepSize_{(parameterEnd_ - parameterBegin_) / loadSteps_} {
79 DUNE_THROW(Dune::InvalidStateException,
"Number of load steps should be greater than zero.");
94 void predictor(
typename NLS::Domain& x)
const;
100 std::shared_ptr<NLS> nonLinearSolver_;
102 double parameterBegin_;
103 double parameterEnd_;
Implementation of the observer design pattern with broadcasters.
Defines the ControlInformation structure for storing control results.
Base for all control routines.
Implementation of the run function.
Factory for controlroutines.
Definition: assemblermanipulatorbuildingblocks.hh:22
auto createControlRoutine(const LoadControlConfig &config, NLS &&nonlinearSolver)
Function to create a load control instance.
Definition: loadcontrol.hh:45
Structure containing information about the control results.
Definition: controlinfos.hh:23
int totalIterations
Total number of iterations performed.
Definition: controlinfos.hh:30
std::vector< Ikarus::NonLinearSolverInformation > solverInfos
Vector containing information from nonlinear solvers.
Definition: controlinfos.hh:29
Base for all control routines. Defines the message interface that can be broadcasted to listeners.
Definition: controlroutinebase.hh:24
State for control routines.
Definition: controlroutinestate.hh:23
The LoadControl control routine increases the parameter of the fe requirements given in run function ...
Definition: loadcontrol.hh:60
LoadControl(const std::shared_ptr< NLS > &nonLinearSolver, int loadSteps, const std::array< double, 2 > &tbeginEnd)
Constructor for LoadControl.
Definition: loadcontrol.hh:72
constexpr std::string name() const
The name of the LoadControl method.
Definition: loadcontrol.hh:63
NLS & nonLinearSolver()
Definition: loadcontrol.hh:97
void predictor(typename NLS::Domain &x) const
Performs the prediction for every load increment.
Definition: loadcontrol.inl:55
ControlInformation run(typename NLS::Domain &x)
Executes the LoadControl routine.
Definition: loadcontrol.inl:21
Config for the Load-Control control routine.
Definition: loadcontrol.hh:30
double tEnd
Definition: loadcontrol.hh:33
int loadSteps
Definition: loadcontrol.hh:31
double tbegin
Definition: loadcontrol.hh:32
Information about the result of a non-linear solver.
Definition: solverinfos.hh:21
int iterations
Definition: solverinfos.hh:31
void notify(ControlMessages message, const State &data)
This calls all the registered functions.
Definition: broadcaster.hh:61