Overview
Comment:Uses the _sub.sh rep to recursively generate and include sub systems.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | origin/master | trunk
Files: files | file ages | folders
SHA3-256: c71d81df52711dd82c8f269e3d496aa265ac18dc6c5a45165698f057caffbb90
User & Date: gawthrop@users.sourceforge.net on 1998-04-14 13:54:15
Other Links: branch diff | manifest | tags
Context
1998-04-14
17:06:44
Input only to SS check-in: 4210b60b29 user: gawthrop@users.sourceforge.net tags: origin/master, trunk
13:54:15
Uses the _sub.sh rep to recursively generate and include sub systems. check-in: c71d81df52 user: gawthrop@users.sourceforge.net tags: origin/master, trunk
07:25:02
_input now has arguments (x,t) check-in: 34a1a1fafe user: gawthrop@users.sourceforge.net tags: origin/master, trunk
Changes

Modified mttroot/mtt/bin/trans/cr_txt2r from [7d1a6d597d] to [aa97895f73].

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


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