ode-initval/control.ss
(define-struct ode-control-type
               (name
                make
                init
                h-adjust))

;(define-struct ode-control
;               (control-type
;                state))
(define-values (struct:ode-control
                ode-control-constructor
                ode-control?
                ode-control-field-ref
                set-ode-control-field!)
  (make-struct-type 'ode-control #f 2 0))

(define (make-ode-control ode-control-type)
  (ode-control-constructor
   ode-control-type
   ((ode-control-type-make ode-control-type))))

(define ode-control-control-type
  (make-struct-field-accessor ode-control-field-ref 0 'control-type))
(define set-ode-control-control-type!
  (make-struct-field-mutator set-ode-control-field! 0 'control-type))

(define ode-control-state
  (make-struct-field-accessor ode-control-field-ref 1 'state))
(define set-ode-control-state!
  (make-struct-field-mutator set-ode-control-field! 1 'state))

(define (ode-control-init control eps-abs eps-rel a_y a_dydt)
  ((ode-control-type-init (ode-control-control-type control))
   (ode-control-state control) eps-abs eps-rel a_y a_dydt))

(define (ode-control-name control)
  (ode-control-type-name (ode-control-control-type control)))

(define (ode-control-h-adjust control step y0 y-err dydt h)
  ((ode-control-type-h-adjust (ode-control-control-type control))
   (ode-control-state control) (ode-step-dimension step)
   ((ode-step-type-order (ode-step-step-type step))
    (ode-step-state step))
   y0 y-err dydt h))