Overview
| Comment: | Now forces creation of _smx file if METHOD=IMPLICIT in simpar.txt |
|---|---|
| Downloads: | Tarball | ZIP archive |
| Timelines: | family | ancestors | descendants | both | origin/master | trunk |
| Files: | files | file ages | folders |
| SHA3-256: |
0bccebd16d38f996088138b87f745275 |
| User & Date: | gawthrop@users.sourceforge.net on 1999-02-16 04:38:22.000 |
| Other Links: | branch diff | manifest | tags |
Context
|
1999-02-16
| ||
| 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 | |
| 04:14:53 | Small change to modeline generation check-in: 9e95903a9e user: gawthrop@users.sourceforge.net tags: origin/master, trunk | |
Changes
Modified mttroot/mtt/bin/trans/mtt_m2p
from [7d83123166]
to [ed924e211c].
| ︙ | ︙ | |||
11 12 13 14 15 16 17 18 19 20 21 22 23 24 | # Copyright (c) P.J.Gawthrop 1998 ############################################################### ## Version control history ############################################################### ## $Id$ ## $Log$ ## 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 ## Put _smx include at end of list (?????) ## ## Revision 1.21 1998/11/17 17:26:11 peterg | > > > | 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.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 ## Put _smx include at end of list (?????) ## ## Revision 1.21 1998/11/17 17:26:11 peterg |
| ︙ | ︙ | |||
101 102 103 104 105 106 107 |
# 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/;//'`
| | > > > > > > > > > | 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 |
# 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
# Check if implicit method and generate smx.p if so
implicit=`grep -i METHOD $Sys_rep.txt | grep -i -c IMPLICIT`
if [ "$implicit" = "1" ]; then
mtt -q $Sys smx p
fi
fi
# Heading
(case $rep in
state)
echo "PROCEDURE $Sys_rep(VAR mttx : StateVector);"
;;
input)
echo "PROCEDURE $Sys_rep(VAR mttu : InputVector;"
|
| ︙ | ︙ |
Modified mttroot/mtt/bin/trans/txt2m
from [6644a7d903]
to [6b56e63c82].
| ︙ | ︙ | |||
11 12 13 14 15 16 17 18 19 20 21 22 23 24 | # %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% # %% Version control history # %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% # %% $Id$ # %% $Log$ # %% Revision 1.12 1998/08/14 10:47:31 peterg # %% Put ImplicitS sub before Implicit!! # %% # %% Revision 1.11 1998/08/14 10:43:44 peterg # %% Added ImplicitS - sparse integration # %% # %% Revision 1.10 1998/08/11 13:27:51 peterg | > > > | 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | # %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% # %% Version control history # %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% # %% $Id$ # %% $Log$ # %% Revision 1.13 1998/08/31 11:43:37 peterg # %% Now lower cases globals in numpar files # %% # %% Revision 1.12 1998/08/14 10:47:31 peterg # %% Put ImplicitS sub before Implicit!! # %% # %% Revision 1.11 1998/08/14 10:43:44 peterg # %% Added ImplicitS - sparse integration # %% # %% Revision 1.10 1998/08/11 13:27:51 peterg |
| ︙ | ︙ | |||
68 69 70 71 72 73 74 75 76 77 78 79 80 81 |
name='mttx';
arg='';
fi
if [ "$representation" = "input" ]; then
name='mttu';
arg='(mttx,mttt)'
fi
# Inform user
echo Creating $1_$2.m
#Create the $2 file complete with headers.
case $representation in
simpar)
| > > > > > > > | 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 |
name='mttx';
arg='';
fi
if [ "$representation" = "input" ]; then
name='mttu';
arg='(mttx,mttt)'
fi
if [ "$representation" = "simpar" ]; then
# Check if implicit method and generate xmx.m if
implicit=`grep -i METHOD $1_simpar.txt | grep -i -c IMPLICIT`
if [ "$implicit" = "1" ]; then
mtt -q $1 smx m
fi
fi
# Inform user
echo Creating $1_$2.m
#Create the $2 file complete with headers.
case $representation in
simpar)
|
| ︙ | ︙ | |||
117 118 119 120 121 122 123 124 125 126 127 128 129 130 |
sub(/^LAST/, "mttLAST", LHS);
sub(/^DT/, "mttDT", LHS);
sub(/^STEPFACTOR/, "mttSTEPFACTOR", LHS);
sub(/^METHOD/, "mttMETHOD", LHS);
sub(/^WMIN/, "mttWMIN", LHS);
sub(/^WMAX/, "mttWMAX", LHS);
sub(/^WSTEPS/, "mttWSTEPS", LHS);
LHS = tolower(LHS);
RHS = tolower(RHS);
sub(/["]*euler["]*/, 1, RHS);
sub(/["]*implicit["]*/, 2, RHS);
statement = sprintf("%s= %s",LHS,RHS);
if ( (match(statement,";")==0)&&\
((match(statement,"if ")==0))&&\
| > | 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 |
sub(/^LAST/, "mttLAST", LHS);
sub(/^DT/, "mttDT", LHS);
sub(/^STEPFACTOR/, "mttSTEPFACTOR", LHS);
sub(/^METHOD/, "mttMETHOD", LHS);
sub(/^WMIN/, "mttWMIN", LHS);
sub(/^WMAX/, "mttWMAX", LHS);
sub(/^WSTEPS/, "mttWSTEPS", LHS);
sub(/^INPUT/, "mttinput", LHS);
LHS = tolower(LHS);
RHS = tolower(RHS);
sub(/["]*euler["]*/, 1, RHS);
sub(/["]*implicit["]*/, 2, RHS);
statement = sprintf("%s= %s",LHS,RHS);
if ( (match(statement,";")==0)&&\
((match(statement,"if ")==0))&&\
|
| ︙ | ︙ |