[2c2d03a] | 1 | LIB "tst.lib"; tst_init(); |
---|
| 2 | ring r = (0,A,B,dt,dx,dy),(Tx,Ty,Tt),(c,dp); |
---|
| 3 | r; |
---|
| 4 | matrix M[4][4] = |
---|
| 5 | // direct equation: |
---|
| 6 | -A^2, -B^2, 1, 0, |
---|
| 7 | // central difference u_tt |
---|
| 8 | 0, 0, -dt^2*Tt, (Tt-1)^2, |
---|
| 9 | // central difference u_xx |
---|
| 10 | -dx^2*Tx, 0, 0, (Tx-1)^2, |
---|
| 11 | // central difference u_yy |
---|
| 12 | 0, -dy^2*Ty, 0, (Ty-1)^2; |
---|
| 13 | |
---|
| 14 | print(M); |
---|
| 15 | |
---|
| 16 | //========================================= |
---|
| 17 | // CHECK THE CORRECTNESS OF EQUATIONS AS INPUT: |
---|
| 18 | ring rX = (0,A,B,dt,dx,dy,Tx,Ty,Tt),(Uxx, Uyy,Utt, U),(c,Dp); |
---|
| 19 | rX; |
---|
| 20 | def M = imap(r,M); // T? -> params! // BUG! |
---|
| 21 | |
---|
| 22 | print(M); |
---|
| 23 | |
---|
| 24 | vector X = [Uxx, Uyy, Utt, U]; |
---|
| 25 | print(M*X); |
---|
| 26 | |
---|
| 27 | // END CHECK |
---|
| 28 | //========================================= |
---|
| 29 | tst_status(1);$ |
---|
| 30 | |
---|