The Conley-Morse Graphs Software
odetimet.h
Go to the documentation of this file.
1/////////////////////////////////////////////////////////////////////////////
2///
3/// @file odetimet.h
4///
5/// A generic method for computing a time-t map for ODEs.
6///
7/// This file defines a generic class which uses the integration routines
8/// of the CAPD library in order to compute a time-t map for ODEs.
9///
10/// @author Pawel Pilarczyk
11///
12/////////////////////////////////////////////////////////////////////////////
13
14// Copyright (C) 1997-2014 by Pawel Pilarczyk.
15//
16// This file is part of my research software package. This is free software:
17// you can redistribute it and/or modify it under the terms of the GNU
18// General Public License as published by the Free Software Foundation,
19// either version 3 of the License, or (at your option) any later version.
20//
21// This software is distributed in the hope that it will be useful,
22// but WITHOUT ANY WARRANTY; without even the implied warranty of
23// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
24// GNU General Public License for more details.
25//
26// You should have received a copy of the GNU General Public License
27// along with this software; see the file "license.txt". If not,
28// please, see <https://www.gnu.org/licenses/>.
29
30// Started on October 18, 2008. Last revision: September 4, 2014.
31
32
33#ifndef _CMGRAPHS_ODETIMET_H_
34#define _CMGRAPHS_ODETIMET_H_
35
36
37// include some standard C++ header files
38#include <string>
39#include <vector>
40#include <iostream>
41#include <algorithm>
42#include <memory>
43
44// include all the necessary header files from the CHomP library
45#include "chomp/system/config.h"
46#include "chomp/system/textfile.h"
47#include "chomp/multiwork/mwdata.h"
48
49// include local header files
50#include "typeintv.h"
51#include "typerect.h"
52#include "maptight.h"
53#include "datavector.h"
54#include "odeintegr.h"
55
56// include all the necessary header files from the CAPD library
57#ifdef _CAPD29_
58#include "capd/vectalg/lib.h"
59#include "capd/dynset/lib.h"
60#include "capd/dynsys/lib.h"
61#include "capd/dynsys/Taylor.hpp"
62#include "capd/dynsys/TaylorHOE.hpp"
63//#include "capd/capdlib.h"
64#else
65//#include "capd/capdlib.h"
66#define CAPD_USER_NAMESPACE capd
67#define CAPD_DEFAULT_DIMENSION spaceDim
68#include "capd/fdcapdlib.h"
69#undef CAPD_USER_NAMESPACE
70#undef CAPD_DEFAULT_DIMENSION
71#endif
72
73
74// --------------------------------------------------
75// ----------------- the time-t map -----------------
76// --------------------------------------------------
77
78/// This class defines a map for the nonlinear density dependent
79/// overcompensatory Leslie population model.
80/// The interpretation of parameters depends on the dimension.
81class MapOdeTimeT: public MapTight
82{
83public:
84 /// The constructor which takes the formula for the ODE
85 /// in the format used in the CAPD library.
86 /// The names of parameters in the formula must be "pa", "pb", etc.
87 /// The order of the Taylor method to use must be given (e.g. 2),
88 /// the integration step size, and the number of steps.
89 /// The total translation in the flow equals step * n.
90 /// Note: The step should be a representable number
91 /// (for example, a multiple of a power of 2, like 3.0/256).
92 MapOdeTimeT (const std::string &formula, int order,
93 double step, int n);
94
95 /// The destructor.
96 ~MapOdeTimeT ();
97
98 /// Sets the parameters to the given intervals defined by their
99 /// left and right coordinates.
100 /// This function actually calls the original function from the
101 /// master class, and also resets the Taylor class iterator.
102 void setParam (const double *left, const double *right, int n);
103
104 /// Computes a rectangular set that is an outer enclosure
105 /// of the image of the given box.
106 void compute (const IntervalVectorType &x,
107 RectSetType &y, int dim,
108 const spcCoord *coord, int subdiv) const;
109
110 /// Sets a bounding box for the area of interest.
111 /// Every time the provided number of itereates is made,
112 /// the iterated set is verified whether it is contained
113 /// in the bounding box. If it is completely outside
114 /// then it is projected to the boundary of the box
115 /// and the iterations are halted.
116 void setBoundingBox (const double *left, const double *right,
117 int dim, int stepsBetweenChecks);
118
119 /// Sets the phase space for an automatic generation
120 /// of bounding boxes.
121 template <class Array1, class Array2>
122 static void setPhaseSpace (const Array1 &offset, const Array2 &width,
123 int dim, int subdivDepth, int stepsBetweenChecks = 2);
124
125 /// Sets the bounding box to the default one, as defined
126 /// when setting the phase space.
127 void setDefaultBoundingBox ();
128
129 /// Adjusts parameters if necessary after a successful computation
130 /// or after an unsuccessful computation of the graph of the map
131 /// at a specific subdivision depth.
132 /// Returns true iff it is necessary to repeat the computation.
133 bool adjust (bool successful, int subdiv);
134
135 /// Gets a single line of information on optimization
136 /// of the computation of the map, so that it can be used
137 /// by maps created for the same and nearby parameter values.
138 std::string getOptInfo () const;
139
140 /// Uses a prevously saved line of information on optimization
141 /// of the computation of the map for the same or nearby
142 /// parameter values. The map object may be fed with several lines
143 /// and should interprete them to set up its optimization parameters.
144 void useOptInfo (const std::string &info);
145
146 /// Saves the internal parameters and other data of the map
147 /// to the mwData structure.
148 void saveInternals (chomp::multiwork::mwData &data) const;
149
150 /// Retrieves the internal paramters and other data of the map
151 /// from the mwData structure.
152 void loadInternals (chomp::multiwork::mwData &data);
153
154 /// Returns an approximation of the currently recommended
155 /// integration time t for the time-t map
156 /// at the given subdivision depth.
157 double getTimeStep (int subdiv) const;
158
159protected:
160 /// A bounding box for the area where the trajectories are computed.
161 /// If an iterated set gets outside the given ranges of coordinates
162 /// then it is projected to the boundary of this box
163 /// and the iterating process is halted.
164 /// The array contains left1, right1, left2, right2, etc.
165 double *boundingBox;
166
167 /// The dimension of the bounding box.
169
170private:
171 /// The interval matrix type.
172 typedef capd::IMatrix IntervalMatrixType;
173
174 /// The type of a map to be used for the Taylor method.
175 typedef capd::IMap IntervalMapType;
176
177#ifdef _CAPD29_
178 /// The Taylor method type.
179 typedef capd::dynsys::TaylorHOE<IntervalMapType> TaylorType;
180// typedef capd::dynsys::Taylor<IntervalMapType> TaylorType;
181// typedef capd::ITaylor TaylorType;
182#else
183 /// The type of fixed step control.
184// typedef capd::dynsys::FixedStepControl<IntervalType> StepControl;
185
186 /// The Taylor method type.
187// typedef capd::dynsys::TaylorHOE<IntervalMapType,StepControl> TaylorType;
188 typedef capd::dynsys::Solver<IntervalMapType> TaylorType;
189// typedef capd::dynsys::SolverHOE<IntervalMapType> TaylorType;
190// typedef capd::ITaylor TaylorType;
191#endif
192
193 /// The formula for the map in the text format used in CAPD.
194 std::string mapFormula;
195
196 /// An object for adjusting ODE integration parameters.
198
199 /// The map object to be used in the Taylor method object.
201
202 /// The default bounding box to be used if no bounding box is set.
203 static std::vector<double> defaultBoundingBox;
204
205 /// The number of steps after which the box should be checked
206 /// if it is still contained in the bounding box.
208
209 /// The default number of steps to check the bounding box.
211
212 /// The copy constructor should not be used.
214
215 /// The assignment operator should not be used.
217
218 /// Verifies if the given point is outside the bounding box
219 /// set with the method "setBoundingBox".
220 /// Returns true if the bounding box was set, its dimension conforms
221 /// to the dimension of the vector, and the point is outside the box
222 /// (weak inequality); in this case the point is projected
223 /// onto the hyperplane containing the corresponding face
224 /// of the bounding box. Otherwise returns false.
225 bool checkOutside (double *x, int dim) const;
226
227 /// A version of the checkOutside procedure for interval vectors.
228 bool checkOutside (IntervalVectorType &v, int dim) const;
229
230 /// Verifies if the given interval vector is completely outside
231 /// the bounding box set with the method "setBoundingBox".
232 /// Returns true if the bounding box was set, its dimension conforms
233 /// to the dimension of the vector, and the interval vector
234 /// is outside the interior of the box; in this case the vector
235 /// is projected onto the hyperplane containing the corresponding
236 /// face of the bounding box. Otherwise returns false.
237 bool checkOutside (double *left, double *right, int dim) const;
238
239 /// Iterates the given Lohner set, using the Taylor method objects.
240 void iterateLohnerSet (RectSetType &lohnerSet,
241 TaylorType &theTaylorMethod, int steps, int dim) const;
242
243 /// The numbers of successful integrations.
244 mutable long integrations;
245
246}; /* class MapOdeTimeT */
247
248// --------------------------------------------------
249
251{
252 // if there is no default bounding box then do nothing
253 if (defaultBoundingBox. empty ())
254 return;
255
256 int dim = defaultBoundingBox. size () / 2;
257 double *left = new double [dim];
258 double *right = new double [dim];
259 std::vector<double>::const_iterator boxIter =
260 defaultBoundingBox. begin ();
261 for (int d = 0; d < dim; ++ d)
262 {
263 left [d] = *(boxIter ++);
264 right [d] = *(boxIter ++);
265 }
266 setBoundingBox (left, right, dim, defaultCheckEvery);
267 delete [] right;
268 delete [] left;
269 return;
270} /* MapOdeTimeT::setDefaultBoundingBox */
271
272inline MapOdeTimeT::MapOdeTimeT (const std::string &formula,
273 int order, double step, int n):
274 boundingBox (0), boundingBoxDim (0),
275 mapFormula (formula), odeIntegrParam (order, step, n),
276 theMap (0), checkEvery (0), integrations (0)
277{
278 // test the interval arithmetic to make sure it workd properly
279 testIntervals ();
280
281 // set the bounding box to the default one if any
283
284#ifdef _CAPD29_
285 // check if the map formula has parameters listed explicitly
286 if (mapFormula. find ("par:") != std::string::npos)
287 {
288 chomp::homology::sout << "WARNING: The phrase "
289 "\"par:\" is not supported in CAPD 2.9.\n";
290 }
291#else
292 // check if the map formula has parameters listed explicitly
293 if (mapFormula. find ("par:") == std::string::npos)
294 {
295 chomp::homology::sout << "WARNING: Couldn't find the phrase "
296 "\"par:\" in the map formula.\n";
297 }
298#endif
299
300 // swich the rounding direction to the neutral one
301 resetRounding ();
302 return;
303} /* MapOdeTimeT::MapOdeTimeT */
304
305inline void MapOdeTimeT::setParam (const double *left, const double *right,
306 int n)
307{
308 // set the new values of parameters
309 MapType::setParam (left, right, n);
310 odeIntegrParam. setParam (left, right, n);
311
312 // delete the previously used Map object (if any)
313 if (theMap)
314 {
315 delete theMap;
316 theMap = 0;
317 }
318
319 // create a new map object
321#ifdef _CAPD29_
322 char paramName [3];
323 paramName [0] = 'p';
324 paramName [2] = '\0';
325#endif
326 for (int i = 0; i < n; ++ i)
327 {
328 IntervalType paramInterval (left [i], right [i]);
329#ifdef _CAPD29_
330 paramName [1] = static_cast<char> ('a' + i);
331 theMap -> setParameter (paramName, paramInterval);
332#else
333 theMap -> setParameter (i, paramInterval);
334#endif
335 }
336
337 // swich the rounding direction to the neutral one
338 resetRounding ();
339 return;
340} /* MapOdeTimeT::setParam */
341
343{
344 using chomp::homology::sbug;
345
346 if (theMap)
347 delete theMap;
348 if (boundingBox)
349 delete [] boundingBox;
350
351 // show the number of integrations for each Taylor method
352 if (integrations)
353 sbug << "OdeTimeT integrations: " << integrations << ".\n";
354
355 // show the final number of steps at each subdivision depth
356/* sbug << "Numbers of steps (from depth " << initialDepth << " up):";
357 for (int subdiv = initialDepth; (subdiv <= finalDepth) &&
358 (subdiv < static_cast<int> (stepsAdd. size ())); ++ subdiv)
359 {
360 sbug << " " << (numberOfSteps + stepsAdd [subdiv]);
361 }
362 sbug << ".\n";
363*/
364 // show the step multipliers
365/* sbug << "Step size multipliers (from depth " <<
366 initialDepth << " up):";
367 for (int subdiv = initialDepth; (subdiv <= finalDepth) &&
368 (subdiv < static_cast<int> (stepMult. size ())); ++ subdiv)
369 {
370 sbug << " " << stepMult [subdiv];
371 }
372 sbug << ".\n";
373*/
374 // output C++ code to put in the map in order to define
375 // the arrays stepsAdd and stepMult
376/* sbug << "C++ code for the map file to re-do the computation:\n";
377 sbug << "\tstepsAddFactor = 0;\n";
378 int stepsAddSize = stepsAdd. size ();
379 if (stepsAddSize)
380 {
381 sbug << "\tconst int N = " << stepsAddSize << ";\n";
382 for (int i = 0; i < stepsAddSize; ++ i)
383 {
384 sbug << (i ? ", " : "\tint add [N] = {") <<
385 stepsAdd [i];
386 }
387 sbug << "};\n";
388 sbug << "\tstepsAdd = std::vector<int> (N);\n";
389 sbug << "\tstd::copy (add, add + N, stepsAdd. begin ());\n";
390 }
391 int stepMultSize = stepMult. size ();
392 if (stepMultSize)
393 {
394 sbug << "\tconst int M = " << stepMultSize << ";\n";
395 int precision = std::cout. precision ();
396 int hiprec = 15;
397 sbug << std::setprecision (hiprec);
398 for (int i = 0; i < stepMultSize; ++ i)
399 {
400 sbug << (i ? ", " : "\tdouble mult [M] = {") <<
401 stepMult [i];
402 }
403 sbug << std::setprecision (precision);
404 sbug << "};\n";
405 sbug << "\tstepMult = std::vector<double> (M);\n";
406 sbug << "\tstd::copy (mult, mult + M, stepMult. begin ());\n";
407 }
408*/
409 // swich the rounding direction to the neutral one
410 resetRounding ();
411 return;
412} /* MapOdeTimeT::~MapOdeTimeT */
413
415 TaylorType &theTaylorMethod, int steps, int dim) const
416{
417 int counter = 0;
418 for (int step = 0; step < steps; ++ step)
419 {
420 // move the set under the flow
421 lohnerSet. move (theTaylorMethod);
422
423 // check if the set went outside the given region
424 if (++ counter >= checkEvery)
425 {
426 IntervalVectorType enclosure (lohnerSet);
427 if (checkOutside (enclosure, dim))
428 break;
429 counter = 0;
430 }
431 }
432
433 return;
434} /* MapOdeTimeT::iterateLohnerSet */
435
437 RectSetType &y, int dim, const spcCoord *coord, int subdiv) const
438{
439 // create the Lohner set
440 IntervalVectorType center (dim);
441 for (int i = 0; i < dim; ++ i)
442 {
443 double middle = (x [i]. leftBound () +
444 x [i]. rightBound ()) / 2;
445 center [i] = IntervalType (middle, middle);
446 }
447 RectSetType y0 (center, x - center);
448
449 // create a new Taylor method object for the integration
450 int order (0);
451 double stepSize (0);
452 int numberOfSteps (0);
453 odeIntegrParam. get (order, stepSize, numberOfSteps, subdiv);
454// StepControl stepCtrl (IntervalType (stepSize, stepSize));
455#ifdef _CAPD29_
456 TaylorType theTaylorMethod (*theMap, order,
457 IntervalType (stepSize, stepSize));
458#else
459 TaylorType theTaylorMethod (*theMap, order);
460 theTaylorMethod. setStep (IntervalType (stepSize, stepSize));
461#endif
462
463 // try running the integration process
464 try
465 {
466 y = y0;
467 iterateLohnerSet (y, theTaylorMethod, numberOfSteps, dim);
468 ++ integrations;
469
470 // swich the rounding direction to the neutral one
471 resetRounding ();
472 return;
473 }
474 catch (const std::exception &e)
475 {
476 // show detailed information about the problem
477 if (false)
478 {
479 using chomp::homology::sbug;
480 sbug << "FAILURE:\n" << e. what () << "\n";
481 }
482 resetRounding ();
483 }
484
485 // show detailed debug information about the wrong box
486 if (false)
487 {
488 using chomp::homology::sbug;
489 sbug << "[Integration failure at subdiv depth " <<
490 subdiv << ".]\n";
491 if (coord)
492 {
493 sbug << "Trouble source cube: [";
494 for (int i = 0; i < dim; ++ i)
495 sbug << (i ? "," : "") << coord [i];
496 sbug << "].\n";
497 sbug << "Real coords: " << x << ".\n";
498 }
499 else
500 {
501 sbug << "Trouble source box: " << x << ".\n";
502 }
503 }
504
505 // swich the rounding direction to the neutral one
506 resetRounding ();
507
508 // throw an error message indicating the failure
509 throw "Unable to integrate the ODE - the set became too large.";
510 return;
511} /* MapOdeTimeT::compute */
512
513inline void MapOdeTimeT::setBoundingBox (const double *left,
514 const double *right, int dim, int stepsBetweenChecks)
515{
516 using chomp::homology::sbug;
517 if (boundingBox)
518 delete [] boundingBox;
519 boundingBoxDim = dim;
520 boundingBox = new double [dim << 1];
521 double *boxPtr (boundingBox);
522 sbug << "* Setting the bounding box for the ODE solver:\n";
523 for (int i = 0; i < dim; ++ i)
524 {
525 sbug << (i ? " x [" : "* [") << left [i] << "," <<
526 right [i] << "]";
527 *(boxPtr ++) = left [i];
528 *(boxPtr ++) = right [i];
529 }
530 sbug << "\n";
531 checkEvery = stepsBetweenChecks;
532 return;
533} /* MapOdeTimeT::setBoundingBox */
534
535template <class Array1, class Array2>
536inline void MapOdeTimeT::setPhaseSpace (const Array1 &offset,
537 const Array2 &width, int dim, int subdivDepth,
538 int stepsBetweenChecks)
539{
540 // do nothing if the provided values seem to be wrong
541 if ((dim <= 0) || (subdivDepth <= 0) ||
542 (subdivDepth >= static_cast<int> (8 * sizeof (int) - 1)))
543 {
544 return;
545 }
546
547 // prepare for setting a new default bounding box
548 defaultBoundingBox. clear ();
549 int intWidth = 1 << subdivDepth;
550
551 // calculate the left and right bounds
552 for (int d = 0; d < dim; ++ d)
553 {
554 double widthFraction = (width [d] / intWidth) * 1.1;
555 double left = offset [d] - widthFraction;
556 double right = offset [d] + width [d] + widthFraction;
557 defaultBoundingBox. push_back (left);
558 defaultBoundingBox. push_back (right);
559 }
560
561 // set the default number of steps between checks
562 defaultCheckEvery = stepsBetweenChecks;
563
564 return;
565} /* MapOdeTimeT::setPhaseSpace */
566
567inline bool MapOdeTimeT::checkOutside (double *x, int dim) const
568{
569 if (!boundingBox || (boundingBoxDim != dim))
570 return false;
571
572 bool outside = false;
573 const double *boxPtr (boundingBox);
574 for (int i = 0; i < dim; ++ i)
575 {
576 if (x [i] <= *boxPtr)
577 {
578 x [i] = *boxPtr;
579 outside = true;
580 }
581 ++ boxPtr;
582 if (x [i] >= *boxPtr)
583 {
584 x [i] = *boxPtr;
585 outside = true;
586 }
587 ++ boxPtr;
588 }
589
590 return outside;
591} /* MapOdeTimeT::checkOutside */
592
593inline bool MapOdeTimeT::checkOutside (double *left, double *right,
594 int dim) const
595{
596 if (!boundingBox || (boundingBoxDim != dim))
597 return false;
598
599 bool outside = false;
600 const double *boxPtr (boundingBox);
601 for (int i = 0; i < dim; ++ i)
602 {
603 if (right [i] <= *boxPtr)
604 {
605 left [i] = right [i] = *boxPtr;
606 outside = true;
607 }
608 ++ boxPtr;
609 if (left [i] >= *boxPtr)
610 {
611 left [i] = right [i] = *boxPtr;
612 outside = true;
613 }
614 ++ boxPtr;
615 }
616
617 return outside;
618} /* MapOdeTimeT::checkOutside */
619
620inline bool MapOdeTimeT::checkOutside (IntervalVectorType &v, int dim) const
621{
622 if (!boundingBox || (boundingBoxDim != dim))
623 return false;
624
625 bool outside = false;
626 const double *boxPtr (boundingBox);
627 for (int i = 0; i < dim; ++ i)
628 {
629 if (v [i]. rightBound () < *boxPtr)
630 {
631 v [i] = *boxPtr;
632 outside = true;
633 }
634 ++ boxPtr;
635 if (v [i]. leftBound () > *boxPtr)
636 {
637 v [i] = *boxPtr;
638 outside = true;
639 }
640 ++ boxPtr;
641 }
642
643 return outside;
644} /* MapOdeTimeT::checkOutside */
645
646inline bool MapOdeTimeT::adjust (bool successful, int subdiv)
647{
648 return odeIntegrParam. adjust (successful, subdiv);
649} /* MapOdeTimeT::adjust */
650
651inline std::string MapOdeTimeT::getOptInfo () const
652{
653 return odeIntegrParam. getInfo ();
654} /* MapOdeTimeT::getOptInfo */
655
656inline void MapOdeTimeT::useOptInfo (const std::string &info)
657{
658 odeIntegrParam. useInfo (info);
659 return;
660} /* MapOdeTimeT::useOptInfo */
661
662inline void MapOdeTimeT::saveInternals (chomp::multiwork::mwData &data) const
663{
664 // save the internals of the parent class object
666
667 // save the information about the map optimization parameters
668 data << odeIntegrParam;
669
670 return;
671} /* MapOdeTimeT::saveInternals */
672
673inline void MapOdeTimeT::loadInternals (chomp::multiwork::mwData &data)
674{
675 // load the internals of the parent class object
677
678 // load the information about the map optimization parameters
679 data >> odeIntegrParam;
680
681 return;
682} /* MapOdeTimeT::loadInternals */
683
684inline double MapOdeTimeT::getTimeStep (int subdiv) const
685{
686 int order (0);
687 double step (0);
688 int n (0);
689 odeIntegrParam. get (order, step, n, subdiv);
690 return (n * step);
691} /* MapOdeTimeT::getTimeStep */
692
693
694#endif // _CMGRAPHS_ODETIMET_H_
695
This class defines a map for the nonlinear density dependent overcompensatory Leslie population model...
Definition: odetimet.h:82
double getTimeStep(int subdiv) const
Returns an approximation of the currently recommended integration time t for the time-t map at the gi...
Definition: odetimet.h:684
~MapOdeTimeT()
The destructor.
Definition: odetimet.h:342
int checkEvery
The number of steps after which the box should be checked if it is still contained in the bounding bo...
Definition: odetimet.h:207
void compute(const IntervalVectorType &x, RectSetType &y, int dim, const spcCoord *coord, int subdiv) const
Computes a rectangular set that is an outer enclosure of the image of the given box.
Definition: odetimet.h:436
void loadInternals(chomp::multiwork::mwData &data)
Retrieves the internal paramters and other data of the map from the mwData structure.
Definition: odetimet.h:673
void iterateLohnerSet(RectSetType &lohnerSet, TaylorType &theTaylorMethod, int steps, int dim) const
Iterates the given Lohner set, using the Taylor method objects.
Definition: odetimet.h:414
void setBoundingBox(const double *left, const double *right, int dim, int stepsBetweenChecks)
Sets a bounding box for the area of interest.
Definition: odetimet.h:513
bool adjust(bool successful, int subdiv)
Adjusts parameters if necessary after a successful computation or after an unsuccessful computation o...
Definition: odetimet.h:646
MapOdeTimeT(const std::string &formula, int order, double step, int n)
The constructor which takes the formula for the ODE in the format used in the CAPD library.
Definition: odetimet.h:272
capd::IMatrix IntervalMatrixType
The interval matrix type.
Definition: odetimet.h:172
int boundingBoxDim
The dimension of the bounding box.
Definition: odetimet.h:168
OdeIntegrParam odeIntegrParam
An object for adjusting ODE integration parameters.
Definition: odetimet.h:197
MapOdeTimeT & operator=(const MapOdeTimeT &)
The assignment operator should not be used.
static void setPhaseSpace(const Array1 &offset, const Array2 &width, int dim, int subdivDepth, int stepsBetweenChecks=2)
Sets the phase space for an automatic generation of bounding boxes.
Definition: odetimet.h:536
static int defaultCheckEvery
The default number of steps to check the bounding box.
Definition: odetimet.h:210
long integrations
The numbers of successful integrations.
Definition: odetimet.h:244
IntervalMapType * theMap
The map object to be used in the Taylor method object.
Definition: odetimet.h:200
std::string mapFormula
The formula for the map in the text format used in CAPD.
Definition: odetimet.h:194
static std::vector< double > defaultBoundingBox
The default bounding box to be used if no bounding box is set.
Definition: odetimet.h:203
void setParam(const double *left, const double *right, int n)
Sets the parameters to the given intervals defined by their left and right coordinates.
Definition: odetimet.h:305
capd::IMap IntervalMapType
The type of a map to be used for the Taylor method.
Definition: odetimet.h:175
MapOdeTimeT(const MapOdeTimeT &)
The copy constructor should not be used.
void saveInternals(chomp::multiwork::mwData &data) const
Saves the internal parameters and other data of the map to the mwData structure.
Definition: odetimet.h:662
std::string getOptInfo() const
Gets a single line of information on optimization of the computation of the map, so that it can be us...
Definition: odetimet.h:651
void useOptInfo(const std::string &info)
Uses a prevously saved line of information on optimization of the computation of the map for the same...
Definition: odetimet.h:656
capd::dynsys::Solver< IntervalMapType > TaylorType
The type of fixed step control.
Definition: odetimet.h:188
double * boundingBox
A bounding box for the area where the trajectories are computed.
Definition: odetimet.h:165
bool checkOutside(double *x, int dim) const
Verifies if the given point is outside the bounding box set with the method "setBoundingBox".
Definition: odetimet.h:567
void setDefaultBoundingBox()
Sets the bounding box to the default one, as defined when setting the phase space.
Definition: odetimet.h:250
This is an abstract class which defines the interface to other classes that describe maps for the use...
Definition: maptight.h:54
virtual void setParam(const double *left, const double *right, int n)
Sets the parameters to the given intervals defined by their left and right coordinates.
Definition: maptype.h:172
void loadInternals(chomp::multiwork::mwData &data)
Retrieves the internal paramters and other data of the map from the mwData structure.
Definition: maptype.h:260
void saveInternals(chomp::multiwork::mwData &data) const
Saves the internal parameters and other data of the map to the mwData structure.
Definition: maptype.h:245
A class whose objects are responsible for adjusting the integration parameters such as step size and ...
Definition: odeintegr.h:62
Data conversion for sending/receiving: std::vectors and hashed sets of any objects.
An abstract tight map type that computes the image of a box in terms of a rectangular set from the CA...
ODE integration parameters: guessing, adjusting, saving.
Data types for interval arithmetic.
void resetRounding()
This function resets rounding switches of the processor and sets rounding to the nearest.
Definition: typeintv.h:65
bool testIntervals(bool throwException=false)
Testing interval arithmetic.
Definition: typeintv.h:82
capd::DInterval IntervalType
The type of an interval (from the CAPD library 2.9/3.0 beta).
Definition: typeintv.h:49
Data type for the rectangular (Lohner-type) set from CAPD.
capd::C0HORect2Set RectSetType
The type of the rectangular set to use.
Definition: typerect.h:57
capd::IVector IntervalVectorType
The interval vector type for creating the rectangular set by means of its center + box.
Definition: typerect.h:63
int spcCoord
The type of coordinates of cubes in the phase space.
Definition: typespace.h:50