|
D.15.8.16 timestep
Procedure from library finitediff.lib (see finitediff_lib).
- Usage:
- timestep(M); M a square matrix with polynomials over the basering as entries;
- Return:
- type list; gives two matrices M1,M2 that are the splitting of M with respect to the degree of the variable t in the entries, where the first list-entry M1 consists of the polynomials of the highest timelevel and M2 of the lower levels in the form: M=0 => M1=M2, i.e. M1-M2=M
- Note:
- intended to be used for the finite-difference-scheme-construction and partition into the several time steps
Example:
| LIB "finitediff.lib";
list D="Ut","Ux","Uy","U";
list V="t","x","y";
list P="a","b";
setinitials(V,D,P);
list Mat=unitmat(2),unitmat(2);
list Apr=forward(Ut,U,t),forward(Ux,U,x);
matrixsystem(Mat,Apr);
==> _[1,1]=-1/(dt)*t-1/(dx)*x+(dt+dx)/(dt*dx)
==> _[1,2]=0
==> _[2,1]=0
==> _[2,2]=-1/(dt)*t-1/(dx)*x+(dt+dx)/(dt*dx)
timestep(_);
==> [1]:
==> _[1,1]=t
==> _[1,2]=0
==> _[2,1]=0
==> _[2,2]=t
==> [2]:
==> _[1,1]=(-dt)/(dx)*x+(dt+dx)/(dx)
==> _[1,2]=0
==> _[2,1]=0
==> _[2,2]=(-dt)/(dx)*x+(dt+dx)/(dx)
|
|