Overview
Comment:Minor fixes for sensitivity versions
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | origin/master | trunk
Files: files | file ages | folders
SHA3-256: c071b8a298ee7877d04465c2cccf97b55d5caf331ae5c38e98bc6976ca55feb1
User & Date: gawthrop@users.sourceforge.net on 2001-04-10 12:54:50.000
Other Links: branch diff | manifest | tags
Context
2001-04-10
13:08:19
Smoother translation to .cs using sh2csh check-in: 3b8cbf87d1 user: gawthrop@users.sourceforge.net tags: origin/master, trunk
12:54:50
Minor fixes for sensitivity versions check-in: c071b8a298 user: gawthrop@users.sourceforge.net tags: origin/master, trunk
2001-04-06
05:24:31
-stdin for .cc reps. check-in: 19df88b4b1 user: geraint@users.sourceforge.net tags: origin/master, trunk
Changes
1
2
3
4
5
6
7
8
9
10
11

12
13
14
15
16
17



18
19
20
21
22
23
24
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











+






+
+
+







#! /bin/sh

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

# Bourne shell script: mtt

# P.J.Gawthrop Oct 1989, Dec 1989, 1990, 1991, Oct 1993, Dec 1993, Jan 1994, Dec 95, Nov 1996.
# Copyright (c) P.J.Gawthrop, 1989, 1990, 1991, 1993, 1994, 1995, 1996, 1997,1998,1999
# Copyright (C) 2000 by Peter J. Gawthrop
# Copyright (C) 2001 by Peter J. Gawthrop

###############################################################
## Version control history
###############################################################
## $Header$
## $Log$
## Revision 1.302  2001/04/06 05:24:30  geraint
## -stdin for .cc reps.
##
## Revision 1.301  2001/04/05 03:46:12  geraint
## Added mtt_prepend.sh, -p preserves time attribute of base file
## - eliminates error in dependencies due to update of ese.r by modpar.r.
##
## Revision 1.300  2001/04/04 10:06:49  gawthrop
## New ssim (sensitiveity simulation) rep
##
8
9
10
11
12
13
14



15
16
17
18
19
20
21
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24







+
+
+







  ##    figfig("foo","pdf");

  ###############################################################
  ## Version control history
  ###############################################################
  ## $Id$
  ## $Log$
  ## Revision 1.2  2000/12/27 16:06:02  peterg
  ## *** empty log message ***
  ##
  ## Revision 1.1  2000/11/03 10:43:10  peterg
  ## Initial revision
  ###############################################################

  figfilename = sprintf("%s.fig",filename);
  
  eval(sprintf("gset output \"%s\" ",figfilename));
30
31
32
33
34
35
36
37

38
39
40
41
33
34
35
36
37
38
39

40
41
42
43
44







-
+




  fid = fopen(figfilename,"a+");
  fprintf(fid,"2 4 0 2 31 7 50 0 -1 0.000 0 0 7 0 0 5\n");
  fprintf(fid,"\t9675 5310 9675 270 225 270 225 5310 9675 5310\n");
  fclose(fid);

  if nargin>1			# Do a ps file
    psfilename = sprintf("%s.%s",filename,language);
    convert = sprintf("fig2dev -L%s %s > %s", language, figfilename, psfilename)
    convert = sprintf("fig2dev -L%s %s > %s", language, figfilename, psfilename);
    system(convert);
  endif
  
endfunction
20
21
22
23
24
25
26
27
28


29
30
31
32
33
34
35
20
21
22
23
24
25
26


27
28
29
30
31
32
33
34
35







-
-
+
+







  ny = ny2/2;
  y_par = [];
  MTT_input = u;
  [MTT_input_last,m] = size(u);

  for i=index
    MTT_input_index = 0;
    p = par;
    p(i) = 1;
    p = par;           # Reset parameters
    p(i) = 1;          # Set sensitivity index to 1
    [mtt_data] = ${sys}_ode2odes(x0,p,simpar);
    if (i==index(1))
      y = mtt_data(:,2:1+ny);
    endif
    y_par = [y_par, mtt_data(:,2+ny:1+2*ny)];
  endfor
endfunction
9
10
11
12
13
14
15



16
17
18
19
20
21
22
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25







+
+
+







# Copyright (C) 2000 by Peter J. Gawthrop

###############################################################
## Version control history
###############################################################
## $Id$
## $Log$
## Revision 1.5  2000/11/03 14:57:06  peterg
## Corrected regexp notvar
##
## Revision 1.4  2000/11/02 18:53:46  peterg
## Added NOPAR words to unwanted list.
##
## Revision 1.3  2000/10/16 09:41:29  peterg
## Fixed bug with printing a blank line.
##
## Revision 1.2  2000/10/16 09:10:08  peterg
81
82
83
84
85
86
87
88
89
90
91
92
93
94
84
85
86
87
88
89
90














-
-
-
-
-
-
-
        for (j=1;j<=i;j++){
          printf("%s%s", comma, sysname[j]);
          comma=",";
        }
        printf("\n")

}' < mtt_sympar.txt >$filename







18
19
20
21
22
23
24
25

26
27
28
29
30
31
32
18
19
20
21
22
23
24

25
26
27
28
29
30
31
32







-
+







	;;
    translational)
	base_effort='newton'
	base_flow='m/s'
	;;
    rotational)
	base_effort='newton*m'
	base_flow='radians/s'
	base_flow='radian/s'
	;;
    fluid)
	base_effort='Pa'
	base_flow='m^3/s'
	;;
    thermal)
	base_effort='degK'

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