Bertini 2 - C++ Core
Software for Numerical Algebraic Geometry
Loading...
Searching...
No Matches
predict.hpp
Go to the documentation of this file.
1//This file is part of Bertini 2.
2//
3//tracking/predict.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/predict.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/predict.hpp. If not, see <http://www.gnu.org/licenses/>.
15//
16
17// Copyright(C) 2015 - 2021 by Bertini2 Development Team
18//
19// See <http://www.gnu.org/licenses/> for a copy of the license,
20// as well as COPYING. Bertini2 is provided with permitted
21// additional terms in the b2/licenses/ directory.
22
23// individual authors of this file include:
24// silviana amethyst, university of wisconsin eau claire
25
31
32#ifndef BERTINI_PREDICT_HPP
33#define BERTINI_PREDICT_HPP
34
36
37namespace bertini{
38 namespace tracking{
39
59 template <typename ComplexT, typename TolT>
60 SuccessCode Predict(Predictor predictor_choice,
61 Vec<ComplexT> & next_space,
62 System const& sys,
63 Vec<ComplexT> const& current_space, ComplexT const& current_time,
64 ComplexT const& delta_t,
65 TolT & condition_number_estimate,
66 unsigned & num_steps_since_last_condition_number_computation,
67 unsigned frequency_of_CN_estimation,
68 TolT const& tracking_tolerance)
69 {
70 predict::ExplicitRKPredictor predictor(predictor_choice);
71
72 return predictor.Predict(next_space,
73 sys,
74 current_space, current_time,
75 delta_t,
76 condition_number_estimate,
77 num_steps_since_last_condition_number_computation,
78 frequency_of_CN_estimation,
79 tracking_tolerance);
80 }
81
82
83
84
85
86
87
88
89
90
91
92
98 template <typename ComplexT, typename TolT>
99 SuccessCode Predict(Predictor predictor_choice,
100 Vec<ComplexT> & next_space,
101 TolT & size_proportion, /*\f$a\f$ from the AMP2 paper */
102 TolT & norm_J,
103 TolT & norm_J_inverse,
104 System const& sys,
105 Vec<ComplexT> const& current_space, ComplexT current_time,
106 ComplexT const& delta_t,
107 TolT & condition_number_estimate,
108 unsigned & num_steps_since_last_condition_number_computation,
109 unsigned frequency_of_CN_estimation,
110 TolT const& tracking_tolerance,
111 AdaptiveMultiplePrecisionConfig const& AMP_config)
112 {
113 predict::ExplicitRKPredictor<ComplexT, TolT> predictor(predictor_choice);
114
115 return predictor.Predict(next_space,
116 size_proportion,
117 norm_J,
118 norm_J_inverse,
119 sys,
120 current_space, current_time,
121 delta_t,
122 condition_number_estimate,
123 num_steps_since_last_condition_number_computation,
124 frequency_of_CN_estimation,
125 tracking_tolerance,
126 AMP_config);
127 }
128
129
130
131
132
133
134
140 template <typename ComplexT, typename TolT>
141 SuccessCode Predict(Predictor predictor_choice,
142 Vec<ComplexT> & next_space,
143 TolT & error_estimate,
144 TolT & size_proportion, /*\f$a\f$ from the AMP2 paper */
145 TolT & norm_J,
146 TolT & norm_J_inverse,
147 System const& sys,
148 Vec<ComplexT> const& current_space, ComplexT current_time,
149 ComplexT const& delta_t,
150 TolT & condition_number_estimate,
151 unsigned & num_steps_since_last_condition_number_computation,
152 unsigned frequency_of_CN_estimation,
153 TolT const& tracking_tolerance,
154 AdaptiveMultiplePrecisionConfig const& AMP_config)
155 {
156 predict::ExplicitRKPredictor<ComplexT, TolT> predictor(predictor_choice);
157
158 return predictor.Predict(next_space,
159 error_estimate,
160 size_proportion,
161 norm_J,
162 norm_J_inverse,
163 sys,
164 current_space, current_time,
165 delta_t,
166 condition_number_estimate,
167 num_steps_since_last_condition_number_computation,
168 frequency_of_CN_estimation,
169 tracking_tolerance,
170 AMP_config);
171 }
172
173
174
194 template <typename ComplexT, typename TolT>
195 SuccessCode Predict(Predictor predictor_choice,
196 Vec<ComplexT> & next_space,
197 System const& sys,
198 Vec<ComplexT> const& current_space, ComplexT current_time,
199 ComplexT const& delta_t,
200 TolT & condition_number_estimate,
201 unsigned & num_steps_since_last_condition_number_computation,
202 unsigned frequency_of_CN_estimation,
203 TolT const& tracking_tolerance,
204 AdaptiveMultiplePrecisionConfig const& AMP_config)
205 {
206 TolT size_proportion, norm_J, norm_J_inverse;
207
208 return Predict(predictor_choice,
209 next_space,
210 size_proportion,
211 norm_J,
212 norm_J_inverse,
213 sys,
214 current_space, current_time,
215 delta_t,
216 condition_number_estimate,
217 num_steps_since_last_condition_number_computation,
218 frequency_of_CN_estimation,
219 tracking_tolerance,
220 AMP_config);
221 }
222
223
224
225
226
227
228
229
230 } // re: namespace tracking
231
232
233} // re: namespace bertini
234
235
236
237#endif
The fundamental polynomial system class for Bertini2.
Definition system/system.hpp:99
A class which stores all the explicit single-step multi-stage ODE predictor methods.
Definition explicit_predictors.hpp:202
SuccessCode Predict(Vec< ComplexType > &next_space, System const &S, const Vec< ComplexType > &current_space, ComplexType current_time, ComplexType const &delta_t, NumErrorT &condition_number_estimate, unsigned &num_steps_since_last_condition_number_computation, unsigned frequency_of_CN_estimation, NumErrorT const &tracking_tolerance)
Perform a generic predictor step.
Definition explicit_predictors.hpp:460
Includes for the suite of ODE predictors.
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
Definition trackers/config.hpp:154