Index: mttroot/mtt/bin/trans/make_ode2odes ================================================================== --- mttroot/mtt/bin/trans/make_ode2odes +++ mttroot/mtt/bin/trans/make_ode2odes @@ -7,10 +7,14 @@ ############################################################### ## Version control history ############################################################### ## $Id$ ## $Log$ +## Revision 1.70 2002/04/28 18:41:27 geraint +## Fixed [ 549658 ] awk should be gawk. +## Replaced calls to awk with call to gawk. +## ## Revision 1.69 2002/04/17 13:46:58 geraint ## #include for -oct as well as -cc. ## ## Revision 1.68 2002/04/15 10:54:31 geraint ## Statically declare outputs and initialise to zero. @@ -418,11 +422,10 @@ cat < $filename #include #include #include -#include #include #ifndef STANDALONE #include #endif @@ -455,11 +458,11 @@ ColumnVector &par); extern ColumnVector F${sys}_numpar ( void); -extern Octave_map F${sys}_simpar ( +extern ColumnVector F${sys}_simpar ( void); extern ColumnVector F${sys}_state ( ColumnVector &par); @@ -613,27 +616,19 @@ f = feval ("${sys}_numpar", args, 1); return f(0).${vector_value} (); #endif } -inline Octave_map +inline ColumnVector mtt_simpar (void) { #ifdef STANDALONE return F${sys}_simpar (); #else - static octave_value_list args; - static Octave_map f; - f["first"] = feval ("${sys}_simpar", args, 1)(0).map_value ()["first"]; - f["dt"] = feval ("${sys}_simpar", args, 1)(0).map_value ()["dt"]; - f["last"] = feval ("${sys}_simpar", args, 1)(0).map_value ()["last"]; - f["stepfactor"] = feval ("${sys}_simpar", args, 1)(0).map_value ()["stepfactor"]; - f["wmin"] = feval ("${sys}_simpar", args, 1)(0).map_value ()["wmin"]; - f["wmax"] = feval ("${sys}_simpar", args, 1)(0).map_value ()["wmax"]; - f["wsteps"] = feval ("${sys}_simpar", args, 1)(0).map_value ()["wsteps"]; - f["input"] = feval ("${sys}_simpar", args, 1)(0).map_value ()["input"]; - return (f); + static octave_value_list args, f; + f = feval ("${sys}_simpar", args, 1); + return f(0).${vector_value} (); #endif } inline ColumnVector mtt_state (ColumnVector &par) @@ -1018,11 +1013,11 @@ { static octave_value_list retval; #endif // STANDALONE static ColumnVector x0; static ColumnVector par; - static Octave_map simpar; + static ColumnVector simpar; static double first = 0.0, dt = 0.0, last = 0.0, @@ -1030,39 +1025,39 @@ #ifndef STANDALONE int nargin = args.length (); switch (nargin) { case 3: - first = args (2).map_value ()["first"].double_value (); - dt = args (2).map_value ()["dt"].double_value (); - last = args (2).map_value ()["last"].double_value (); - stepfactor = args (2).map_value ()["stepfactor"].double_value (); + first = args (2).${vector_value} ()(0); + dt = args (2).${vector_value} ()(1); + last = args (2).${vector_value} ()(2); + stepfactor = args (2).${vector_value} ()(3); par = args (1).${vector_value} (); x0 = args (0).${vector_value} (); break; case 2: - first = mtt_simpar ()["first"].double_value (); - dt = mtt_simpar ()["dt"].double_value (); - last = mtt_simpar ()["last"].double_value (); - stepfactor = mtt_simpar ()["stepfactor"].double_value (); + first = mtt_simpar ()(0); + dt = mtt_simpar ()(1); + last = mtt_simpar ()(2); + stepfactor = mtt_simpar ()(3); par = args (1).${vector_value} (); x0 = args (0).${vector_value} (); break; case 1: - first = mtt_simpar ()["first"].double_value (); - dt = mtt_simpar ()["dt"].double_value (); - last = mtt_simpar ()["last"].double_value (); - stepfactor = mtt_simpar ()["stepfactor"].double_value (); + first = mtt_simpar ()(0); + dt = mtt_simpar ()(1); + last = mtt_simpar ()(2); + stepfactor = mtt_simpar ()(3); par = mtt_numpar (); x0 = args (0).${vector_value} (); break; case 0: #endif // ! STANDALONE - first = mtt_simpar ()["first"].double_value (); - dt = mtt_simpar ()["dt"].double_value (); - last = mtt_simpar ()["last"].double_value (); - stepfactor = mtt_simpar ()["stepfactor"].double_value (); + first = mtt_simpar ()(0); + dt = mtt_simpar ()(1); + last = mtt_simpar ()(2); + stepfactor = mtt_simpar ()(3); par = mtt_numpar (); x0 = mtt_state (par); #ifndef STANDALONE break; default: Index: mttroot/mtt/bin/trans/mtt_header ================================================================== --- mttroot/mtt/bin/trans/mtt_header +++ mttroot/mtt/bin/trans/mtt_header @@ -10,10 +10,14 @@ ############################################################### ## Version control history ############################################################### ## $Id$ ## $Log$ +## Revision 1.42 2002/04/28 18:41:27 geraint +## Fixed [ 549658 ] awk should be gawk. +## Replaced calls to awk with call to gawk. +## ## Revision 1.41 2002/04/23 17:46:05 gawthrop ## _sim.m now returns time as third argument ## ## Revision 1.40 2002/04/17 16:23:59 geraint ## Partial fix for [ 545113 ] zeros missing in c++. @@ -641,12 +645,12 @@ mttpar) arg_type="ColumnVector" arg_init="(MTTNPAR,0.0)" ;; mttsimpar_map) - arg_type="Octave_map" - arg_init=""; + arg_type="ColumnVector" + arg_init="(8,0.0)"; ;; mttu) arg_type="ColumnVector" arg_init="(MTTNU,0.0)" ;; @@ -725,11 +729,10 @@ write_DLD_header() { cat < -#include #include #include #include "useful-functions.hh" #include "${system}_cr.h" #include "${system}_def.h" @@ -815,11 +818,10 @@ get_arg_specific_stuff ${output} cat < -#include #include "useful-functions.hh" #include "${system}_cr.h" #include "${system}_def.h" #include "${system}_sympar.h" Index: mttroot/mtt/cc/mtt_m2cc.sh ================================================================== --- mttroot/mtt/cc/mtt_m2cc.sh +++ mttroot/mtt/cc/mtt_m2cc.sh @@ -35,18 +35,18 @@ rep_footer () { (case ${REP} in simpar) cat <