Index: mttroot/mtt/bin/trans/struc2input_txt2txt ================================================================== --- mttroot/mtt/bin/trans/struc2input_txt2txt +++ mttroot/mtt/bin/trans/struc2input_txt2txt @@ -12,10 +12,13 @@ ############################################################### ## Version control history ############################################################### ## $Id$ ## $Log$ +## Revision 1.5 1998/02/04 12:26:47 peterg +## Simplified output format +## ## Revision 1.4 1998/02/04 11:45:05 peterg ## Less verbose comments. ## ## Revision 1.3 1998/01/29 17:06:21 peterg ## Better annotation of each input @@ -48,16 +51,24 @@ #Create the input file complete with headers. echo "# Numerical parameter file ($1_input.txt)" > $1_input.txt echo "# Generated by MTT at `date`" >> $1_input.txt cat $MTTPATH/trans/rcs_header.txt >> $1_input.txt -#Write out the defaults -- inputs +#Write out the defaults -- inputs to steady-state values echo "# Set the inputs" >> $1_input.txt +cat $1_ss.r $1_struc.txt | sed 's/\$//' |\ awk '{ - i++; - if($1=="input") print "u(" i ") =\t1.0; \# " $4 " (" $3 ")" -}' $1_struc.txt >> $1_input.txt + if(match($1,"MTTu")) { + j++ + u[j]=$3; + } + + if($1=="input") { + i++; + print "u(" i ") =\t", u[i], "; \# " $4 " (" $3 ")" + } +}' >> $1_input.txt #Set some switches if [ "$switches" = "yes" ]; then echo >> $1_input.txt