#! /bin/sh
######################################
##### Model Transformation Tools #####
######################################
# Bourne shell script: sympar2numpar_txt2txt
# Creates the deafault numerical parameters file for the system (txt)
# Copyright (c) P.J.Gawthrop 1996
###############################################################
## Version control history
###############################################################
## $Id$
## $Log$
# Revision 1.4 1997/05/15 07:19:19 peterg
# Put back "tolower"
#
# Revision 1.3 1997/05/15 07:13:31 peterg
# Removed "tolower" function.
#
# Revision 1.2 1997/05/01 08:19:04 peterg
# # is now used as the comment symbol
#
# Revision 1.1 1997/05/01 07:35:48 peterg
# Initial revision
#
###############################################################
# Inform user
echo Creating $1_numpar.txt
#Create the numpar file complete with headers.
echo "# Numerical parameter file ($1_numpar.txt)" > $1_numpar.txt
echo "# Generated by MTT at `date`" >> $1_numpar.txt
cat $MTTPATH/trans/rcs_header.txt >> $1_numpar.txt
#Write out the variables
echo "# Parameters" >> $1_numpar.txt
awk '{i++; print tolower($1) " = \t1.0; \# Default value"}' $1_sympar.txt \
>> $1_numpar.txt
#Write out the initial states
echo "# Initial states" >> $1_numpar.txt
awk '{
if ($1=="state")
print "x[" $2 "] = \t0.0; \# Initial state for " $4 " (" $3 ")"
}' \
$1_struc.txt >> $1_numpar.txt