Overview
Comment:Replaced float by double.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | origin/master | trunk
Files: files | file ages | folders
SHA3-256: 922f4990859837f83a2af1fea030e49c622b01a9ecc8092a17d5d1151fc30f1d
User & Date: gawthrop@users.sourceforge.net on 1997-05-01 13:51:37
Other Links: branch diff | manifest | tags
Context
1997-05-03
13:58:35
Implicit integration for sm representation added. check-in: 855cdeb3cd user: gawthrop@users.sourceforge.net tags: origin/master, trunk
1997-05-01
13:51:37
Replaced float by double. check-in: 922f499085 user: gawthrop@users.sourceforge.net tags: origin/master, trunk
13:44:19
Changed double to float. check-in: 2ed0780548 user: gawthrop@users.sourceforge.net tags: origin/master, trunk
Changes

Modified mttroot/mtt/bin/trans/ode2odes_r2c from [6b09ae24e2] to [217ccfe04f].

16
17
18
19
20
21
22



23
24
25
26
27
28
29
# Copyright (c) P.J.Gawthrop 1997.

###############################################################
## Version control history
###############################################################
## $Id$
## $Log$



# Revision 1.3  1997/05/01  11:15:33  peterg
# Back under RCS
#
# Revision 1.2  1997/03/20  14:36:56  peterg
# Includes the sympar.h file
#
## Revision 1.1  1997/01/21 22:54:54  peterg







>
>
>







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# Copyright (c) P.J.Gawthrop 1997.

###############################################################
## Version control history
###############################################################
## $Id$
## $Log$
# Revision 1.4  1997/05/01  13:43:44  peterg
# Changed double to float.
#
# Revision 1.3  1997/05/01  11:15:33  peterg
# Back under RCS
#
# Revision 1.2  1997/03/20  14:36:56  peterg
# Includes the sympar.h file
#
## Revision 1.1  1997/01/21 22:54:54  peterg
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
write "#include ""$1_odes.h"" "$

%External (global) variable list
write "#include ""$1_sympar.h"" "$


write "/* Declare standard arrays */"$
write "float y[", MTTNy+1, "]; /* $1_ode output */"$
write "float dx[", MTTNx+1, "]; /* $1_ode state derivative */"$ 
write "float x[", MTTNx+1, "]; /* $1_ode state */"$ 
write "float u[", MTTNu+1, "]; /* $1_ode input */"$


write "/* Files */ "$
write "  FILE *fopen(), *fps, *fpso;"$

write "main()"$
write "  "$
write "{"$



write "/* Counters etc*/ "$
write "  float time;"$
write "  float dt;"$
write "  int i;"$
write "  int k;"$

write "/*functions */ "$
write "  extern  $1_numpar();"$

%Open the output files







|
|
|
|












|
|







78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
write "#include ""$1_odes.h"" "$

%External (global) variable list
write "#include ""$1_sympar.h"" "$


write "/* Declare standard arrays */"$
write "double y[", MTTNy+1, "]; /* $1_ode output */"$
write "double dx[", MTTNx+1, "]; /* $1_ode state derivative */"$ 
write "double x[", MTTNx+1, "]; /* $1_ode state */"$ 
write "double u[", MTTNu+1, "]; /* $1_ode input */"$


write "/* Files */ "$
write "  FILE *fopen(), *fps, *fpso;"$

write "main()"$
write "  "$
write "{"$



write "/* Counters etc*/ "$
write "  double time;"$
write "  double dt;"$
write "  int i;"$
write "  int k;"$

write "/*functions */ "$
write "  extern  $1_numpar();"$

%Open the output files

Modified mttroot/mtt/bin/trans/ode_r2c from [272e66ff00] to [3aa29e9779].

16
17
18
19
20
21
22



23
24
25
26
27
28
29
# Copyright (c) P.J.Gawthrop 1997.

###############################################################
## Version control history
###############################################################
## $Id$
## $Log$



# Revision 1.3  1997/03/20  14:51:11  peterg
# Includes the sympar.c file.
#
# Revision 1.2  1997/01/21  22:57:17  peterg
# Various bug fixes.
#
## Revision 1.1  1997/01/21 10:52:23  peterg







>
>
>







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# Copyright (c) P.J.Gawthrop 1997.

###############################################################
## Version control history
###############################################################
## $Id$
## $Log$
# Revision 1.4  1997/05/01  13:44:19  peterg
# Changed double to float.
#
# Revision 1.3  1997/03/20  14:51:11  peterg
# Includes the sympar.c file.
#
# Revision 1.2  1997/01/21  22:57:17  peterg
# Various bug fixes.
#
## Revision 1.1  1997/01/21 10:52:23  peterg
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118

