Index: mttroot/mtt/bin/trans/ese2rdae_r ================================================================== --- mttroot/mtt/bin/trans/ese2rdae_r +++ mttroot/mtt/bin/trans/ese2rdae_r @@ -12,10 +12,14 @@ ############################################################### ## Version control history ############################################################### ## $Id$ ## $Log$ +## Revision 1.14 2002/08/30 15:39:04 geraint +## Read fix_c.r before ese.r and explicitly overload ** operator with pow(). +## These changes are required for the Codemist version of Reduce. +## ## Revision 1.13 2002/06/28 10:13:40 geraint ## Includes fix_c.r in ese2rdae and def2write_r to eliminate occurrances of x**y. ## ## Revision 1.12.2.2 2002/06/05 17:28:00 geraint ## Cosmetic change. @@ -125,10 +129,14 @@ ;; -partition ) partition=yes; blurb='with partitioning'; ;; + -sort ) + sort=sort; + blurb1='using sorted equations'; + ;; *) echo "$1 is an invalid argument - ignoring"; exit ;; esac shift @@ -148,20 +156,26 @@ defname=$topname"_def.r" crname=$topname"_cr.r" subsname=$topname"_subs.r" paramname=$topname"_params.r" daename=$sysname"_rdae.r" -esename=$sysname"_ese.r" + +if [ -n "$sort" ]; then + esename=$sysname"_sese.r" +else + esename=$sysname"_ese.r" +fi + logname=ese2rdae.log if [ -n "${load_cr}" ]; then load_cr_comm="in \"${crname}\";" load_subs_comm="in \"${subsname}\";" fi # Inform user -echo Creating $daename $blurb $blurb2 $blurb3 +echo Creating $daename $blurb $blurb1 $blurb2 $blurb3 # Remove the old log file rm -f $logname # Use symbolic algebra to accomplish the transformation