Index: mttroot/mtt/bin/trans/ode2odes_r2c ================================================================== --- mttroot/mtt/bin/trans/ode2odes_r2c +++ mttroot/mtt/bin/trans/ode2odes_r2c @@ -18,10 +18,13 @@ ############################################################### ## Version control history ############################################################### ## $Id$ ## $Log$ +# Revision 1.10 1997/05/10 10:05:15 peterg +# Put _input in inner loop in front of call to _ode +# ## Revision 1.9 1997/05/10 09:54:34 peterg ## Moved _input call to after the inner integration loop. ## ## Revision 1.8 1997/05/10 08:12:23 peterg ## Put second argument into _input. @@ -129,11 +132,10 @@ write "/* Counters etc*/ "$ write " double time;"$ -write " int itime;"$ write " double dt;"$ write " int i;"$ write " int k;"$ write "/*functions */ "$ @@ -149,21 +151,20 @@ write " $1_numpar();"$ %Initialise main (Euler) integration loop write "/* Initialise main (Euler) integration loop */"$ write " time = 0.0;"$ -write " itime = 0;"$ write " dt = DT/STEPFACTOR;"$ write " for (i=1; i<=MTTNX; i++)"$ write " x[i] = 0.0;"$ %Set up system inputs write "/* Set up system inputs */"$ write " for (i=1; i<=", MTTNu, "; i++)"$ write " u[i] = 1.0;"$ -write " $1_input(0.0,0);"$ +write " $1_input(0.0);"$ write " fprintf(fps, ""function data = ", "$1_odes \n"");"$ write " fprintf(fps, ""data = [\n"");"$ write " fprintf(fpso, ""function data = ", "$1_odeso \n"");"$ write " fprintf(fpso, ""data = [\n"");"$ @@ -198,17 +199,16 @@ write " {"$ write " for (i=1; i<=MTTNX; i++)"$ write " x[i] = x[i] + dx[i]*dt;"$ write " /* Set up system inputs */"$ -write " $1_input(time,itime);"$ +write " $1_input(time);"$ write " $1_ode();"$ write " }"$ write " time = time + DT;"$ -write " itime = itime + 1;"$ write " }"$ %Write to files %Write to output to file write "/* Write to output file */"$