Index: mttroot/mtt/bin/trans/mtt_m2p ================================================================== --- mttroot/mtt/bin/trans/mtt_m2p +++ mttroot/mtt/bin/trans/mtt_m2p @@ -13,10 +13,13 @@ ############################################################### ## 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 (?????) @@ -103,11 +106,20 @@ # 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);" ;; Index: mttroot/mtt/bin/trans/txt2m ================================================================== --- mttroot/mtt/bin/trans/txt2m +++ mttroot/mtt/bin/trans/txt2m @@ -13,10 +13,13 @@ # %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% # %% 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 @@ -70,10 +73,17 @@ 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. @@ -119,10 +129,11 @@ 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);