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: 40404a1dc7c025f08ef828419d033447c7a5d50f57cf8488c981020ea050038d
User & Date: gawthrop@users.sourceforge.net on 1998-07-25 20:43:18
Other Links: branch diff | manifest | tags
Context
1998-07-25
20:43:56
Lower case as well. check-in: 942a669b5f user: gawthrop@users.sourceforge.net tags: origin/master, trunk
20:43:18
Initial revision check-in: 40404a1dc7 user: gawthrop@users.sourceforge.net tags: origin/master, trunk
20:42:30
No assignements for switch either check-in: aa3e8a21c0 user: gawthrop@users.sourceforge.net tags: origin/master, trunk
Changes

Added mttroot/mtt/bin/trans/dat22dat version [faaffd1fca].



















1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
#! /bin/sh

case $2 in
    odeso)
	i=1;
	;;
    odes)
	i=2;
	;;
    *)
	i=1;
        ;;
esac

echo Creating $1_$2.dat

awk  -F# '{print $1}' i=$1 <$1_odes.dat2 > $1_$2.dat

Added mttroot/mtt/bin/trans/m/mtt_update.m version [37893fe9f3].






1
2
3
4
5
+
+
+
+
+
function [x] = mtt_update(dx,x,dt,Nx,METHOD);

  x = x + dx*dt;

endfunction;

Added mttroot/mtt/bin/trans/p/mtt_update.p version [c735b97393].
















1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
PROCEDURE mtt_update(VAR xnew	: StateVector;
			 dx,x	: StateVector;
			 DT	: REAL;
			 Nx	: INTEGER;
			 METHOD	: IntegrationMethod);

VAR
i : INTEGER;
   
BEGIN
   FOR i := 1 TO  Nx DO
      xnew[i] := xnew[i] + dx[i]*DT;
END;


Added mttroot/mtt/bin/trans/switch_txt2m version [6290ef09de].





































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
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
#! /bin/sh

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

# Bourne shell script: switch_txt2m

# Convert switch file from txt to m
# P.J.Gawthrop May 1997
# Copyright (c) P.J.Gawthrop, 1997.


echo Creating  $1_switch.m

# Find system constants
Nx=`grep "MTTNx " <$1_def.r | awk '{print $3}' | sed 's/;//'`

#Write some file headers
lang_header $1 switch m mttx '[mttxs]' > $1_switch.m

# This is the main transformation using gawk
awk '{
  if (NR==1){
    printf("for i=1:%s\n",Nx)
    printf("  mttxs(i) = mttx(i);\n")
    printf("end;\n\n")
  }
  printf("if (%s==0.0)\n  mttxs(%s)=0.0;\nend;\n\n", $1,$2)
  printf("if (%s<0.0)\n  if (mttx(%s)<0.0)\n    mttxs(%s)=0.0;\n  end;\nend;\n", $1,$2,$2)
}' Nx=$Nx < $1_switch.txt >> $1_switch.m






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