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
19
20namespace Ikarus {
21
22namespace Impl {
23
36 template <typename NLS, typename PF = ArcLength, typename ASS>
37 consteval bool checkPathFollowingTemplates() {
38 return Concepts::PathFollowingStrategy<PF, typename NLS::NonLinearOperator, SubsidiaryArgs> and
39 Concepts::AdaptiveStepSizingStrategy<ASS, NonLinearSolverInformation, SubsidiaryArgs,
40 std::remove_cvref_t<typename NLS::NonLinearOperator>> and
41 Concepts::NonLinearSolverCheckForPathFollowing<NLS>;
42 }
43
44} // namespace Impl
45
75template <typename NLS, typename PF = ArcLength, typename ASS = AdaptiveStepSizing::NoOp>
76requires(Impl::checkPathFollowingTemplates<NLS, PF, ASS>())
78{
79public:
81 constexpr auto name() const { return std::string("Path following with " + pathFollowingType_.name()); }
82
92 PathFollowing(const std::shared_ptr<NLS>& nonLinearSolver, int steps, double stepSize,
93 PF pathFollowingType = ArcLength{}, ASS adaptiveStepSizing = {})
94 : nonLinearSolver_{nonLinearSolver},
95 steps_{steps},
96 stepSize_{stepSize},
97 pathFollowingType_{pathFollowingType},
98 adaptiveStepSizing_{adaptiveStepSizing} {}
99
105 ControlInformation run();
106
107private:
108 std::shared_ptr<NLS> nonLinearSolver_;
109 int steps_;
110 double stepSize_;
111 PF pathFollowingType_;
112 ASS adaptiveStepSizing_;
113};
114
115} // namespace Ikarus
116
Implementation of the run function.
Defines structures and methods related to subsidiary functions for control routines.
Defines the ControlInformation structure for storing control results.
Contains the AdaptiveStepSizing namespace with strategies for adaptive step sizing.
Enums for observer messages.
Implementation of the observer design pattern.
Definition: simpleassemblers.hh:22
The PathFollowing control routine for path-following analysis.
Definition: pathfollowing.hh:78
constexpr auto name() const
The name of the PathFollowing method.
Definition: pathfollowing.hh:81
PathFollowing(const std::shared_ptr< NLS > &nonLinearSolver, int steps, double stepSize, PF pathFollowingType=ArcLength{}, ASS adaptiveStepSizing={})
Constructor for PathFollowing.
Definition: pathfollowing.hh:92
Structure representing the subsidiary function for the standard arc-length method.
Definition: pathfollowingfunctions.hh:67