Overview
Context
Changes
Added mttroot/mtt/bin/trans/cr_txt2r version [499f16ca0c].
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
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
|
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
|
#! /bin/sh
######################################
##### Model Transformation Tools #####
######################################
# Bourne shell script: cr_txt2r
# Label file to constitutive relationship conversion
# P.J.Gawthrop March 1997
# Copyright (c) P.J.Gawthrop, 1997.
###############################################################
## Version control history
###############################################################
## $Id$
## $Log$
# Revision 1.3 1997/04/09 12:59:43 peterg
# Looks for .cr file in current directory - copies from library if they
# don't already exist.
#
# Revision 1.2 1997/04/09 09:25:55 peterg
# Now copies .cr files from linrary to here (if they don't exist
# already).
#
# Revision 1.1 1997/04/09 09:08:12 peterg
# Initial revision
#
###############################################################
if [ -f "$1_cr.r" ]; then
echo "$1_cr.r exists -- no action taken"
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
# Include the .cr files
awk '{
if (NF>0) {
print "in \"" $1 ".cr\";"
}
}' $1_cr.txt >> $1_cr.r
echo 'END;' >> $1_cr.r
fi
# Now invoke the standard error handling.
#mtt_error mtt_error.txt
|
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |