Changeset 7201 in project


Ignore:
Timestamp:
12/27/07 03:16:49 (12 years ago)
Author:
Ivan Raikov
Message:

Renamed ode-pr and ode-hhsp to ode-bpr and ode-hhsbp, respectively.

Location:
ode/trunk
Files:
1 added
2 deleted
7 edited

Legend:

Unmodified
Added
Removed
  • ode/trunk/examples/carelli05.scm

    r7038 r7201  
    1414(require-extension ode-lambda)
    1515(require-extension ode-hhs)
    16 (require-extension ode-hhsp)
     16(require-extension ode-hhsbp)
    1717
    1818(define I_stim_seed (random-mtzig:init))
  • ode/trunk/examples/poirazi03.scm

    r7038 r7201  
    1212(require-extension ode-lambda)
    1313(require-extension ode-hhs)
    14 (require-extension ode-hhsp)
     14(require-extension ode-hhsbp)
    1515
    1616
  • ode/trunk/extensions/ode-ctranslator.scm

    r7104 r7201  
    357357
    358358(define-macro (compile . explist)
    359   `(run (csc ,@explist) ) )
     359  `(run (csc ,@explist)))
    360360   
    361361(define (ode:c-compile-and-load system stmts)
     
    367367         (csystem-name  (string-append "c_" system-name))
    368368         (csystem-so    (dynld-name csystem-name)))
    369     (let ((fnames        (ode:c-translator system stmts)))
    370       (compile -v3 -c -static -o ,system-o ,system-scm
     369    (let ((fnames  (ode:c-translator system stmts)))
     370      (compile -O2 -v3 -c -static -o ,system-o ,system-scm
    371371               -prelude ,(string-append "\"(declare (unit " system-name  "))\""))
    372       (compile -v3 -s -o ,csystem-so -uses ,system-name  ,system-o ,@(map cdr fnames))
     372      (compile -O2 -v3 -s -o ,csystem-so -uses ,system-name  ,system-o ,@(map cdr fnames))
    373373      (load csystem-so))))
  • ode/trunk/ode-macros.scm

    r7038 r7201  
    3535
    3636(define-macro (with-ode-system name declarations . body)
    37   (if (not (symbol? name)) (ode:error 'with-ode-system "system name must be a symbol"))
    38   `(let* ((ode   (make-ode))
    39           (,name ((ode 'system) ',name)))
    40      (eval-ode-system-decls ode ',name ,name (list ,@(map (lambda (x) (list 'quasiquote x)) declarations)))
    41      ,@body))
     37  (match declarations
     38         (('odecore ode-params sysdecls)
     39          `(let* ((ode   (apply make-ode ,ode-params))
     40                  (,name ((ode 'system) ',name)))
     41             (eval-ode-system-decls ode ',name ,name (list ,@(map (lambda (x) (list 'quasiquote x)) sysdecls)))
     42             ,@body))
     43        (else
     44          `(let* ((ode   (make-ode))
     45                  (,name ((ode 'system) ',name)))
     46             (eval-ode-system-decls ode ',name ,name (list ,@(map (lambda (x) (list 'quasiquote x)) declarations)))
     47             ,@body))))
    4248                   
    4349
  • ode/trunk/ode.meta

    r7104 r7201  
    2222 ; declaration altogether:
    2323
    24  (needs eggdoc args datatype vector-lib environments digraph graph-bfs graph-cycles mathh srfi-40 interp1d stack)
     24 (needs eggdoc args datatype vector-lib environments digraph graph-bfs graph-cycles mathh srfi-40 interp1d random-mtzig stack)
    2525
    2626 (eggdoc "ode-eggdoc.scm")
  • ode/trunk/ode.scm

    r7104 r7201  
    131131
    132132
    133 (define (make-ode)
     133(define (make-ode . alst)
     134
     135  (define (lookup-field k lst . rest)
     136    (let-optionals rest ((default #f))
     137      (let ((v (alist-ref k lst)))
     138        (if v (first v) default))))
     139
    134140  ;; minimum step size
    135   (define  hmin 1e-16)
     141  (define  hmin (lookup-field 'hmin alst 1e-16))
    136142
    137143  ;; maximum step size
    138   (define  hmax 1.0) 
     144  (define  hmax (lookup-field 'hmax alst 1.0))
    139145
    140146  ;; error tolerance
    141   (define  relmin  1e-11)
    142   (define  relmax  1e-8)
    143   (define  absmin  1e-36)
    144   (define  absmax  1e-8)
     147  (define  relmin  (lookup-field 'relmin alst 1e-11))
     148  (define  relmax  (lookup-field 'relmax alst 1e-8))
     149  (define  absmin  (lookup-field 'absmin alst 1e-36))
     150  (define  absmax  (lookup-field 'absmax alst 1e-8))
    145151
    146152  ;; maximum and minimum ratios by which to increase to decrease the
     
    155161  (define svec-deriv-idx     3)
    156162
    157   (define (lookup-field k lst . rest)
    158     (let-optionals rest ((default #f))
    159       (let ((v (alist-ref k lst)))
    160         (if v (first v) default))))
    161163
    162164  (define (add-primitives! env)
     
    885887                                                                                       prtitem))))))))
    886888                                                    prtitems)
    887                                                    (fprintf out "\n"))))
    888                                          (set! prti (fx+ 1 prti)))))
     889                                                   (fprintf out "\n")
     890                                                   (set! prti (if prtfrom (fx+ 1 prtfrom) 1))))
     891                                         (set! prti (fx+ 1 prti))))))
    889892
    890893                        ((debug)      (list (cons 'eval-poset (vector->list eval-poset))
  • ode/trunk/ode.setup

    r7104 r7201  
    2424
    2525  ; Assoc list with properties for your extension:
    26   `((version 2.5)
     26  `((version 2.6)
    2727    (documentation "ode.html")
    2828    ,@(if has-exports? `((exports "ode.exports")) (list)) ))
     
    4747         abm4.scm)
    4848
    49 (compile -d2 -O -s -o ,(dynld-name "ode-pr")
    50          ,@(if has-exports? '(-check-imports -emit-exports ode-pr.exports) '())
    51          extensions/ode-pr.scm)
    52 
    53 (compile -d2 -O -s -o ,(dynld-name "ode-hhsp")
    54          ,@(if has-exports? '(-check-imports -emit-exports ode-hhsp.exports) '())
    55          extensions/ode-hhsp.scm)
     49(compile -d2 -O -s -o ,(dynld-name "ode-bpr")
     50         ,@(if has-exports? '(-check-imports -emit-exports ode-bpr.exports) '())
     51         extensions/ode-bpr.scm)
     52
     53(compile -d2 -O -s -o ,(dynld-name "ode-hhsbp")
     54         ,@(if has-exports? '(-check-imports -emit-exports ode-hhsbp.exports) '())
     55         extensions/ode-hhsbp.scm)
    5656
    5757(compile -d2 -O -s -o ,(dynld-name "ode-waveform")
     
    8787
    8888  ; Assoc list with properties for your extension:
    89   `((version 2.5)
     89  `((version 2.6)
    9090    ,@(if has-exports? `((exports "ode-ctranslator.exports")) (list)) ))
    9191
     
    9494
    9595  ; Name of your extension:
    96   'ode-hhsp
    97 
    98   ; Files to install for your extension:
    99   `(,(dynld-name "ode-hhsp") 
    100     ,@(if has-exports? '("ode-hhsp.exports") (list)) )
    101 
    102   ; Assoc list with properties for your extension:
    103   `((version 2.5)
    104     ,@(if has-exports? `((exports "ode-hhsp.exports")) (list)) ))
    105 
    106 
    107 (install-extension
    108 
    109   ; Name of your extension:
    110   'ode-pr
    111 
    112   ; Files to install for your extension:
    113   `(,(dynld-name "ode-pr") 
    114     ,@(if has-exports? '("ode-pr.exports") (list)) )
    115 
    116   ; Assoc list with properties for your extension:
    117   `((version 2.5)
    118     ,@(if has-exports? `((exports "ode-pr.exports")) (list)) ))
     96  'ode-hhsbp
     97
     98  ; Files to install for your extension:
     99  `(,(dynld-name "ode-hhsbp") 
     100    ,@(if has-exports? '("ode-hhsbp.exports") (list)) )
     101
     102  ; Assoc list with properties for your extension:
     103  `((version 2.6)
     104    ,@(if has-exports? `((exports "ode-hhsbp.exports")) (list)) ))
     105
     106
     107(install-extension
     108
     109  ; Name of your extension:
     110  'ode-bpr
     111
     112  ; Files to install for your extension:
     113  `(,(dynld-name "ode-bpr") 
     114    ,@(if has-exports? '("ode-bpr.exports") (list)) )
     115
     116  ; Assoc list with properties for your extension:
     117  `((version 2.6)
     118    ,@(if has-exports? `((exports "ode-bpr.exports")) (list)) ))
    119119
    120120
     
    130130
    131131  ; Assoc list with properties for your extension:
    132   `((version 2.5)
     132  `((version 2.6)
    133133    ,@(if has-exports? `((exports "ode-waveform.exports")) (list)) ))
    134134
     
    144144
    145145  ; Assoc list with properties for your extension:
    146   `((version 2.5)
     146  `((version 2.6)
    147147    ,@(if has-exports? `((exports "ode-hhs.exports")) (list)) ))
    148148
     
    158158
    159159  ; Assoc list with properties for your extension:
    160   `((version 2.5)
     160  `((version 2.6)
    161161    ,@(if has-exports? `((exports "ode-lambda.exports")) (list)) ))
    162162
     
    172172
    173173  ; Assoc list with properties for your extension:
    174   `((version 2.5)
     174  `((version 2.6)
    175175    ,@(if has-exports? `((exports "ode-rate.exports")) (list)) ))
    176176
     
    186186
    187187  ; Assoc list with properties for your extension:
    188   `((version 2.5)
     188  `((version 2.6)
    189189    ,@(if has-exports? `((exports "ode-abm4.exports")) (list)) ))
    190190
     
    200200
    201201  ; Assoc list with properties for your extension:
    202   `((version 2.5)
     202  `((version 2.6)
    203203    ,@(if has-exports? `((exports "ode-rkf45.exports")) (list)) ))
    204204
     
    213213    ,@(if has-exports? '("ode-euler.exports") (list)) )
    214214  ; Assoc list with properties for your extension:
    215   `((version 2.5)
     215  `((version 2.6)
    216216    ,@(if has-exports? `((exports "ode-euler.exports")) (list)) ))
    217217
     
    221221 'ode-macros
    222222 `("ode-macros.scm" )
    223  `((version 2.5)
     223 `((version 2.6)
    224224   (syntax)
    225225   (require-at-runtime ode)))
Note: See TracChangeset for help on using the changeset viewer.