Index: mttroot/mtt/bin/trans/make_ode2odes ================================================================== --- mttroot/mtt/bin/trans/make_ode2odes +++ mttroot/mtt/bin/trans/make_ode2odes @@ -7,10 +7,13 @@ ############################################################### ## Version control history ############################################################### ## $Id$ ## $Log$ +## Revision 1.27 1999/11/15 22:47:53 peterg +## Generates method-specific code. +## ## Revision 1.26 1999/10/20 01:31:43 peterg ## *** empty log message *** ## ## Revision 1.25 1999/08/29 06:55:26 peterg ## Removed [MTTu] = zero_input($Nu); # Zero the input @@ -127,15 +130,10 @@ [MTTu] = zero_input($Nu); # Zero the input [MTTx] = $1_state; # Read in initial state - -[MTTy] = $1_$odeo(MTTx,MTTu,MTTt); # Evaluate initial output -[MTTu] = $1_input(MTTt,MTTx,MTTy); # Evaluate initial input -mtt_write(MTTt,MTTx,MTTy,$Nx,$Ny); # And write them - #[mttAA] = zero_matrix($Nx); # Zero the A matrix #[mttAAx] = zero_vector($Nx); # Zero the AAx vector #if $Nx>0 # [MTTx] = $1_switch(MTTx); # Switches @@ -150,10 +148,13 @@ fi cat << EOF >> $1_ode2odes.m for MTTit = 1:MTTilast #Integration loop + [MTTy] = $1_$odeo(MTTx,MTTu,MTTt); # Output + [MTTu] = $1_input(MTTt,MTTx,MTTy); # Input + mtt_write(MTTt,MTTx,MTTy,$Nx,$Ny); # Write it out if $Nx>0 # Dont if no states EOF if [ "$method" = "euler" ]; then @@ -184,15 +185,12 @@ cat << EOF >> $1_ode2odes.m else # NX is 0 - no states MTTt = MTTt + mttdt; endif; # $Nx>0 - [MTTy] = $1_$odeo(MTTx,MTTu,MTTt); # Output - [MTTu] = $1_input(MTTt,MTTx,MTTy); # Input - mtt_write(MTTt,MTTx,MTTy,$Nx,$Ny); # Write it out endfor; # Integration loop EOF