Overview
| Comment: | Revises smx generation. |
|---|---|
| Downloads: | Tarball | ZIP archive |
| Timelines: | family | ancestors | descendants | both | origin/master | trunk |
| Files: | files | file ages | folders |
| SHA3-256: |
8ea6df676614bf9f6290ae67132f09da |
| User & Date: | gawthrop@users.sourceforge.net on 1999-02-16 21:43:54.000 |
| Other Links: | branch diff | manifest | tags |
Context
|
1999-02-16
| ||
| 21:44:38 | Revised smx generation check-in: 0d694c4f97 user: gawthrop@users.sourceforge.net tags: origin/master, trunk | |
| 21:43:54 | Revises smx generation. check-in: 8ea6df6766 user: gawthrop@users.sourceforge.net tags: origin/master, trunk | |
| 04:38:22 | Now forces creation of _smx file if METHOD=IMPLICIT in simpar.txt check-in: 0bccebd16d user: gawthrop@users.sourceforge.net tags: origin/master, trunk | |
Changes
Modified mttroot/mtt/bin/trans/mtt_m2p
from [ed924e211c]
to [6d1d7edebe].
| ︙ | |||
11 12 13 14 15 16 17 18 19 20 21 22 23 24 | 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | + + + | # Copyright (c) P.J.Gawthrop 1998 ############################################################### ## Version control history ############################################################### ## $Id$ ## $Log$ ## Revision 1.25 1999/02/16 04:38:09 peterg ## Now forces creation of _smx file if METHOD=IMPLICIT in simpar.txt ## ## Revision 1.24 1998/11/18 16:56:15 peterg ## Now handles comments after IFS ## ## Revision 1.23 1998/11/18 14:38:01 peterg ## Now convert ALL globals to VAR .. the last one isn't repeated now ## ## Revision 1.22 1998/11/17 17:39:45 peterg |
| ︙ | |||
94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 | 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 122 123 124 125 | + + - - - - - + - |
# Set up variables
args=`echo $1 | sed 's/_/ /' | sed 's/\./ /'`
Sys=`echo $args | awk '{print $1}'`
sys=`echo $Sys | awk '{print tolower($1)}'`
rep=`echo $args | awk '{print $2}'`
Sys_rep="$Sys""_""$rep"
Sys_smx="$Sys""_smx"
Sys_smxp="$Sys""_smx.p"
Filename="$Sys""_""$rep.p"
filename="$sys""_""$rep.p"
# Inform user
echo Creating $Filename
# Find system constants
Nx=`grep "MTTNx " <$Sys\_def.r | awk '{print $3}' | sed 's/;//'`
Nu=`grep "MTTNu " <$Sys\_def.r | awk '{print $3}' | sed 's/;//'`
Ny=`grep "MTTNy " <$Sys\_def.r | awk '{print $3}' | sed 's/;//'`
if [ "$rep" = "simpar" ]; then
|
| ︙ | |||
260 261 262 263 264 265 266 267 268 269 | 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 | + - - - - - - - - - - + + + + + + + + + |
for (k=1;k<i;k++) printf(" %s,\n",global[k])
printf("%s : REAL;\n", global[i])
printvar("x",Nx);
printvar("u",Nu);
printvar("y",Ny);
printvar("_t",Nt);
printf("{%s mtt_write.p}\n",inc)
printf("\n{%s sign.p}\n",inc)
printf("{%s mtt_euler.p}\n",inc)
printf("{%s mtt_implicit.p}\n",inc)
|
| ︙ | |||
343 344 345 346 347 348 349 | 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 | - - - + + + + + + + + + + | sed 's/(\(MTT[ijk0-9],MTT[ijk0-9]\))/\[\1\]/g' |\ sed 's/(\(MTT[ijk0-9,]*\))/\[\1\]/g' |\ sed 's/switcha(mttAA,/switcha(/g' |\ sed 's/switch(MTTx,/switch(/g' \ >> $Filename # p2c doesn't like mixed case filenames! |