Overview
Comment: | Handles switches by deleting, not zeroing appropriate matrix entries. Avoids problem with rounding error. |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | origin/master | trunk |
Files: | files | file ages | folders |
SHA3-256: |
2a3c57d776e1bce9e78120e597bd1605 |
User & Date: | gawthrop@users.sourceforge.net on 1999-04-02 06:22:53 |
Other Links: | branch diff | manifest | tags |
Context
1999-04-02
| ||
06:23:20 | Initial revision check-in: 4c4a8971d7 user: gawthrop@users.sourceforge.net tags: origin/master, trunk | |
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 | |
Changes
Modified mttroot/mtt/bin/trans/p/mtt_implicit.p from [61c5d96355] to [9617dd391d].
1 2 3 4 | PROCEDURE mtt_implicit(VAR xnew,x,dx : StateVector; VAR AA : StateMatrix; VAR AAx : StateVector; dt : REAL; | | > | | > | > > > > > | > > > > > > > > > > | > > > > > > > > > > | 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 37 38 39 40 41 42 43 44 45 46 | PROCEDURE mtt_implicit(VAR xnew,x,dx : StateVector; VAR AA : StateMatrix; VAR AAx : StateVector; dt : REAL; Nx : INTEGER; VAR open : StateVector); VAR i,ii,j,jj : INTEGER; BB,xsub : StateVector; AAsub : StateMatrix; (*$I $MTTPATH/trans/p/mtt_ludcmp.p *) (*$I $MTTPATH/trans/p/mtt_lubksb.p *) (*$I $MTTPATH/trans/p/mtt_solve_lud.p *) BEGIN{mtt_implicit} ii := 0; FOR i := 1 TO Nx DO {BB is (1-A*dt)*x +dx*dt} BEGIN IF open[i]<0.5 THEN BEGIN ii := ii+1; jj := 0; BB[ii] := AAx[i] + dt*dx[i]; FOR j := 1 TO Nx DO IF open[j]<0.5 THEN BEGIN jj := jj+1; AAsub[ii,jj] := AA[i,j]; END; END; END; Nx := ii; {New size} mtt_solve_lud(xsub,AAsub,BB,Nx); {Solve AAx=BB} ii := 0; FOR i := 1 TO Nx DO IF open[i]<0.5 THEN BEGIN ii := ii+1; xnew[i] := xsub[ii]; END ELSE xnew[i] := x[i]; END;{mtt_implicit} |