12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
# Copyright (c) P.J.Gawthrop, 1997.
###############################################################
## Version control history
###############################################################
## $Id$
## $Log$
## Revision 1.4 1998/03/06 15:54:41 peterg
## Put message bcak in in simpler form
##
## Revision 1.3 1998/03/06 15:51:06 peterg
## Zapped the irritating error message
##
## Revision 1.2 1998/03/04 15:32:53 peterg
|
>
>
>
|
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
# Copyright (c) P.J.Gawthrop, 1997.
###############################################################
## Version control history
###############################################################
## $Id$
## $Log$
## Revision 1.5 1998/03/09 13:36:00 peterg
## Cosmetic change
##
## Revision 1.4 1998/03/06 15:54:41 peterg
## Put message bcak in in simpler form
##
## Revision 1.3 1998/03/06 15:51:06 peterg
## Zapped the irritating error message
##
## Revision 1.2 1998/03/04 15:32:53 peterg
|
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
|
# Initial revision
#
###############################################################
if [ -f "$1_cr.r" ]; then
echo "Using $1_cr.r"
else
# Inform user
echo "Creating $1_cr.r"
echo "% Constitutive relation file for $1 ($1_cr.r)" > $1_cr.r
echo "% Generated by MTT at `date`" >> $1_cr.r
echo >> $1_cr.r
# Include subsystem CR files - where they exist.
ls *_cr.r |\
awk '{
if ($1 != SYS)
print "in \"" $1 "\";"
}' SYS=$1_cr.r >> $1_cr.r
# Copy .cr files
awk '{
if (NF>0) {
print "mtt -q -u crcopy " $1;
}
}' $1_cr.txt | sh
|
<
>
>
>
|
|
<
|
|
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
|
# Initial revision
#
###############################################################
if [ -f "$1_cr.r" ]; then
echo "Using $1_cr.r"
else
# Inform user
echo "Creating $1_cr.r"
echo "% Constitutive relation file for $1 ($1_cr.r)" > $1_cr.r
echo "% Generated by MTT at `date`" >> $1_cr.r
echo >> $1_cr.r
# Recursively create subsystem CR files
sh $1_sub.sh 'cr_txt2r ' ''
# Include subsystem CR files
sh $1_sub.sh 'echo ' '_cr.r' |\
awk '{
print "in \"" $1 "\";"
}' >> $1_cr.r
# Copy .cr files
awk '{
if (NF>0) {
print "mtt -q -u crcopy " $1;
}
}' $1_cr.txt | sh
|