Differences From Artifact [133da0004f]:

To Artifact [6e105aaf4f]:


12
13
14
15
16
17
18



19
20
21
22
23
24
25
# Copyright (c) P.J.Gawthrop 1991, 1994, 1995, 1996, 1998

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



## Revision 1.9  1999/10/26 23:47:58  peterg
## Now does cse.m file
##
## Revision 1.8  1999/07/26 06:07:19  peterg
## Reinstated removal of the odeo.p file
##
## Revision 1.7  1999/03/16 00:38:06  peterg







>
>
>







12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# Copyright (c) P.J.Gawthrop 1991, 1994, 1995, 1996, 1998

###############################################################
## Version control history
###############################################################
## $Id$
## $Log$
## Revision 1.10  1999/10/27 07:38:30  peterg
## Now does cse version -- but not needed now exept for Euler integration
##
## Revision 1.9  1999/10/26 23:47:58  peterg
## Now does cse.m file
##
## Revision 1.8  1999/07/26 06:07:19  peterg
## Reinstated removal of the odeo.p file
##
## Revision 1.7  1999/03/16 00:38:06  peterg
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
    lang_matrix();
    GENTRANSHUT "mtt_ode";
    
END;;

EOF
  else
## cse represnetation
echo doing cse
$SYMBOLIC  > mtt_r2m.log <<EOF
  %Set up the code generator
  in"mtt_setreduce.r";
      
  % The body of the cse function
    GENTRANOUT "mtt_ode";
    mtt_matrix := MTTEdX$
    mtt_matrix_n := MTTNx$
    mtt_matrix_m := 1$
    lang_matrix();
    GENTRANSHUT "mtt_ode";
    
    GENTRANOUT "mtt_odee";
    mtt_matrix := MTTE$
    mtt_matrix_n := MTTNx$
    mtt_matrix_m := MTTNx$
    lang_matrix();
    GENTRANSHUT "mtt_odee";

END;;

EOF

  fi

if [ "$rep" = "cse" ]; then
touch mtt_odee
  touch mtt_odee
fi

sed 's/mtt_matrix/mttdx/' <mtt_ode  >> $1_$2.p
sed 's/mtt_matrix/mtte/'  <mtt_odee >> $1_$2.p
sed 's/mtt_matrix/mtty/'  <mtt_odeo >> $1_$2o.p

if [ "$rep" = "cse" ]; then
cat <<EOF >>$1_$2.p
   ## Solve E dx = dxe;;
   mtt_solve(mttdx,mttE,mttdx,$Nx);; 
EOF
fi

rm -f mtt_odeo mtt_ode mtt_odee

# Convert from Pascal syntax to Octave syntax 
 mtt_p2m<$1_$2o.p > $1_$2o.m 

 rm -f    $1_odeo.p
fi
  







|













|
|
|
|
|
|







|
|
<
|


|


<
<
<
<
<
<

|







143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178

179
180
181
182
183
184






185
186
187
188
189
190
191
192
193
    lang_matrix();
    GENTRANSHUT "mtt_ode";
    
END;;

EOF
  else
## cse representation
echo doing cse
$SYMBOLIC  > mtt_r2m.log <<EOF
  %Set up the code generator
  in"mtt_setreduce.r";
      
  % The body of the cse function
    GENTRANOUT "mtt_ode";
    mtt_matrix := MTTEdX$
    mtt_matrix_n := MTTNx$
    mtt_matrix_m := 1$
    lang_matrix();
    GENTRANSHUT "mtt_ode";
    
%    GENTRANOUT "mtt_odee";
%    mtt_matrix := MTTE$
%    mtt_matrix_n := MTTNx$
%    mtt_matrix_m := MTTNx$
%    lang_matrix();
%    GENTRANSHUT "mtt_odee";

END;;

EOF

  fi

#if [ "$rep" = "ode" ]; then
#  touch mtt_odee

#fi

sed 's/mtt_matrix/mttdx/' <mtt_ode  >> $1_$2.p
#sed 's/mtt_matrix/mtte/'  <mtt_odee >> $1_$2.p
sed 's/mtt_matrix/mtty/'  <mtt_odeo >> $1_$2o.p








rm -f mtt_odeo mtt_ode #mtt_odee

# Convert from Pascal syntax to Octave syntax 
 mtt_p2m<$1_$2o.p > $1_$2o.m 

 rm -f    $1_odeo.p
fi
  

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