1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
#! /bin/sh
######################################
##### Model Transformation Tools #####
######################################
###############################################################
## Version control history
###############################################################
## $Id$
## $Log$
## Revision 1.85 2003/06/25 12:46:06 gawthrop
## Input only changed one per print interval
## No effect if stepfactor=1
## Fixes bug when _input.m is compiled using -stdin option
## and stepfactor>1
##
## Revision 1.84 2003/04/17 20:57:29 geraint
|
>
>
>
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
#! /bin/sh
######################################
##### Model Transformation Tools #####
######################################
###############################################################
## Version control history
###############################################################
## $Id$
## $Log$
## Revision 1.86 2004/08/29 00:19:49 geraint
## Defaults to noAlgebraicSolver.
##
## Revision 1.85 2003/06/25 12:46:06 gawthrop
## Input only changed one per print interval
## No effect if stepfactor=1
## Fixes bug when _input.m is compiled using -stdin option
## and stepfactor>1
##
## Revision 1.84 2003/04/17 20:57:29 geraint
|
345
346
347
348
349
350
351
352
353
354
355
356
357
358
|
fi
if [ -n "$4" ]; then
algebraic_solver=$4
else
algebraic_solver="noAlgebraicSolver"
fi
insertor=\<\< # help emacs sh-mode handle C++ lines
echo Creating $filename with $method integration method
# Find system constants
Nx=`mtt_getsize $sys x` # States
|
>
>
>
>
>
>
|
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
|
fi
if [ -n "$4" ]; then
algebraic_solver=$4
else
algebraic_solver="noAlgebraicSolver"
fi
if [ -n "$5" ]; then
sorted_equations=$5
else
sorted_equations="no"
fi
insertor=\<\< # help emacs sh-mode handle C++ lines
echo Creating $filename with $method integration method
# Find system constants
Nx=`mtt_getsize $sys x` # States
|
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
|
algorithm="mtt_implicit(x,dx,AA,AAx,ddt,$Nx,open_switches)"
;;
"dassl")
ode=ode
odeo=odeo
algorithm="mtt_dassl(x,u,t,par,dx,ddt,MTTNX,MTTNYZ,open_switches)"
;;
"sorted_euler")
algorithm="mtt_euler(x,dx,ddt,$Nx,open_switches)"
;;
"euler" | "rk4" | *)
ode=ode
odeo=odeo
algorithm="mtt_euler(x,dx,ddt,$Nx,open_switches)"
;;
esac
make_m()
{
#lang_header $1 ode2odes m 'x,par,simpar' '[Y,X,t]' > $filename
|
|
>
>
>
>
>
>
>
>
>
>
|
|
>
>
|
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
|
algorithm="mtt_implicit(x,dx,AA,AAx,ddt,$Nx,open_switches)"
;;
"dassl")
ode=ode
odeo=odeo
algorithm="mtt_dassl(x,u,t,par,dx,ddt,MTTNX,MTTNYZ,open_switches)"
;;
"sorted_euler") # used by sese generated from seqn
algorithm="mtt_euler(x,dx,ddt,$Nx,open_switches)"
;;
"euler" | "rk4" | *)
case "$sorted_equations" in
"make") # used by sese generated by make
ode=sesx
odeo=sesy
;;
"seqn") # shouldn't be here unless mtt has changed
ode=sese
odeo=sese
;;
"no" | *)
ode=ode
odeo=odeo
;;
esac
algorithm="mtt_euler(x,dx,ddt,$Nx,open_switches)"
;;
esac
make_m()
{
#lang_header $1 ode2odes m 'x,par,simpar' '[Y,X,t]' > $filename
|