version 0.4.1
pathfollowing.hh
Go to the documentation of this file.
1// SPDX-FileCopyrightText: 2021-2024 The Ikarus Developers mueller@ibb.uni-stuttgart.de
2// SPDX-License-Identifier: LGPL-3.0-or-later
3
9#pragma once
10
11#include <memory>
12
21
22namespace Ikarus {
23
24namespace Impl {
25
38 template <typename NLS, typename PF = ArcLength, typename ASS>
39 consteval bool checkPathFollowingTemplates() {
40 return Concepts::PathFollowingStrategy<PF, typename NLS::NonLinearOperator, SubsidiaryArgs> and
41 Concepts::AdaptiveStepSizingStrategy<ASS, NonLinearSolverInformation, SubsidiaryArgs,
42 std::remove_cvref_t<typename NLS::NonLinearOperator>> and
43 Concepts::NonLinearSolverCheckForPathFollowing<NLS>;
44 }
45
46} // namespace Impl
47
77template <typename NLS, typename PF = ArcLength, typename ASS = AdaptiveStepSizing::NoOp>
78requires(Impl::checkPathFollowingTemplates<NLS, PF, ASS>())
80{
81public:
83 constexpr auto name() const { return std::string("Path following with " + pathFollowingType_.name()); }
84
93 PathFollowing(const std::shared_ptr<NLS>& nls, int steps, double stepSize, PF pathFollowingType = ArcLength{},
94 ASS adaptiveStepSizing = {})
95 : nonLinearSolver_{nls},
96 steps_{steps},
97 stepSize_{stepSize},
98 pathFollowingType_{pathFollowingType},
99 adaptiveStepSizing_{adaptiveStepSizing} {}
100
106 ControlInformation run();
107
108 /* \brief returns the nonlinear solver */
109 NLS& nonlinearSolver() { return *nonLinearSolver_; }
110
111private:
112 std::shared_ptr<NLS> nonLinearSolver_;
113
114 int steps_;
115 double stepSize_;
116 PF pathFollowingType_;
117 ASS adaptiveStepSizing_;
118};
119
120} // namespace Ikarus
121
Contains the generic NonLinearOperatorFactory class.
Implementation of the run function.
Defines structures and methods related to subsidiary functions for control routines.
Contains the AdaptiveStepSizing namespace with strategies for adaptive step sizing.
Defines the ControlInformation structure for storing control results.
Enums for observer messages.
Implementation of the observer design pattern.
Contains the generic NonlinearSolverFactory class.
Definition: assemblermanipulatorbuildingblocks.hh:22
The PathFollowing control routine for path-following analysis.
Definition: pathfollowing.hh:80
NLS & nonlinearSolver()
Definition: pathfollowing.hh:109
constexpr auto name() const
The name of the PathFollowing method.
Definition: pathfollowing.hh:83
PathFollowing(const std::shared_ptr< NLS > &nls, int steps, double stepSize, PF pathFollowingType=ArcLength{}, ASS adaptiveStepSizing={})
Constructor for PathFollowing.
Definition: pathfollowing.hh:93
Structure representing the subsidiary function for the standard arc-length method.
Definition: pathfollowingfunctions.hh:67