10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
|
# Copyright (c) P.J.Gawthrop, 1991, 1994.
###############################################################
## Version control history
###############################################################
## $Id$
## $Log$
## Revision 1.1.4.1 2001/05/04 04:07:24 geraint
## Numerical solution of algebraic equations.
## sys_ae.cc written for unsolved inputs.
## Solution of equations using hybrd from MINPACK (as used by Octave fsolve).
##
## Revision 1.1 2000/12/28 12:21:31 peterg
## Put under RCS
##
## Revision 1.2 1997/01/06 21:17:10 peterg
## Removed: OFF Exp; OFF GCD;
##
## Revision 1.1 1996/08/25 10:05:45 peter
## Initial revision
##
###############################################################
# Create the reduce output code
def2write_r $1 ode
def2write_r $1 odeo
#Inform user
echo Creating $1_ode.r
echo Creating $1_odeo.r
# Remove the old log file
rm -f cse2ode_r.log
# Use reduce to accomplish the transformation
$SYMBOLIC >cse2ode_r.log << EOF
|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
|
|
|
|
|
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
|
# Copyright (c) P.J.Gawthrop, 1991, 1994.
###############################################################
## Version control history
###############################################################
## $Id$
## $Log$
## Revision 1.2 2001/07/13 04:54:04 geraint
## Branch merge: numerical-algebraic-solution back to main.
##
## Revision 1.1.4.1 2001/05/04 04:07:24 geraint
## Numerical solution of algebraic equations.
## sys_ae.cc written for unsolved inputs.
## Solution of equations using hybrd from MINPACK (as used by Octave fsolve).
##
## Revision 1.1 2000/12/28 12:21:31 peterg
## Put under RCS
##
## Revision 1.2 1997/01/06 21:17:10 peterg
## Removed: OFF Exp; OFF GCD;
##
## Revision 1.1 1996/08/25 10:05:45 peter
## Initial revision
##
###############################################################
optimise=''; optimise_msg=''
while [ -n "`echo $1 | grep '^-'`" ]; do
case $1 in
-optimise)
optimise='-optimise'
optimise_msg=' with optimisation' ;;
*)
echo "$1 is an invalid argument - ignoring" ;;
esac
shift
done
# Create the reduce output code
def2write_r $optimise $1 ode
def2write_r $optimise $1 odeo
#Inform user
echo Creating $1_ode.r $optimise_msg
echo Creating $1_odeo.r $optimise_msg
# Remove the old log file
rm -f cse2ode_r.log
# Use reduce to accomplish the transformation
$SYMBOLIC >cse2ode_r.log << EOF
|