Overview
Comment:INcluded othe integration methods.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | origin/master | trunk
Files: files | file ages | folders
SHA3-256: 6ce2193e91225ecccc8674c2b23436fa8abfa90d203435f6f1b6a2b3d22ac20f
User & Date: gawthrop@users.sourceforge.net on 1998-07-30 10:44:37
Other Links: branch diff | manifest | tags
Context
1998-07-30
10:49:02
Put [] round output of zeros. check-in: 8b03c82ca8 user: gawthrop@users.sourceforge.net tags: origin/master, trunk
10:44:37
INcluded othe integration methods. check-in: 6ce2193e91 user: gawthrop@users.sourceforge.net tags: origin/master, trunk
09:32:33
Replaces:
euler by 1
implicitl by 1
implicit by 3
check-in: 340f22cfac user: gawthrop@users.sourceforge.net tags: origin/master, trunk
Changes

Modified mttroot/mtt/bin/trans/make_ode2odes from [353e7b8d60] to [1bd976b4da].

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
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











+
+
+
+










+
+
+







#! /bin/sh

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

###############################################################
## Version control history
###############################################################
## $Id$
## $Log$
## Revision 1.5  1998/07/26 11:02:20  peterg
## Put mtt or MTT  in front of variable names to avoid clashes with
## globals
##
## Revision 1.4  1998/07/25 20:14:00  peterg
## update code added for flexibility and octave efficiency
##
###############################################################


# Bourne shell script: make_ode2odes

# Copyright (c) P.J.Gawthrop July 1998.

# Tell user
echo  Creating $1_ode2odes.m

Sys=$1

# Find system constants
Nx=`grep "MTTNx " <$Sys\_def.r | awk '{print $3}' | sed 's/;//'`
Nu=`grep "MTTNu " <$Sys\_def.r | awk '{print $3}' | sed 's/;//'`
Ny=`grep "MTTNy " <$Sys\_def.r | awk '{print $3}' | sed 's/;//'`
 
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
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







+
+
+
+







+
+
+
-
+












#Initialise
MTTt = 0.0;
MTTx = $1_state;	        # Read in initial state
MTTu = $1_input(MTTx,MTTt);        # Evaluate initial input
MTTy = $1_odeo(MTTx,MTTu,MTTt);    # Evaluate initial output
mtt_write(MTTt,MTTx,MTTy,$Nx,$Ny); # And write them


mttA = $1_smx(MTTx,MTTu); # Set up A matrix - linearised system


#Integration loop
for MTTit = 1:MTTiLast
    for MTTi = 1:mttSTEPFACTOR
        [MTTu] = $1_input(MTTx,MTTt);# Input
        [MTTx] = $1_switch(MTTx); # Switches
        [MTTdx] = $1_ode(MTTx,MTTu,MTTt);
        if mttMETHOD==3
          mttA = $1_smx(MTTx,MTTu); # Set up A matrix - linearised system
        end;
        [MTTx] = mtt_update(MTTdx,MTTx,mttDDT,$Nx,mttMETHOD);
        [MTTx] = mtt_update(MTTdx,MTTx,mttDDT,$Nx,mttMETHOD,mttA);
        [MTTy] = $1_odeo(MTTx,MTTu,MTTt);
	MTTt = MTTt + mttDDT;
    end;
    mtt_write(MTTt,MTTx,MTTy,$Nx,$Ny);
end;

EOF





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