01: /*
02:  *  dverk.h
03:  *  Dverk-Test
04:  *
05:  *  Created by ashley on 15/05/2009.
06:  *  Copyright 2009 __MyCompanyName__. All rights reserved.
07:  *
08:  */
09: 
10: /*
11: c***********************************************************************
12: c                                                                      *
13: c  summary of the components of the communications vector              *
14: c                                                                      *
15: c     prescribed at the option       determined by the program         *
16: c           of the user                                                *
17: c                                                                      *
18: c                                    c(10) rreb(rel roundoff err bnd)  *
19: c     c(1) error control indicator   c(11) dwarf (very small mach no)  *
20: c     c(2) floor value               c(12) weighted norm y             *
21: c     c(3) hmin specification        c(13) hmin                        *
22: c     c(4) hstart specification      c(14) hmag                        *
23: c     c(5) scale specification       c(15) scale                       *
24: c     c(6) hmax specification        c(16) hmax                        *
25: c     c(7) max no of fcn evals       c(17) xtrial                      *
26: c     c(8) interrupt no 1            c(18) htrial                      *
27: c     c(9) interrupt no 2            c(19) est                         *
28: c                                    c(20) previous xend               *
29: c                                    c(21) flag for xend               *
30: c                                    c(22) no of successful steps      *
31: c                                    c(23) no of successive failures   *
32: c                                    c(24) no of fcn evals             *
33: c                                                                      *
34: c  if c(1) = 4 or 5, c(31), c(32), ... c(n+30) are floor values        */
35: 
36: struct _communication {
37:         int n;
38:         
39:         control *ctrl;
40:         void (*solver)();
41:         
42: //       prescribed at the option of the user
43:         int errorcontrol;                                                                                                       //      c[0]    error control indicator
44:         double floorvalue;                                                                                                      //      c[1]    floor value
45:         double hminspec;                                                                                                        //      c[2]    hmin specification
46:         double hstart;                                                                                                          //      c[3]    hstart specification
47:         double scalespec;                                                                                                       //      c[4]    scale specification
48:         double hmaxspec;                                                                                                        //      c[5]    hmax specification
49:         int maxevals;                                                                                                           //      c[6]    max no of fcn evals
50:         int interrupt1;                                                                                                         //      c[7]    interrupt no 1
51:         int interrupt2;                                                                                                         //      c[8]    interrupt no 2
52: 
53: //      determined by the programme
54:         double rreb;                                                                                                            //      c[9]    rreb(rel roundoff err bnd)
55:         double dwarf;                                                                                                           //      c[10]   dwarf (very small mach no)
56:         double weightednormy;                                                                                           //      c[11]   weighted norm y
57:         double hmin;                                                                                                            //      c[12]   hmin
58:         double hmag;                                                                                                            //      c[13]   hmag
59:         double scale;                                                                                                           //      c[14]   scale
60:         double hmax;                                                                                                            //      c[15]   hmax
61:         double xtrial;                                                                                                          //      c[16]   xtrial
62:         double htrial;                                                                                                          //      c[17]   htrial
63:         double est;                                                                                                                     //      c[18]   est
64:         double prevxend;                                                                                                        //      c[19]   previous xend
65:         int xendflag;                                                                                                           //      c[20]   flag for xend
66:         int nsuccessful;                                                                                                        //      c[21]   no of successful steps
67:         int nfailed;                                                                                                            //      c[22]   no of successive failures
68:         int nevaluations;                                                                                                       //      c[23]   no of fcn evals
69:         double *floorvalues;                                                                                            //      c[30..n+29]     if c(1) = 4 or 5, c(31), c(32), ... c(n+30) are floor values
70: };
71: 
72: typedef struct _communication dverkcomm;
73: 
74: dverkcomm *makeDverkCommunication(control *c);
75: void freeDverkCommunication(dverkcomm *comm);
76: 
77: //void discrete(dverkcomm *c, void (*fcn)(), double x, double *y, double xend, double tol, int *ind, int nw, void *fdata);
78: //void dverk(dverkcomm *c, void (*fcn)(), double x, double *y, double xend, double tol, int *ind, int nw, void *fdata);