Overview
Comment:Added implicit integration stuff
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | origin/master | trunk
Files: files | file ages | folders
SHA3-256: cd5672e5b91a74c8370ab6d36d18bf9dc7faa58dc0bb7ca549e2491d81837416
User & Date: gawthrop@users.sourceforge.net on 1998-07-30 11:29:54
Other Links: branch diff | manifest | tags
Context
1998-07-30
11:30:42
Included zeros function check-in: 5f978863cf user: gawthrop@users.sourceforge.net tags: origin/master, trunk
11:29:54
Added implicit integration stuff check-in: cd5672e5b9 user: gawthrop@users.sourceforge.net tags: origin/master, trunk
11:27:33
Initial revision check-in: 474c15ca50 user: gawthrop@users.sourceforge.net tags: origin/master, trunk
Changes

Modified mttroot/mtt/bin/trans/make_ode2odes from [1bd976b4da] to [12daf8e2e4].

1
2
3
4
5
6
7
8
9
10
11



12
13
14
15
16
17
18
#! /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
##











>
>
>







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

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

###############################################################
## Version control history
###############################################################
## $Id$
## $Log$
## Revision 1.6  1998/07/30 10:44:37  peterg
## INcluded othe integration methods.
##
## 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
##
48
49
50
51
52
53
54
55
56
57
58
59
60

61
62
63
64
65
66
67
68
69
$1_numpar;			# Read in parameters

MTTiLast = round(mttLAST/mttDT);         # Total number of steps
mttDDT = mttDT/mttSTEPFACTOR;

#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);







|
|
|

|

>
|
|







51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
$1_numpar;			# Read in parameters

MTTiLast = round(mttLAST/mttDT);         # Total number of steps
mttDDT = mttDT/mttSTEPFACTOR;

#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] = zeros($Nx); # Zero the A matrix

if mttMETHOD==2 #Linear implicit
  mttA = $1_smx(MTTx,MTTu); # Set up A matrix - linearised system
end;

#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);


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