Overview
| Comment: | Back to RCS |
|---|---|
| Downloads: | Tarball | ZIP archive |
| Timelines: | family | ancestors | descendants | both | origin/master | trunk |
| Files: | files | file ages | folders |
| SHA3-256: |
6657031eb6c0918e0d9897edb26bcfb3 |
| User & Date: | gawthrop@users.sourceforge.net on 1999-04-02 02:13:58.000 |
| Other Links: | branch diff | manifest | tags |
Context
|
1999-04-02
| ||
| 06:22:53 |
Handles switches by deleting, not zeroing appropriate matrix entries. Avoids problem with rounding error. check-in: 2a3c57d776 user: gawthrop@users.sourceforge.net tags: origin/master, trunk | |
| 02:13:58 | Back to RCS check-in: 6657031eb6 user: gawthrop@users.sourceforge.net tags: origin/master, trunk | |
|
1999-03-30
| ||
| 21:39:25 |
In implicit approach, set derivatives to zero (when switch is off) before update. This seems to stop numerical leakage though non-return switches. check-in: c73a1c2553 user: gawthrop@users.sourceforge.net tags: origin/master, trunk | |
Changes
Modified mttroot/mtt/bin/trans/make_ode2odes
from [de3020d4fa]
to [db3c414234].
1 2 3 4 |
#! /bin/sh
######################################
##### Model Transformation Tools #####
| | > > > > > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
#! /bin/sh
######################################
##### Model Transformation Tools #####
######################################
###############################################################
## Version control history
###############################################################
## $Id$
## $Log$
## Revision 1.19 1999/03/30 21:39:25 peterg
## In implicit approach, set derivatives to zero (when switch is off)
## before update. This seems to stop numerical leakage though non-return
## switches.
##
## Revision 1.18 1999/03/15 01:17:07 peterg
## Removed some spurious debugging code
##
## Revision 1.17 1999/03/15 01:09:15 peterg
## Fixed bugs when Nx=0 (no state)
##
## Revision 1.16 1999/03/06 02:28:38 peterg
|
| ︙ | ︙ | |||
121 122 123 124 125 126 127 |
[MTTx] = mtt_euler(MTTx,MTTdx,MTTddt,$Nx); # Euler update
[MTTx] = $1_switch(MTTx); # Switches
MTTt = MTTt + MTTddt;
endfor;
endif;
if mttmethod==2 # Implicit
[MTTdx] = $1_ode(MTTx,MTTu,MTTt); # State derivative
| | | 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 |
[MTTx] = mtt_euler(MTTx,MTTdx,MTTddt,$Nx); # Euler update
[MTTx] = $1_switch(MTTx); # Switches
MTTt = MTTt + MTTddt;
endfor;
endif;
if mttmethod==2 # Implicit
[MTTdx] = $1_ode(MTTx,MTTu,MTTt); # State derivative
#[MTTdx] = $1_switch(MTTx); # Set derivs to zero if states to zero
[mttAA,mttAAx] = $1_smx(MTTx,MTTu,mttdt); # (I-Adt) and (I-Adt)x
[mttAA] = $1_switcha(mttAA,MTTx); # Switches
[MTTx] = mtt_implicit(MTTx,MTTdx,mttAA,mttAAx,mttdt,$Nx); # Implicit update
MTTt = MTTt + mttdt;
endif;
else
MTTt = MTTt + mttdt;
|
| ︙ | ︙ |