Differences From Artifact [0f74549f73]:

To Artifact [fd5b5dde90]:


12
13
14
15
16
17
18



19
20
21
22
23
24
25

###############################################################
## Version control history
###############################################################
## $Id$
##
## $Log$



## Revision 1.25  2000/12/01 14:51:26  peterg
## Major changes towards partioning
##
## - generates sub ese, def and struc
## - generates indices for conversion of subsystem in/out/state - but not used yet
##
## Revision 1.24  2000/11/30 15:12:55  peterg







>
>
>







12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28

###############################################################
## Version control history
###############################################################
## $Id$
##
## $Log$
## Revision 1.26  2000/12/05 09:04:54  peterg
## *** empty log message ***
##
## Revision 1.25  2000/12/01 14:51:26  peterg
## Major changes towards partioning
##
## - generates sub ese, def and struc
## - generates indices for conversion of subsystem in/out/state - but not used yet
##
## Revision 1.24  2000/11/30 15:12:55  peterg
186
187
188
189
190
191
192
193

194
195
196
197
198
199
200

else # Partition the system

  # Save up the full def file
  mv $1_def.r mtt_all_def.r

## Recreate def file from the ese file directly
function makedef {


echo Creating $1_def.r

Nx=`mtt_getsize -external $1 dX`
Nz=`mtt_getsize -external $1 z`
Ny=`mtt_getsize -external $1 y`
Nu=`mtt_getsize -external $1 u`







|
>







189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204

else # Partition the system

  # Save up the full def file
  mv $1_def.r mtt_all_def.r

## Recreate def file from the ese file directly
makedef ()
{

echo Creating $1_def.r

Nx=`mtt_getsize -external $1 dX`
Nz=`mtt_getsize -external $1 z`
Ny=`mtt_getsize -external $1 y`
Nu=`mtt_getsize -external $1 u`
221
222
223
224
225
226
227
228

229
230
231
232
233
234

235
236
237
238
239
240
241
  makedef(structure,deffilenum);  #Create definitions
EOF

echo "END;" >> $1_def.r
}


function get_indices {

  sys=$1
  which=$2
  awk '{if ($1==which) print $2}' which=$which < ${sys}_struc.txt
}

function convert_indices {

  sys=$1
  Which="input output state"
  for which in $Which; do
  
    indices=`get_indices ${sys} $which`
  
    case $which in







|
>





|
>







225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
  makedef(structure,deffilenum);  #Create definitions
EOF

echo "END;" >> $1_def.r
}


get_indices ()
{
  sys=$1
  which=$2
  awk '{if ($1==which) print $2}' which=$which < ${sys}_struc.txt
}

convert_indices ()
{
  sys=$1
  Which="input output state"
  for which in $Which; do
  
    indices=`get_indices ${sys} $which`
  
    case $which in

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