write "void $1_ode()"$

write "  "$
write "{"$

write "/* Declare standard arrays */"$
write "  extern float y[", MTTNy+1, "]; /* $1_ode output */"$
write "  extern float dx[", MTTNx+1, "]; /* $1_ode state derivative */"$ 
write "  extern float x[", MTTNx+1, "]; /* $1_ode state */"$ 
write "  extern float u[", MTTNu+1, "]; /* $1_ode input */"$

%Declare the dummy variables t0--t9
write "/* Dummy variable list */ "$
write "  float t0;"$
FOR i := 1:9 DO
BEGIN
  write "  float t", i, ";"$
END$

%Declarations$
write "/* State variable list */ "$
FOR i := 1:MTTNx DO
BEGIN
  write "  float mttx", i, ";"$
END$

write "/* Input variable list */ "$
FOR i := 1:MTTNu DO
BEGIN
  write "  float mttu", i, ";"$
END$

write "/* Counter */ "$
write "  int i;"$

write "/* Parameter  list */ "$
write "#include ", """$1_sympar.c"""$







|
|
|
|



|


|






|





|







84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121

write "void $1_ode()"$

write "  "$
write "{"$

write "/* Declare standard arrays */"$
write "  extern double y[", MTTNy+1, "]; /* $1_ode output */"$
write "  extern double dx[", MTTNx+1, "]; /* $1_ode state derivative */"$ 
write "  extern double x[", MTTNx+1, "]; /* $1_ode state */"$ 
write "  extern double u[", MTTNu+1, "]; /* $1_ode input */"$

%Declare the dummy variables t0--t9
write "/* Dummy variable list */ "$
write "  double t0;"$
FOR i := 1:9 DO
BEGIN
  write "  double t", i, ";"$
END$

%Declarations$
write "/* State variable list */ "$
FOR i := 1:MTTNx DO
BEGIN
  write "  double mttx", i, ";"$
END$

write "/* Input variable list */ "$
FOR i := 1:MTTNu DO
BEGIN
  write "  double mttu", i, ";"$
END$

write "/* Counter */ "$
write "  int i;"$

write "/* Parameter  list */ "$
write "#include ", """$1_sympar.c"""$

Modified mttroot/mtt/bin/trans/sympar_txt2h from [50f9cbfb3f] to [c515c1bf34].

11
12
13
14
15
16
17



18
19
20
21
22
23
24
# Copyright (c) P.J.Gawthrop, 1997.

###############################################################
## Version control history
###############################################################
## $Id$
## $Log$



# Revision 1.2  1997/03/20  15:14:25  peterg
# Lower case conversion.
#
# Revision 1.1  1997/03/20  14:52:41  peterg
# Initial revision
#
###############################################################







>
>
>







11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# Copyright (c) P.J.Gawthrop, 1997.

###############################################################
## Version control history
###############################################################
## $Id$
## $Log$
# Revision 1.3  1997/05/01  13:42:43  peterg
# Chaged double to float
#
# Revision 1.2  1997/03/20  15:14:25  peterg
# Lower case conversion.
#
# Revision 1.1  1997/03/20  14:52:41  peterg
# Initial revision
#
###############################################################
35
36
37
38
39
40
41
42
43
44
45
46
47
echo "Symbolic parameter file ($1_sympar.h)" >> $1_sympar.h
echo "Generated by MTT at `date`"  >> $1_sympar.h
echo '*/' >> $1_sympar.h
echo  >> $1_sympar.h


#Write out the variables in c format.
awk '{i++; print "float", tolower($1) ";"}' $1_sympar.txt  >> $1_sympar.h

# Now invoke the standard error handling.
# mtt_error mtt_error.txt









|





38
39
40
41
42
43
44
45
46
47
48
49
50
echo "Symbolic parameter file ($1_sympar.h)" >> $1_sympar.h
echo "Generated by MTT at `date`"  >> $1_sympar.h
echo '*/' >> $1_sympar.h
echo  >> $1_sympar.h


#Write out the variables in c format.
awk '{i++; print "double", tolower($1) ";"}' $1_sympar.txt  >> $1_sympar.h

# Now invoke the standard error handling.
# mtt_error mtt_error.txt



MTT: Model Transformation Tools
GitHub | SourceHut | Sourceforge | Fossil RSS ]