PaGMO  1.1.5
taylor_fixedthrust.h
1 #ifndef TAYLOR_FIXEDTHRUST_H
2 #define TAYLOR_FIXEDTHRUST_H
3 
4 /***********************************************************************
5  *
6  * Code generated by the TAYLOR translator.
7  */
8 
9 typedef double MY_FLOAT;
10 
11 #include<math.h>
12 #include<stdio.h>
13 #include<stdlib.h>
14 #include<string.h>
15 /*
16  * MY_FLOAT is the data type to be used in computing derivatives.
17  * It may be 'float', 'double' or user defined private data types
18  * like 'doubledouble', 'complex' etc.
19  */
20 
21 /* for double or doubledouble, don't need to initialize */
22 #define InitMyFloat(r)
23 #define ClearMyFloat(r)
24 
25 /* assign b to a */
26 #define AssignMyFloat(a, b) {(a)=(b);}
27 
28 /* create a MY_FLOAT from a, assigne to r. a is an integer or a float */
29 #define MakeMyFloatA(r,a) (r=(double)(a))
30 
31 /* create a MY_FLOAT from string, a is an integer or a float, s is its string representation */
32 #define MakeMyFloatC(r,s,a) (r=(double)(a))
33 
34 /* create a MY_FLOAT from a, assign to r and return r */
35 #define MakeMyFloatB(r,a) (r=(double)(a),r)
36 
37 /* addition r=a+b */
38 #define AddMyFloatA(r,a,b) (r=(a)+(b))
39 
40 /* substraction r=a-b */
41 #define SubstractMyFloatA(r,a,b) (r=(a)-(b))
42 
43 /* multiplication r=a*b */
44 #define MultiplyMyFloatA(r,a,b) (r=(a)*(b))
45 
46 /* division r=a/b */
47 #define DivideMyFloatA(r,a,b) (r=(a)/(b))
48 
49 /* division by an integer r=a/i */
50 #define DivideMyFloatByInt(r,a,i) (r=(a)/(double)(i))
51 /* negation r=-a*/
52 #define NegateMyFloatA(r,a) (r= -(a))
53 
54 /* square root r=sqrt(a) */
55 #define sqrtMyFloatA(r,a) (r=sqrt(a))
56 /* exponentiation r=a^b */
57 #define ExponentiateMyFloatA(r,a,b) (r=pow((a),(b)))
58 /* exponentiation r=a^b, b is an integer */
59 #define ExponentiateMyFloatIA(r,a,b) (r=pow((a),(double)(b)))
60 /* sin(a) r=sin(a) */
61 #define sinMyFloatA(r,a) (r=sin((a)))
62 /* cos(a) r=cos(a) */
63 #define cosMyFloatA(r,a) (r=cos((a)))
64 /* tan(a) r=tan(a) */
65 #define tanMyFloatA(r,a) (r=tan((a)))
66 /* atan(a) r=atan(a) */
67 #define atanMyFloatA(r,a) (r=atan((a)))
68 /* exp(a) r=exp(a) */
69 #define expMyFloatA(r,a) (r=exp((a)))
70 /* log(a) r=log(a) */
71 #define logMyFloatA(r,a) (r=log((a)))
72 /* sinh(a) r=sinh(a) */
73 #define sinhMyFloatA(r,a) (r=sinh(a))
74 /* cosh(a) r=cosh(a) */
75 #define coshMyFloatA(r,a) (r=cosh(a))
76 /* tanh(a) r=tanh(a) */
77 #define tanhMyFloatA(r,a) (r=tanh(a))
78 
79 
80 /* log10(a) r=log10(a) */
81 #define log10MyFloatA(r,a) (r=log10((a)))
82 /* fabs(a) r=fabs(a) */
83 #define fabsMyFloatA(r,a) (r=fabs(a))
84 
85 /* convert to int */
86 #define MyFloatToInt(ir,fa) (ir=(int)(fa))
87 /* convert to double */
88 #define MyFloatToDouble(ir,fa) (ir=(double)(fa))
89 
90 
91 /* boolean operation */
92 #define MyFloatA_GE_B(a,b) ((a)>=(b))
93 #define MyFloatA_GT_B(a,b) ((a)> (b))
94 #define MyFloatA_LE_B(a,b) ((a)<=(b))
95 #define MyFloatA_LT_B(a,b) ((a)< (b))
96 #define MyFloatA_EQ_B(a,b) ((a)==(b))
97 #define MyFloatA_NEQ_B(a,b) ((a)!=(b))
98 
99 
100 /************************************************************************/
101 
102 #endif // TAYLOR_FIXEDTHRUST_H
103 
104 MY_FLOAT **taylor_coefficients_kepler_info(MY_FLOAT t, MY_FLOAT *x, int order);
105 
106 MY_FLOAT **taylor_coefficients_kepler_infoA(MY_FLOAT t, MY_FLOAT *x, int order, int reuse_last_computation);
107 
108 int taylor_step_kepler_info(MY_FLOAT *ti, MY_FLOAT *x, int dir, int step_ctl,
109  double log10abserr, double log10relerr,
110  MY_FLOAT *endtime, MY_FLOAT *ht, int *order);
111 
112 int taylor_fixedthrust(double y[6], double t0, double tf,double thrust[3], double abstol, double reltol);
113 
114 /************************************************************************/
115 
116