|
D.11.4.3 difpoly2tex
Procedure from library findifs.lib (see findifs_lib).
- Usage:
- difpoly2tex(S,P[,Q]); S an ideal, P and optional Q are lists
- Return:
- string
- Purpose:
- present the difference scheme in the nodal form
- Assume:
- ideal S is the result of
decoef procedure
- Note:
- a list P may be empty or may contain parameters, which will not
appear in denominators
an optional list Q represents the part of the scheme, depending
on other function, than the major part
Example:
| LIB "findifs.lib";
ring r = (0,dh,dt,V),(Tx,Tt),dp;
poly M = (4*dh*Tx+dt)^2*(Tt-1) + V*Tt*Tx;
ideal I = decoef(M,dt);
list L; L[1] = V;
difpoly2tex(I,L);
==> \frac{1}{8\tri t}\cdot (u^{n+1}_{j+2}-u^{n}_{j+2}+\frac{\nu}{16\tri h^{2}\
} u^{n+1}_{j+1})+ \frac{1}{16\tri h}\cdot (u^{n+1}_{j+1}-u^{n}_{j+1}+\fra\
c{\tri t}{8\tri h} u^{n+1}_{j}+\frac{-\tri t}{8\tri h} u^{n}_{j})
poly G = V*dh^2*(Tt-Tx)^2;
difpoly2tex(I,L,G);
==> \frac{1}{8\tri t}\cdot (u^{n+1}_{j+2}-u^{n}_{j+2}+\frac{\nu}{16\tri h^{2}\
} u^{n+1}_{j+1})+ \frac{1}{16\tri h}\cdot (u^{n+1}_{j+1}-u^{n}_{j+1}+\fra\
c{\tri t}{8\tri h} u^{n+1}_{j}+\frac{-\tri t}{8\tri h} u^{n}_{j})+ \frac{\
\nu}{128\tri t}\cdot (p^{n}_{j+2}+(-2) p^{n+1}_{j+1}+p^{n+2}_{j})
|
|