Home Online Manual
Top
Back: errormap
Forward: timestep
FastBack:
FastForward:
Up: finitediff_lib
Top: Singular Manual
Contents: Table of Contents
Index: Index
About: About this document

D.15.10.15 matrixsystem

Procedure from library finitediff.lib (see finitediff_lib).

Usage:
matrixsytem(M,A); where the M=Mt,M1,..,Mn is a list with square matrices of the same dimension as entries, and A=At,A1,..,An gives the corresponding approximations for the several variables (t,x1,..,xn) as vector. Intended to solve Mt*U_t + M1*U_x1+..+Mn*U_xn=0 as a linear sytem of partial differential equations numerically by a finite difference scheme;

Return:
type matrix; gives back the matrices B1,B2 that represent the finite difference scheme, partitioned into different time levels in the form: B1*U(t=N)=B2*U(t<N), where N is the maximal occurring degree (timelevel) of t.

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 Appr=forward(Ut,U,t),forward(Ux,U,x);
matrixsystem(Mat,Appr);
==> _[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)