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.12 2000/10/10 21:00:58 peterg +## New code genration +## ## Revision 1.11 1998/11/26 09:18:55 peterg ## Incluse subs.r ## ## Revision 1.10 1998/11/18 13:50:29 peterg ## Removed writeing of EYz matrix @@ -64,11 +67,12 @@ ## Initial revision ## ############################################################### # Create the reduce output code -def2write_r $1 cse +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 @@ -84,10 +88,13 @@ if [ "$solve" = "1" ]; then echo "Creating $1_cse.r (with explicit solution of algebraic equations)" else echo "Creating $1_cse.r" fi + +echo "Creating $1_csex.r" +echo "Creating $1_cseo.r" # Remove the old log file rm -f dae2cse_r.log # Use reduce to accomplish the transformation @@ -270,10 +277,14 @@ OUT "$1_cse.r1"; write "MATRIX MTTEdx(", MTTNx, ",", 1, ")$"; write "MATRIX MTTE(", MTTNx, ",", MTTNx, ")$"; SHUT "$1_cse.r1"; +OUT "$1_csex.r1"; +write "MATRIX MTTEdx(", MTTNx, ",", 1, ")$"; +SHUT "$1_csex.r1"; + OUT "$1_cseo.r1"; write "MATRIX MTTY(", MTTNy, ",", MTTNx, ")$"; SHUT "$1_cseo.r1"; %%Create the _cse.r file @@ -332,10 +343,16 @@ write ";END;"; SHUT "$1_cse.r2"; +OUT "$1_csex.r2"; +write "%File: $1_cse.r"; +in ("$1_csex_write.r"); +write "END;"; +SHUT "$1_csex.r2"; + %Write out the output equations OUT "$1_cseo.r2"; write "%File: $1_cseo.r"; in ("$1_cseo_write.r"); write "END;"; @@ -342,10 +359,11 @@ SHUT "$1_cseo.r2"; quit; EOF 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" awk '{