2 * This program is free software; you can redistribute it and/or
3 * modify it under the terms of the GNU General Public License as
4 * published by the Free Software Foundation; either version 2 of
5 * the License, or (at your option) any later version.
7 * This program is distributed in the hope that it will be
8 * useful, but WITHOUT ANY WARRANTY; without even the implied
9 * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
10 * PURPOSE. See the GNU General Public License for more details.
12 * Demonstrating ic_convert()
14 if get('itensor,'version)=false then load(itensor);
15 if get('ctensor,'version)=false then load(ctensor);
16 ("The RHS of the heat transport equation")$
20 eqn:ishow(td = canform(rename(expand(covdiff(
21 -k([],[])*covdiff(t([],[]),i),j)*g([],[i,j]))))+ source)$
23 ("Convert it to a CTENSOR program")$
26 ("Next, write the equation in Cartesian coordinates:")$
31 depends([t,k],ct_coords);
34 ("Now get the equation in spherical coordinates.")$
36 lg:matrix([1,0,0],[0,r^2,0],[0,0,r^2*sin(th)^2])$
39 remove([t,k],dependency);
43 /* End of demo -- comment line needed by MAXIMA to resume demo menu */