Bertini 2 d882924 (2026-10-06 19:56 UTC)
Numerical algebraic geometry library (C++ core)
Loading...
Searching...
No Matches
tracking.hpp
Go to the documentation of this file.
1//This file is part of Bertini 2.
2//
3//bertini2/io/parsing/settings_parsers/tracking.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//bertini2/io/parsing/settings_parsers/tracking.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 bertini2/io/parsing/settings_parsers/tracking.hpp. If not, see <http://www.gnu.org/licenses/>.
15//
16// Copyright(C) 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
28
29#pragma once
30
31
34
35
36namespace bertini {
37 namespace parsing {
38 namespace classic {
39
40
41 namespace {
42 using namespace bertini::tracking;
43 }
67 template<typename Iterator, typename Skipper> //boost::spirit::unused_type
69 struct ConfigSettingParser<Iterator, PrecisionType, Skipper> : qi::grammar<Iterator, PrecisionType(), Skipper>
70 {
71
72 ConfigSettingParser() : ConfigSettingParser::base_type(root_rule_, "PrecisionType")
73 {
74 namespace phx = boost::phoenix;
75 using qi::_1;
76 using qi::_2;
77 using qi::_3;
78 using qi::_4;
79 using qi::_val;
80 using qi::eps;
81 using qi::lit;
82 using qi::char_;
83 using qi::omit;
84 using boost::spirit::lexeme;
85 using boost::spirit::as_string;
86 using boost::spirit::ascii::no_case;
87
88 precisiontype_.add("0", PrecisionType::Fixed);
89 precisiontype_.add("1", PrecisionType::FixedMultiple);
90 precisiontype_.add("2", PrecisionType::Adaptive);
91
92
93
94
95 root_rule_.name("config::PrecisionType");
96
97 root_rule_ = (config_name_[_val = _1] >> -no_setting_) | no_setting_[_val = PrecisionType::Adaptive];
98
99 config_name_.name("precisiontype_");
100 config_name_ = *(char_ - (no_case["mptype"]>>':')) >> (no_case["mptype"] >> ':') >> precisiontype_[_val = _1] >> ';';
101
102 no_setting_.name("no_setting_");
103 no_setting_ = *(char_ - no_case["mptype:"]);
104
105 no_decl_.name("no_decl_");
106 no_decl_ = *(char_);
107
108
109
110
111 qi::on_error<qi::fail>(
112 root_rule_,
113 phx::bind(&ReportParseError, _1, _2, _3, _4, std::string("config::PrecisionType"))
114 );
115
116
117
118 }
119
120
121 private:
122 qi::rule<Iterator, PrecisionType(), ascii::space_type > root_rule_, config_name_;
123 qi::rule<Iterator, ascii::space_type, std::string()> no_decl_, no_setting_;
124
125 qi::symbols<char,PrecisionType> precisiontype_;
126
127
128 }; //re: PrecisionTypeParser
129
130
131
132
133
134
135
136
140 template<typename Iterator, typename Skipper> //boost::spirit::unused_type
142 struct ConfigSettingParser<Iterator, Predictor, Skipper> : qi::grammar<Iterator, Predictor(), Skipper>
143 {
144
145 ConfigSettingParser() : ConfigSettingParser::base_type(root_rule_, "config::PredictorType")
146 {
147 namespace phx = boost::phoenix;
148 using qi::_1;
149 using qi::_2;
150 using qi::_3;
151 using qi::_4;
152 using qi::_val;
153 using qi::eps;
154 using qi::lit;
155 using qi::char_;
156 using qi::omit;
157 using boost::spirit::lexeme;
158 using boost::spirit::as_string;
159 using boost::spirit::ascii::no_case;
160
161 predictor_.add("-1", Predictor::Constant);
162 predictor_.add("0", Predictor::Euler);
163 predictor_.add("1", Predictor::Heun);
164 predictor_.add("2", Predictor::RK4);
165 predictor_.add("3", Predictor::Heun);
166 predictor_.add("4", Predictor::RKNorsett34);
167 predictor_.add("5", Predictor::RKF45);
168 predictor_.add("6", Predictor::RKCashKarp45);
169 predictor_.add("7", Predictor::RKDormandPrince56);
170 predictor_.add("8", Predictor::RKVerner67);
171
172
173 std::string setting_name = "odepredictor";
174
175
176 root_rule_.name("Predictor");
177
178 root_rule_ = (config_name_[_val = _1] >> -no_setting_) | no_setting_[_val = Predictor::RKF45];
179
180 config_name_.name("predictor_");
181 config_name_ = *(char_ - (no_case[setting_name] >> ':')) >> (no_case[setting_name] >> ':') >> predictor_[_val = _1] >> ';';
182
183 no_setting_.name("no_setting_");
184 no_setting_ = *(char_ - no_case[setting_name]);
185
186 no_decl_.name("no_decl_");
187 no_decl_ = *(char_);
188
189
190
191
192 qi::on_error<qi::fail>(
193 root_rule_,
194 phx::bind(&ReportParseError, _1, _2, _3, _4, std::string("Predictor"))
195 );
196
197
198
199 }
200
201
202 private:
203 qi::rule<Iterator, Predictor(), ascii::space_type > root_rule_, config_name_;
204 qi::rule<Iterator, ascii::space_type, std::string()> no_decl_, no_setting_;
205
206 qi::symbols<char,Predictor> predictor_;
207
208
209 }; //re: PredictorTypeParser
210
211
219 template<typename Iterator, typename Skipper>
220 struct ConfigSettingParser<Iterator, TrackerConfig, Skipper> : qi::grammar<Iterator, TrackerConfig(), Skipper>
221 {
222 using T = NumErrorT;
223
224 ConfigSettingParser() : ConfigSettingParser::base_type(root_rule_, "config::Tracker")
225 {
226 namespace phx = boost::phoenix;
227 using qi::_1;
228 using qi::_2;
229 using qi::_3;
230 using qi::_4;
231 using qi::_val;
232 using qi::eps;
233 using qi::lit;
234 using qi::char_;
235 using qi::omit;
236 using boost::spirit::lexeme;
237 using boost::spirit::as_string;
238 using boost::spirit::ascii::no_case;
239
240 predictor_.add("-1", Predictor::Constant);
241 predictor_.add("0", Predictor::Euler);
242 predictor_.add("1", Predictor::Heun);
243 predictor_.add("2", Predictor::RK4);
244 predictor_.add("3", Predictor::Heun);
245 predictor_.add("4", Predictor::RKNorsett34);
246 predictor_.add("5", Predictor::RKF45);
247 predictor_.add("6", Predictor::RKCashKarp45);
248 predictor_.add("7", Predictor::RKDormandPrince56);
249 predictor_.add("8", Predictor::RKVerner67);
250
251 std::string predictor_name = "odepredictor";
252 std::string path_trunc_name = "pathtruncationthreshold";
253
254 root_rule_.name("config::Tracker");
255
256 root_rule_ = ((predictor_choice_[phx::bind( [](TrackerConfig & S, Predictor p)
257 {
258 S.predictor = p;
259 }, _val, _1 )]
260 ^ path_trunc_threshold_[phx::bind( [](TrackerConfig & S, T num)
261 {
263 }, _val, _1 )])
264
265 >> -no_setting_)
266 | no_setting_;
267
268 all_names_ = (no_case[predictor_name] >> ':') | (no_case[path_trunc_name] >> ':');
269
270 predictor_choice_.name("predictor_choice_");
271 predictor_choice_ = *(char_ - all_names_) >> (no_case[predictor_name] >> ':')
272 >> predictor_[_val = _1] >> ';';
273
274 path_trunc_threshold_.name("path_trunc_threshold_");
275 path_trunc_threshold_ = *(char_ - all_names_) >> (no_case[path_trunc_name] >> ':')
276 >> mpfr_rules.number_string_[phx::bind( [](T & num, std::string str)
277 {
279 }, _val, _1 )] >> ';';
280
281 no_setting_.name("no_setting_");
282 no_setting_ = *(char_ - all_names_);
283
284 no_decl_.name("no_decl_");
285 no_decl_ = *(char_);
286
287 qi::on_error<qi::fail>(
288 root_rule_,
289 phx::bind(&ReportParseError, _1, _2, _3, _4, std::string("config::Tracker"))
290 );
291 }
292
293 private:
294 qi::rule<Iterator, TrackerConfig(), ascii::space_type > root_rule_;
295 qi::rule<Iterator, Predictor(), ascii::space_type > predictor_choice_;
296 qi::rule<Iterator, T(), ascii::space_type > path_trunc_threshold_;
297 qi::rule<Iterator, ascii::space_type, std::string()> no_decl_, no_setting_, all_names_;
298 rules::LongNum<Iterator> mpfr_rules;
299
300 qi::symbols<char,Predictor> predictor_;
301
302 }; //re: TrackerConfig parser
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
324 template<typename Iterator, typename Skipper> //boost::spirit::unused_type
326 struct ConfigSettingParser<Iterator, SteppingConfig, Skipper> : qi::grammar<Iterator, SteppingConfig(), Skipper>
327 {
328
329 private:
330 using T = mpq_rational; // exact rational: no MPFR precision state to go stale
331 using R = mpq_rational;
332
333 public:
334
335 ConfigSettingParser() : ConfigSettingParser::base_type(root_rule_, "config::SteppingType")
336 {
337
338 namespace phx = boost::phoenix;
339 using qi::_1;
340 using qi::_2;
341 using qi::_3;
342 using qi::_4;
343 using qi::_val;
344 using qi::eps;
345 using qi::lit;
346 using qi::char_;
347 using qi::omit;
348 using boost::spirit::lexeme;
349 using boost::spirit::as_string;
350 using boost::spirit::ascii::no_case;
351
352
353
354 std::string maxstep_name = "maxstepsize";
355 std::string stepsuccess_name = "stepsuccessfactor";
356 std::string stepfail_name = "stepfailfactor";
357 std::string stepsincrease_name = "stepsforincrease";
358 std::string maxnumsteps_name = "maxnumbersteps";
359
360
361 root_rule_.name("SteppingConfig");
362
363 root_rule_ = ((max_step_size_[phx::bind( [](SteppingConfig & S, T num)
364 {
365 S.max_step_size = num;
366 }, _val, _1 )]
367 ^ stepsize_success_[phx::bind( [](SteppingConfig & S, R num)
368 {
370 }, _val, _1 )]
371 ^ stepsize_fail_[phx::bind( [](SteppingConfig & S, R num)
372 {
373 S.step_size_fail_factor = num;
374 }, _val, _1 )]
375 ^ steps_increase_[phx::bind( [](SteppingConfig & S, unsigned num)
376 {
378 }, _val, _1 )]
379 ^ max_num_steps_[phx::bind( [](SteppingConfig & S, unsigned num)
380 {
381 S.max_num_steps = num;
382 }, _val, _1 )])
383
384 >> -no_setting_)
385 | no_setting_;
386
387
388 all_names_ = (no_case[maxstep_name] >> ':') | (no_case[stepsuccess_name] >> ':')|
389 (no_case[stepfail_name] >> ':')| (no_case[stepsincrease_name] >> ':') | (no_case[maxnumsteps_name] >> ':');
390
391 max_step_size_.name("max_step_size_");
392 max_step_size_ = *(char_ - all_names_) >> (no_case[maxstep_name] >> ':')
393 >> mpfr_rules.rational[phx::bind( [](T & num, std::string const& str)
394 {
396 }, _val, _1 )] >> ';';
397
398 stepsize_success_.name("stepsize_success_");
399 stepsize_success_ = *(char_ - all_names_) >> (no_case[stepsuccess_name] >> ':')
400 >> mpfr_rules.rational[phx::bind( [](R & num, std::string const& str)
401 {
403 }, _val, _1 )] >> ';';
404
405 stepsize_fail_.name("stepsize_fail_");
406 stepsize_fail_ = *(char_ - all_names_) >> (no_case[stepfail_name] >> ':')
407 >> mpfr_rules.rational[phx::bind( [](R & num, std::string const& str)
408 {
410 }, _val, _1 )] >> ';';
411
412 steps_increase_.name("steps_increase_");
413 steps_increase_ = *(char_ - all_names_) >> (no_case[stepsincrease_name] >> ':') >> qi::uint_[_val=_1] >> ';';
414
415 max_num_steps_.name("max_num_steps_");
416 max_num_steps_ = *(char_ - all_names_) >> (no_case[maxnumsteps_name] >> ':') >> qi::uint_[_val=_1] >> ';';
417
418 no_setting_.name("no_setting_");
419 no_setting_ = *(char_ - all_names_);
420
421 no_decl_.name("no_decl_");
422 no_decl_ = *(char_);
423
424
425
426
427
428 qi::on_error<qi::fail>(
429 root_rule_,
430 phx::bind(&ReportParseError, _1, _2, _3, _4, std::string("SteppingConfig"))
431 );
432
433
434
435 }
436
437
438 private:
439 qi::rule<Iterator, SteppingConfig(), ascii::space_type > root_rule_;
440 qi::rule<Iterator, T(), ascii::space_type > max_step_size_;
441 qi::rule<Iterator, R(), ascii::space_type > stepsize_success_, stepsize_fail_;
442 qi::rule<Iterator, unsigned int(), ascii::space_type > steps_increase_, max_num_steps_;
443 qi::rule<Iterator, ascii::space_type, std::string()> no_decl_, no_setting_, all_names_;
444 rules::LongNum<Iterator> mpfr_rules;
445
446
447
448 }; //re: SteppingParser
449
450
451
452
453
457 template<typename Iterator, typename Skipper> //boost::spirit::unused_type
459 struct ConfigSettingParser<Iterator, NewtonConfig, Skipper> : qi::grammar<Iterator, NewtonConfig(), Skipper>
460 {
461
462 ConfigSettingParser() : ConfigSettingParser::base_type(root_rule_, "config::NewtonType")
463 {
464 namespace phx = boost::phoenix;
465 using qi::_1;
466 using qi::_2;
467 using qi::_3;
468 using qi::_4;
469 using qi::_val;
470 using qi::eps;
471 using qi::lit;
472 using qi::char_;
473 using qi::omit;
474 using boost::spirit::lexeme;
475 using boost::spirit::as_string;
476 using boost::spirit::ascii::no_case;
477
478
479
480 std::string maxits_name = "maxnewtonits";
481
482
483 root_rule_.name("NewtonConfig");
484
485 root_rule_ = (max_its_[phx::bind( [](NewtonConfig & S, unsigned num)
486 {
488 }, _val, _1 )]
489
490 >> -no_setting_)
491 | no_setting_;
492
493
494
495 all_names_ = eps >> (no_case[maxits_name] >> ':');
496
497 max_its_.name("max_its_");
498 max_its_ = *(char_ - no_case[maxits_name]) >> (no_case[maxits_name] >> ':') >> qi::uint_[_val=_1] >> ';';
499
500 no_setting_.name("no_setting_");
501 no_setting_ = *(char_ - all_names_);
502
503 no_decl_.name("no_decl_");
504 no_decl_ = *(char_);
505
506
507
508
509
510 qi::on_error<qi::fail>(
511 root_rule_,
512 phx::bind(&ReportParseError, _1, _2, _3, _4, std::string("NewtonConfig"))
513 );
514
515
516
517 }
518
519
520 private:
521 qi::rule<Iterator, NewtonConfig(), Skipper> root_rule_;
522 qi::rule<Iterator, unsigned int(), ascii::space_type > max_its_;
523 qi::rule<Iterator, ascii::space_type, std::string()> no_decl_, no_setting_, all_names_;
524 }; //re: NewtonParser
525
526
527
528
533 template<typename Iterator, typename Skipper>
535 struct ConfigSettingParser<Iterator, FixedPrecisionConfig, Skipper> : qi::grammar<Iterator, FixedPrecisionConfig(), Skipper>
536 {
537
538 ConfigSettingParser() : ConfigSettingParser::base_type(root_rule_, "config::FixedPrecision")
539 {
540 namespace phx = boost::phoenix;
541 using qi::_1;
542 using qi::_2;
543 using qi::_3;
544 using qi::_4;
545 using qi::_val;
546 using qi::eps;
547 using qi::lit;
548 using qi::char_;
549 using qi::omit;
550 using boost::spirit::lexeme;
551 using boost::spirit::as_string;
552 using boost::spirit::ascii::no_case;
553
554
555
556 root_rule_.name("config::FixedPrecision");
557 root_rule_ = eps[_val = FixedPrecisionConfig()] >> omit[*(char_)];
558
559
560
561 qi::on_error<qi::fail>(
562 root_rule_,
563 phx::bind(&ReportParseError, _1, _2, _3, _4, std::string("config::FixedPrecision"))
564 );
565 }
566
567
568 private:
569 qi::rule<Iterator, FixedPrecisionConfig(), ascii::space_type > root_rule_;
570 }; //re: FixedPrecisionConfig Parser
571
572
573
574
575
576
577
580 template<typename Iterator, typename Skipper>
582 struct ConfigSettingParser<Iterator, AdaptiveMultiplePrecisionConfig, Skipper> : qi::grammar<Iterator, AdaptiveMultiplePrecisionConfig(), Skipper>
583 {
584
585 ConfigSettingParser() : ConfigSettingParser::base_type(root_rule_, "AdaptiveMultiplePrecisionConfig")
586 {
587 using T = double;
588
589 namespace phx = boost::phoenix;
590 using qi::_1;
591 using qi::_2;
592 using qi::_3;
593 using qi::_4;
594 using qi::_val;
595 using qi::eps;
596 using qi::lit;
597 using qi::char_;
598 using qi::omit;
599 using boost::spirit::lexeme;
600 using boost::spirit::as_string;
601 using boost::spirit::ascii::no_case;
602
603
604
605 std::string coefficient_bound_name = "coefficientbound";
606 std::string degree_bound_name = "degreebound";
607 std::string lin_solve_error_bnd_name = "epsilon";
608 std::string jac_eval_err_bnd_name = "phi";
609 std::string func_eval_err_bnd_name = "psi";
610 std::string safety_one_name = "ampsafetydigits1";
611 std::string safety_two_name = "ampsafetydigits2";
612 std::string max_prec_name = "ampmaxprec";
613 std::string max_num_prec_decs_name = "maxnumprecdecreases";
614
615 root_rule_.name("config::AMP");
616
617 root_rule_ = ((coefficient_bound_[phx::bind( [](AdaptiveMultiplePrecisionConfig & S, T num)
618 {
619 S.coefficient_bound = num;
620 }, _val, _1 )]
621 ^ degree_bound_[phx::bind( [](AdaptiveMultiplePrecisionConfig & S, T num)
622 {
623 S.degree_bound = num;
624 }, _val, _1 )]
625 ^ lin_solve_error_bnd_[phx::bind( [](AdaptiveMultiplePrecisionConfig & S, T num)
626 {
628 }, _val, _1 )]
629 ^ jac_eval_err_bnd_[phx::bind( [](AdaptiveMultiplePrecisionConfig & S, T num)
630 {
632 }, _val, _1 )]
633 ^ func_eval_err_bnd_[phx::bind( [](AdaptiveMultiplePrecisionConfig & S, T num)
634 {
636 }, _val, _1 )]
637 ^ safety_one_[phx::bind( [](AdaptiveMultiplePrecisionConfig & S, int num)
638 {
639 S.safety_digits_1 = num;
640 }, _val, _1 )]
641 ^ safety_two_[phx::bind( [](AdaptiveMultiplePrecisionConfig & S, int num)
642 {
643 S.safety_digits_2 = num;
644 }, _val, _1 )]
645 ^ max_prec_[phx::bind( [](AdaptiveMultiplePrecisionConfig & S, unsigned num)
646 {
647 S.maximum_precision = num;
648 }, _val, _1 )]
649 ^ max_num_prec_decs_[phx::bind( [](AdaptiveMultiplePrecisionConfig & S, unsigned num)
650 {
652 }, _val, _1 )]
653 )
654 >> -no_setting_) | no_setting_;
655
656 all_names_ = (no_case[coefficient_bound_name] >> ':') |
657 (no_case[degree_bound_name] >> ':') |
658 (no_case[lin_solve_error_bnd_name] >> ':') |
659 (no_case[jac_eval_err_bnd_name] >> ':') |
660 (no_case[func_eval_err_bnd_name] >> ':') |
661 (no_case[safety_one_name] >> ':') |
662 (no_case[safety_two_name] >> ':') |
663 (no_case[max_prec_name] >> ':') |
664 (no_case[max_num_prec_decs_name] >> ':')
665 ;
666
667
668 auto str_to_T = [](T & num, std::string const& str)
669 {
670 // std::cout << str << std::endl;
672 };
673
674
675 degree_bound_.name("degree_bound_");
676 degree_bound_ = *(char_ - all_names_) >> (no_case[degree_bound_name] >> ':')
677 >> mpfr_rules.number_string_[phx::bind( str_to_T, _val, _1 )] >> ';';
678
679 coefficient_bound_.name("coefficient_bound_");
680 coefficient_bound_ = *(char_ - all_names_) >> (no_case[coefficient_bound_name] >> ':')
681 >> mpfr_rules.number_string_[phx::bind( str_to_T, _val, _1 )] >> ';';
682
683 lin_solve_error_bnd_.name("lin_solve_error_bnd_");
684 lin_solve_error_bnd_ = *(char_ - all_names_) >> (no_case[lin_solve_error_bnd_name] >> ':')
685 >> mpfr_rules.number_string_[phx::bind( str_to_T, _val, _1 )] >> ';';
686
687 jac_eval_err_bnd_.name("jac_eval_err_bnd_");
688 jac_eval_err_bnd_ = *(char_ - all_names_) >> (no_case[jac_eval_err_bnd_name] >> ':')
689 >> mpfr_rules.number_string_[phx::bind( str_to_T, _val, _1 )] >> ';';
690
691 func_eval_err_bnd_.name("func_eval_err_bnd_");
692 func_eval_err_bnd_ = *(char_ - all_names_) >> (no_case[func_eval_err_bnd_name] >> ':')
693 >> mpfr_rules.number_string_[phx::bind( str_to_T, _val, _1 )] >> ';';
694
695 safety_one_.name("safety_one_");
696 safety_one_ = *(char_ - all_names_) >> (no_case[safety_one_name] >> ':') >> qi::int_[_val=_1] >> ';';
697
698 safety_two_.name("safety_two_");
699 safety_two_ = *(char_ - all_names_) >> (no_case[safety_two_name] >> ':') >> qi::int_[_val=_1] >> ';';
700
701 max_prec_.name("max_prec_");
702 max_prec_ = *(char_ - all_names_) >> (no_case[max_prec_name] >> ':') >> qi::uint_[_val=_1] >> ';';
703
704 max_num_prec_decs_.name("max_num_prec_decs_");
705 max_num_prec_decs_ = *(char_ - all_names_) >> (no_case[max_num_prec_decs_name] >> ':') >> qi::uint_[_val=_1] >> ';';
706
707
708 no_setting_.name("no_setting_");
709 no_setting_ = *(char_ - all_names_);
710
711 no_decl_.name("no_decl_");
712 no_decl_ = *(char_);
713
714
715
716
717 qi::on_error<qi::fail>(
718 root_rule_,
719 phx::bind(&ReportParseError, _1, _2, _3, _4, std::string("config::AMP"))
720 );
721
722
723
724 }
725
726
727 private:
728 qi::rule<Iterator, AdaptiveMultiplePrecisionConfig(), ascii::space_type > root_rule_;
729
730 qi::rule<Iterator, double(), ascii::space_type > degree_bound_, coefficient_bound_, lin_solve_error_bnd_, jac_eval_err_bnd_, func_eval_err_bnd_;
731 qi::rule<Iterator, int(), ascii::space_type > safety_one_, safety_two_;
732 qi::rule<Iterator, unsigned int(), ascii::space_type > max_prec_, max_num_prec_decs_;
733
734 qi::rule<Iterator, ascii::space_type, std::string()> no_decl_, no_setting_, all_names_;
735 rules::LongNum<Iterator> mpfr_rules;
736
737
738
739 }; //re: AMPParser
740
741
742
743
744
745 } // re: namespace classic
746
747 }// re: namespace parsing
748}// re: namespace bertini
Provides the base type for config settings parsers.
Definition classic_utilities.hpp:41
void ReportParseError(std::string::const_iterator begin, std::string::const_iterator end, std::string::const_iterator err_pos, boost::spirit::info const &what, std::string const &parser_name)
Report a parse error (via FormatParseError) to the log, for use in a Spirit on_error handler.
Definition qi_files.hpp:199
AdaptiveMultiplePrecisionConfig AdaptiveMultiplePrecisionConfig
Alias bringing the AMP config type into this scope for the parser specialization below.
Definition tracking.hpp:579
Definition classic_utilities.hpp:40
Predictor
The predictor (ODE integration) method used during path tracking.
Definition config.hpp:55
@ RKCashKarp45
Definition config.hpp:63
@ Euler
Definition config.hpp:57
@ RKNorsett34
Definition config.hpp:61
@ RKDormandPrince56
Definition config.hpp:64
@ RKVerner67
Definition config.hpp:65
@ RKF45
Definition config.hpp:62
@ Constant
Definition config.hpp:56
@ Heun
Definition config.hpp:58
@ RK4
Definition config.hpp:59
PrecisionType
The precision regime a tracker operates in: fixed double, fixed multiple, or adaptive.
Definition config.hpp:46
@ Adaptive
Definition config.hpp:49
@ Fixed
Definition config.hpp:47
@ FixedMultiple
Definition config.hpp:48
Definition algorithm_builder.hpp:36
double NumErrorT
The numeric type used to hold error/tolerance magnitudes throughout Bertini2 – tracking tolerances,...
Definition num_traits.hpp:48
boost::multiprecision::number< boost::multiprecision::backends::gmp_rational, boost::multiprecision::et_on > mpq_rational
The exact rational number type.
Definition mpfr_extensions.hpp:55
Numeric traits for a bertini number type: digit counts, conversions, and companion types.
Definition num_traits.hpp:57
NumErrorT T
The numeric type the thresholds are read at.
Definition tracking.hpp:222
Holds the program parameters with respect to Adaptive Multiple Precision.
Definition config.hpp:214
NumErrorT function_eval_error_bound
Bound on the error of evaluating the functions, divided by the unit roundoff error.
Definition config.hpp:240
NumErrorT coefficient_bound
User-defined bound on the sum of the abs vals of the coeffs for any polynomial in the system (for ada...
Definition config.hpp:215
unsigned int maximum_precision
User-chosed setting for the maximum allowable precision. Paths will die if their precision is request...
Definition config.hpp:244
int safety_digits_2
User-chosen setting for the number of safety digits used during Criterion C.
Definition config.hpp:243
int safety_digits_1
User-chosen setting for the number of safety digits used during Criteria A & B.
Definition config.hpp:242
NumErrorT jacobian_eval_error_bound
Bound on the error of evaluating the Jacobian, divided by the unit roundoff error .
Definition config.hpp:233
unsigned max_num_precision_decreases
The maximum number of times precision can be lowered during tracking of a segment of path.
Definition config.hpp:253
NumErrorT linear_solve_error_bound
Bound on the growth in error from a linear solve.
Definition config.hpp:222
NumErrorT degree_bound
User-set bound on degrees of polynomials in the system - tricky to compute for factored polys,...
Definition config.hpp:216
Settings for a fixed-precision tracker (carries the single working precision in effect).
Definition config.hpp:157
Settings governing the Newton corrector's iteration bounds.
Definition config.hpp:119
unsigned max_num_newton_iterations
The maximum number of Newton iterations per correction. MaxNewtonIts.
Definition config.hpp:120
Settings governing step-size adjustment during tracking.
Definition config.hpp:96
mpq_rational max_step_size
The largest allowed step size. MaxStepSize.
Definition config.hpp:101
unsigned max_num_steps
The maximum number of steps allowed during tracking, counting FAILED steps as well as successful ones...
Definition config.hpp:110
mpq_rational step_size_fail_factor
Factor by which to contract the time step when triggered. StepFailFactor.
Definition config.hpp:105
unsigned consecutive_successful_steps_before_stepsize_increase
What it says. If you can come up with a better name, please suggest it. StepsForIncrease.
Definition config.hpp:107
mpq_rational step_size_success_factor
Factor by which to dilate the time step when triggered. StepSuccessFactor.
Definition config.hpp:104
The thresholds a tracker judges a path against: close enough, and too big.
Definition config.hpp:142
NumErrorT path_truncation_threshold
The tracker abandons a path once the largest coordinate of its dehomogenized point exceeds this....
Definition config.hpp:145
Predictor predictor
The ODE method used to predict the next point along the path. RKF45 – order 4 with an embedded error ...
Definition config.hpp:143
Configs and settings for tracking.