Index: mttroot/mtt/bin/trans/dae2cse_r ================================================================== --- mttroot/mtt/bin/trans/dae2cse_r +++ mttroot/mtt/bin/trans/dae2cse_r @@ -13,10 +13,15 @@ ############################################################### ## Version control history ############################################################### ## $Id$ ## $Log$ +## Revision 1.15.2.1 2001/05/04 04:07:24 geraint +## Numerical solution of algebraic equations. +## sys_ae.cc written for unsolved inputs. +## Solution of equations using hybrd from MINPACK (as used by Octave fsolve). +## ## Revision 1.15 2001/03/19 02:28:52 geraint ## Branch merge: merging-ode2odes-exe back to MAIN. ## ## Revision 1.14.2.1 2001/03/19 00:29:08 geraint ## Parse switches (-A) before calling def2write_r. @@ -290,31 +295,37 @@ IF (MTTNyz>0) THEN % not $solve (or perhaps solution failed?) BEGIN OUT "$1_ae.r"; WRITE "MATRIX MTTyz(",MTTNyz,",1)"; - WRITE "%file $1_ae.r"; + WRITE "%File: $1_ae.r"; FOR i := 1:MTTNyz DO WRITE "MTTyz(",i,",1) := ",MTTyz(i,1); WRITE ";END;"; SHUT "$1_ae.r"; END; % if MTTNyz>0 (and !$solve) % Create the matrix declarations OUT "$1_cse.r1"; -write "MATRIX MTTEdx(", MTTNx, ",", 1, ")$"; -write "MATRIX MTTE(", MTTNx, ",", MTTNx, ")$"; +write "%"; +IF (MTTNx > 0) THEN +BEGIN + write "MATRIX MTTEdx(", MTTNx, ",", 1, ")$"; + write "MATRIX MTTE(", MTTNx, ",", MTTNx, ")$"; +END; SHUT "$1_cse.r1"; OUT "$1_csex.r1"; -write "MATRIX MTTEdx(", MTTNx, ",", 1, ")$"; +write "%File:$1_csex.r1"; +IF (MTTNx > 0) THEN + write "MATRIX MTTEdx(", MTTNx, ",", 1, ")$"; SHUT "$1_csex.r1"; IF MTTNy>0 THEN BEGIN OUT "$1_cseo.r1"; - write "MATRIX MTTY(", MTTNy, ",", MTTNx, ")$"; + write "MATRIX MTTY(", MTTNy, ",", 1, ")$"; SHUT "$1_cseo.r1"; END; %%Create the _cse.r file OUT "$1_cse.r2";