Overview
Comment:Initial revision
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | origin/master | trunk
Files: files | file ages | folders
SHA3-256: d0e84b9fcf3dc565b97eebb9c9ce478df115a590e88f0f3ba7c0af097d3ecf1a
User & Date: gawthrop@users.sourceforge.net on 1998-03-07 12:49:31
Other Links: branch diff | manifest | tags
Context
1998-03-07
12:51:20
This is the new version of ese2dae - it does not do the CRs at this
stage to give reduce an easier time.

rese2ese_r does the constitutive relationship bit check-in: c5e45d6145 user: gawthrop@users.sourceforge.net tags: origin/master, trunk

12:49:31
Initial revision check-in: d0e84b9fcf user: gawthrop@users.sourceforge.net tags: origin/master, trunk
1998-03-06
17:14:09
Cospetic change to message check-in: a38403cda1 user: gawthrop@users.sourceforge.net tags: origin/master, trunk
Changes

Added mttroot/mtt/bin/trans/ese2rdae_r version [36ca773757].















































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
#! /bin/sh

     ###################################### 
     ##### Model Transformation Tools #####
     ######################################

# Bourne shell script: ese2daer_r
# Reduce equations to raw differential-algebraic equation conversion
# P.J.Gawthrop  8th May 1991, May 1994, June 1996
# Copyright (c) P.J.Gawthrop, 1991, 1994, 1996

###############################################################
## Version control history
###############################################################
## $Id$
## $Log$
## Revision 1.12  1998/01/31 16:22:59  peterg
## Added IF MTTNx>0 THEN and IF MTTNy>0 THEN before the relevant
## assignements of MTTdX and MTTY to themselves.
##
## Revision 1.11  1997/09/18 09:45:08  peterg
## Canged the comment about linux reduce -- reduce reads this for some
## reason.
##
## Revision 1.10  1997/09/15 14:21:18  peterg
## Reads ese file twice to avoid a bug in Linux reduce !!!???
##
## Revision 1.9  1997/08/30 09:59:31  peterg
## Changed mehtod of writing out mtty to avoid a strange segmentation violation.
## Now uses MTTY := MTTY; approach.
##
## Revision 1.8  1997/04/23 09:31:20  peterg
## Now reads in the (top level) def file in the generated reduce code.
##
# Revision 1.7  1997/04/23  09:23:15  peterg
# Two argument version in preparation for heirarchical version
#
# Revision 1.6  1996/11/21  15:47:48  peterg
# Now inputs _params.r not _sympar.r
#
## Revision 1.5  1996/11/02 10:17:35  peterg
## Removed default constitutive relationship input.
##
# Revision 1.4  1996/09/12  12:10:05  peter
# Now reads the default constitutive relationship file.
#
## Revision 1.3  1996/08/25 09:43:26  peter
## General error handling.
##
## Revision 1.2  1996/08/25 08:31:28  peter
## Error handling added.
##
###############################################################

#Create the top-level system name
topname=$1

#Create the system names
if [ -z "$2" ]; 
    then
	sysname=$topname;
    else
	sysname=$1_$2;
fi

defname=$topname"_def.r"
crname=$topname"_cr.r"
paramname=$topname"_params.r"
daename=$sysname"_rdae.r"
esename=$sysname"_ese.r"

# Inform user
echo Creating $daename

# Remove the old log file
rm -f ese2dae_r.log

# Use symbolic algebra to accomplish the transformation
$SYMBOLIC >ese2dae_r.log  << EOF

%Read the formatting function
in "$MTTPATH/trans/reduce_matrix.r";

% Definitions
in "$defname";

% Elementary system equations
in "$esename";

OFF Echo;
OFF Nat;

%Create the output file
OUT "$daename";

write "in ""$defname""";

% State
MTT_Matrix := MTTdX$ 
MTT_Matrix_name := "MTTdX"$
MTT_Matrix_n := MTTNx$
MTT_Matrix_m := 1$
Reduce_Matrix()$

% Nonstate
MTT_Matrix := MTTZ$ 
MTT_Matrix_name := "MTTZ"$
MTT_Matrix_n := MTTNz$
MTT_Matrix_m := 1$
Reduce_Matrix()$

% Output
MTT_Matrix := MTTy$ 
MTT_Matrix_name := "MTTy"$
MTT_Matrix_n := MTTNy$
MTT_Matrix_m := 1$
Reduce_Matrix()$

% Zero outputs
MTT_Matrix := MTTYz$ 
MTT_Matrix_name := "MTTYz"$
MTT_Matrix_n := MTTNyz$
MTT_Matrix_m := 1$
Reduce_Matrix()$


write ";END;";
SHUT "$daename";
quit;

EOF

# Now invoke the standard error handling.
mtt_error_r ese2dae_r.log


MTT: Model Transformation Tools
GitHub | SourceHut | Sourceforge | Fossil RSS ]