The sources of the following examples can be found in the examples/integrate
directory of the CAPD package.
Integration of an ordinary differential equation
{
cout.precision(12);
try{
IMap vectorField(
"par:a,b;var:x,y,z;fun:-(y+z),x+b*y,b+z*(x-a);");
vectorField.setParameter(
"a",
interval(57.)/10.);
vectorField.setParameter(
"b",
interval(2.)/10.);
solver.setAbsoluteTolerance(1e-10);
solver.setRelativeTolerance(1e-10);
c[0] = 0.;
c[1] = -8.3809417428298;
c[2] = 0.029590060630665;
cout << "\ninitial set: " << c;
cout <<
"\ndiam(initial set): " <<
diam(c) << endl;
cout << "\n\nafter time=" << T << " the image is: " << result;
cout <<
"\ndiam(image): " <<
diam(result) << endl << endl;
}catch(exception& e)
{
cout << "\n\nException caught!\n" << e.what() << endl << endl;
}
}
This class uses representation of subset of R^n inherited from template parameter.
Definition: C0HOSet.h:39
Definition: OdeSolver.h:40
Definition of template class Interval.
Definition: Interval.h:83
This class is used to represent a map .
Definition: Map.h:125
TimeMap class provides methods for transport of sets (or points) by a given flow over some time inter...
Definition: TimeMap.h:34
int main()
Definition: integrate.cpp:21
Interval diam(const Interval &ix)
Definition: Interval.h:816
Definition: ApplicationDesc.h:23
intervals::DoubleInterval interval
Definition: DoubleInterval.h:36
Integration of ODE along with a variational equations
{
cout.precision(12);
try{
IMap vectorField(
"par:a,b;var:x,y,z;fun:-(y+z),x+b*y,b+z*(x-a);");
vectorField.setParameter(
"a",
interval(57.)/10.);
vectorField.setParameter(
"b",
interval(2.)/10.);
c[0] = 0.;
c[1] = -8.3809417428298;
c[2] = 0.029590060630665;
cout << "\ninitial set: " << c;
cout <<
"\ndiam(initial set): " <<
diam(c) << endl;
IVector result = timeMap(T,s,monodromyMatrix);
cout << "\n\nafter time=" << T << " the image is: " << result;
cout <<
"\ndiam(image): " <<
diam(result);
cout << "\n\nmonodromyMatrix:\n" << monodromyMatrix;
cout <<
"\n\ndiam(monodromyMatrix): " <<
diam(monodromyMatrix) << endl << endl;
}catch(exception& e)
{
cout << "\n\nException caught!\n" << e.what() << endl << endl;
}
}
The C1 set is represented as doubleton: x + C*r0 + B*r;.
Definition: C1DoubletonSet.h:43
int main()
Definition: integrateVariationalEquation.cpp:21