Bertini 2 - C++ Core
Software for Numerical Algebraic Geometry
Loading...
Searching...
No Matches
step.hpp
Go to the documentation of this file.
1//This file is part of Bertini 2.
2//
3//tracking/step.hpp is free software: you can redistribute it and/or modify
4//it under the terms of the GNU General Public License as published by
5//the Free Software Foundation, either version 3 of the License, or
6//(at your option) any later version.
7//
8//tracking/step.hpp is distributed in the hope that it will be useful,
9//but WITHOUT ANY WARRANTY; without even the implied warranty of
10//MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11//GNU General Public License for more details.
12//
13//You should have received a copy of the GNU General Public License
14//along with tracking/step.hpp. If not, see <http://www.gnu.org/licenses/>.
15//
16// Copyright(C) 2015 - 2021 by Bertini2 Development Team
17//
18// See <http://www.gnu.org/licenses/> for a copy of the license,
19// as well as COPYING. Bertini2 is provided with permitted
20// additional terms in the b2/licenses/ directory.
21
22// individual authors of this file include:
23// silviana amethyst, university of wisconsin eau claire
24
25
33
34
35#ifndef BERTINI_STEP_HPP
36#define BERTINI_STEP_HPP
37
39#include "bertini2/trackers/correct.hpp"
40
41namespace bertini {
42
43 namespace tracking {
44
51 template <typename ComplexType, typename RealType>
52 SuccessCode Step(Predictor predictor_choice,
53 Vec<ComplexType> & next_space, ComplexType & next_time,
54 System & sys,
55 Vec<ComplexType> const& current_space, ComplexType current_time,
56 ComplexType const& delta_t,
57 RealType & condition_number_estimate,
58 unsigned & num_steps_since_last_condition_number_computation,
59 unsigned frequency_of_CN_estimation, PrecisionType prec_type,
60 RealType const& tracking_tolerance,
61 RealType const& path_truncation_threshold,
62 unsigned min_num_newton_iterations,
63 unsigned max_num_newton_iterations,
64 AdaptiveMultiplePrecisionConfig const& AMP_config)
65 {
66
67 SuccessCode predictor_code = Predict(next_space,
68 sys,
69 current_space, current_time,
70 delta_t,
71 condition_number_estimate,
72 num_steps_since_last_condition_number_computation,
73 frequency_of_CN_estimation, prec_type,
74 tracking_tolerance,
75 AMP_config);
76
77 if (predictor_code!=SuccessCode::Success)
78 return predictor_code;
79
80 next_time = current_time + delta_t;
81
82 SuccessCode corrector_code = Correct(next_space,
83 sys,
84 current_space, // pass by value to get a copy of it
85 next_time,
86 prec_type,
87 tracking_tolerance,
88 path_truncation_threshold,
89 min_num_newton_iterations,
90 max_num_newton_iterations,
91 AMP_config);
92
93
94 if (corrector_code!=SuccessCode::Success)
95 return corrector_code;
96
97 return SuccessCode::Success;
98 }
99
100 } // re: namespace tracking
101
102} // re: namespace bertini
103
104
105
106
107
108#endif
109
The fundamental polynomial system class for Bertini2.
Definition system/system.hpp:99
Wrapper functions for calling ODE predictors for systems.
SuccessCode Predict(Predictor predictor_choice, Vec< ComplexT > &next_space, System const &sys, Vec< ComplexT > const &current_space, ComplexT const &current_time, ComplexT const &delta_t, TolT &condition_number_estimate, unsigned &num_steps_since_last_condition_number_computation, unsigned frequency_of_CN_estimation, TolT const &tracking_tolerance)
Definition predict.hpp:60
SuccessCode Step(Predictor predictor_choice, Vec< ComplexType > &next_space, ComplexType &next_time, System &sys, Vec< ComplexType > const &current_space, ComplexType current_time, ComplexType const &delta_t, RealType &condition_number_estimate, unsigned &num_steps_since_last_condition_number_computation, unsigned frequency_of_CN_estimation, PrecisionType prec_type, RealType const &tracking_tolerance, RealType const &path_truncation_threshold, unsigned min_num_newton_iterations, unsigned max_num_newton_iterations, AdaptiveMultiplePrecisionConfig const &AMP_config)
Definition step.hpp:52
Definition trackers/config.hpp:154