Index: mttroot/mtt/bin/mtt ================================================================== --- mttroot/mtt/bin/mtt +++ mttroot/mtt/bin/mtt @@ -15,10 +15,14 @@ ############################################################### ## Version control history ############################################################### ## $Header$ ## $Log$ +## Revision 1.325 2001/10/11 03:15:55 geraint +## Fixed make dependencies for c++ simulation code +## - re-simulation no longer required for different output format. +## ## Revision 1.324 2001/10/05 23:39:43 geraint ## Made odes.dat2 .PRECIOUS to prevent deletion when simulation receives ^C. ## ## Revision 1.323 2001/08/08 02:14:59 geraint ## Rationalisation of solver code, beginning with algebraic solvers. @@ -2568,11 +2572,11 @@ ${sys}_cse.r: ${Subsystem}_dae.r ${Subsystem}_dae.r ${Subsystem}_def.r ${Subsystem}_subs.r ifneq ($partition,) echo Doing subsystems mtt_make_subsystems ${sys} cse r endif - dae2cse_r $optimise $Solve ${Subsystem}; tidy ${Subsystem}_cse.r #$1_subs.r + dae2cse_r $fixcc $optimise $Solve ${Subsystem}; tidy ${Subsystem}_cse.r #$1_subs.r $1_csex.r: $1_cse.r touch $1_csex.r $1_cseo.r: $1_cse.r touch $1_cseo.r 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.18 2001/10/05 23:37:32 geraint +## Fixed assignment statement in ae.r when RHS=0. +## ## Revision 1.17 2001/07/27 23:29:10 geraint ## Optimises only when requested (-opt). ## ## Revision 1.16 2001/07/13 04:54:04 geraint ## Branch merge: numerical-algebraic-solution back to main. @@ -107,10 +110,14 @@ while [ -n "`echo $1 | grep '^-'`" ]; do case $1 in -A ) solve=1 solve_msg=' with explicit solution of algebraic equations' ;; + -fixcc ) + fixcc=`echo 'in "'$MTT_LIB'/reduce/fix_c.r";'` + fix_msg='fixing c and cc code'; + ;; -optimise) optimise='-optimise' optimise_msg=' with optimisation' ;; *) echo "$1 is an invalid argument - ignoring" ;; @@ -121,11 +128,11 @@ # Create the reduce output code def2write_r $optimise $1 cse def2write_r $optimise $1 csex # Version without E matrix def2write_r $optimise $1 cseo -echo "Creating $1_cse.r $solve_msg $optimise_msg" +echo "Creating $1_cse.r $solve_msg $optimise_msg $fix_msg" echo "Creating $1_csex.r $optimise_msg" echo "Creating $1_cseo.r $optimise_msg" # Remove the old log file rm -f dae2cse_r.log @@ -140,10 +147,13 @@ in "$MTTPATH/trans/reduce_matrix.r"; OFF Echo; OFF Nat; ON NERO; + +%Fix c code if required +$fixcc in "$1_def.r"; MTTdxs := MTTdX; %Save the symbolic form of dX in "$1_subs.r";