Index: mttroot/mtt/bin/trans/dae2cse_r ================================================================== --- mttroot/mtt/bin/trans/dae2cse_r +++ mttroot/mtt/bin/trans/dae2cse_r @@ -13,10 +13,13 @@ ############################################################### ## Version control history ############################################################### ## $Id$ ## $Log$ +## Revision 1.14 2000/12/28 12:24:35 peterg +## *** empty log message *** +## ## Revision 1.13 2000/10/11 08:52:46 peterg ## Creates csex (cse with dxe only) rep. ## ## Revision 1.12 2000/10/10 21:00:58 peterg ## New code genration @@ -69,15 +72,10 @@ ## Revision 1.1 1996/08/15 16:47:02 peter ## Initial revision ## ############################################################### -# Create the reduce output code -def2write_r $1 cse -def2write_r $1 csex # Version without E matrix -def2write_r $1 cseo - #Explicit solution option solve=0 while [ -n "`echo $1 | grep '^-'`" ]; do case $1 in -A ) @@ -85,10 +83,15 @@ *) echo "$1 is an invalid argument - ignoring" ;; esac shift done + +# Create the reduce output code +def2write_r $1 cse +def2write_r $1 csex # Version without E matrix +def2write_r $1 cseo if [ "$solve" = "1" ]; then echo "Creating $1_cse.r (with explicit solution of algebraic equations)" else echo "Creating $1_cse.r" @@ -377,21 +380,26 @@ cat $1_cse.r1 $1_cse.r2 > $1_cse.r cat $1_csex.r1 $1_csex.r2 > $1_csex.r cat $1_cseo.r1 $1_cseo.r2 > $1_cseo.r if [ "$solve" = "1" ]; then - echo "Setting MTTNyz=0 in $1_def.r and removing other $1_def files" + echo "Setting MTTNyz=0 in $1_def.r and updating other $1_def files" awk '{ if ($1=="MTTNyz") print "MTTNyz := 0;" else print $0 }' $1_def.r > mtt_junk # Make sure it preserves the time stamp!! # and remove dependent reps touch -r $1_def.r mtt_junk - rm $1_def.* mv mtt_junk $1_def.r + for file in `ls $1_def.*`; do + if [ $file != $1_def.r ]; then + ext=`echo $file|awk -F\. '{print $2}'` + mtt -q $1 def $ext + fi + done fi # Now invoke the standard error handling. mtt_error_r dae2cse_r.log