Overview
Comment:update code added for flexibility and octave efficiency
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | origin/master | trunk
Files: files | file ages | folders
SHA3-256: 3d256235c48d8ad28f9e30fd1789871cbfb397b4667ee8028157412ea8f366ee
User & Date: gawthrop@users.sourceforge.net on 1998-07-25 20:14:00
Other Links: branch diff | manifest | tags
Context
1998-07-25
20:34:05
*** empty log message *** check-in: 4f308bb697 user: gawthrop@users.sourceforge.net tags: origin/master, trunk
20:14:00
update code added for flexibility and octave efficiency check-in: 3d256235c4 user: gawthrop@users.sourceforge.net tags: origin/master, trunk
20:10:37
lower case mttu check-in: 017b3b2a08 user: gawthrop@users.sourceforge.net tags: origin/master, trunk
Changes

Modified mttroot/mtt/bin/trans/make_ode2odes from [cb3e7cd253] to [4c6ad3aaed].

1
2
3
4
5








6
7
8
9
10
11
12
#! /bin/sh

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









# Bourne shell script: make_ode2odes

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

Sys=$1






>
>
>
>
>
>
>
>







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

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

###############################################################
## Version control history
###############################################################
## $Id$
## $Log$
###############################################################


# Bourne shell script: make_ode2odes

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

Sys=$1

38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
MTTu = $1_input(MTTx,t);        # Evaluate initial input
MTTy = $1_odeo(MTTx,MTTu,t);    # Evaluate initial output
mtt_write(t,MTTx,MTTy,$Nx,$Ny); # And write them

#Integration loop
for it = 1:iLast
    for i = 1:STEPFACTOR
	MTTu = $1_input(MTTx,t);# Input
        MTTx = $1_switch(MTTx); # Switches
	MTTdx = $1_ode(MTTx,MTTu,t);
	for j = 1:$Nx
	    MTTx(j) = MTTx(j) + MTTdx(j)*DDT;
	end;
	MTTy = $1_odeo(MTTx,MTTu,t);
	t = t + DDT;
    end;
    mtt_write(t,MTTx,MTTy,$Nx,$Ny);
end;

EOF











|
|
|
|
<
<
|










46
47
48
49
50
51
52
53
54
55
56


57
58
59
60
61
62
63
64
65
66
67
MTTu = $1_input(MTTx,t);        # Evaluate initial input
MTTy = $1_odeo(MTTx,MTTu,t);    # Evaluate initial output
mtt_write(t,MTTx,MTTy,$Nx,$Ny); # And write them

#Integration loop
for it = 1:iLast
    for i = 1:STEPFACTOR
        [MTTu] = $1_input(MTTx,t);# Input
        [MTTx] = $1_switch(MTTx); # Switches
        [MTTdx] = $1_ode(MTTx,MTTu,t);
        [MTTx] = mtt_update(MTTdx,MTTx,DDT,$Nx,METHOD);


        [MTTy] = $1_odeo(MTTx,MTTu,t);
	t = t + DDT;
    end;
    mtt_write(t,MTTx,MTTy,$Nx,$Ny);
end;

EOF





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