From: Robert D. <rob...@us...> - 2008-03-23 22:38:53
|
Update of /cvsroot/maxima/maxima/share/vector In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv13011/share/vector Modified Files: vector.mac Log Message: Change all && labels so they have an initial underscore. (Otherwise the Maxima parser complains, because the labels are the same as some user-defined operators.) Index: vector.mac =================================================================== RCS file: /cvsroot/maxima/maxima/share/vector/vector.mac,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- vector.mac 9 Jan 2005 07:44:55 -0000 1.2 +++ vector.mac 23 Mar 2008 22:38:50 -0000 1.3 @@ -20,7 +20,7 @@ then result /* return a list */ else apply('matrix,[result]) /* return a matrix */$ -coordsystem&& coordsystem(sys):= +_coordsystem&& coordsystem(sys):= (if sys=rectangular then (coodvar:[x,y], scalefactor:[1,1]) @@ -43,7 +43,7 @@ coordsystem(cartesian)$ -cross&& (a cross b) := if dimension=3 then block([result], +_cross&& (a cross b) := if dimension=3 then block([result], result:[a[2]*b[3]-a[3]*b[2], a[3]*b[1]-a[1]*b[3], a[1]*b[2]-a[2]*b[1]], @@ -61,13 +61,13 @@ a*b[1]], type([b]))$ -grad&& (grad s) := block([result], +_grad&& (grad s) := block([result], result:map(lambda([i], diff(s,coordvar[i])/scalefactor[i]), dimension()), type(vector))$ -div&& (div v) := if dimension=3 then +_div&& (div v) := if dimension=3 then (diff(scalefactor[2]*scalefactor[3]*v[1],coordvar[1])+ diff(scalefactor[3]*scalefactor[1]*v[2],coordvar[2])+ diff(scalefactor[1]*scalefactor[2]*v[3],coordvar[3])) @@ -77,7 +77,7 @@ +diff(scalefactor[1]*v[2],coordvar[2])) /scalefactor[1]/scalefactor[2]$ -curl&& (curl a) := if dimension=3 then block([result], +_curl&& (curl a) := if dimension=3 then block([result], result:[(diff(scalefactor[3]*a[3],coordvar[2]) -diff(scalefactor[2]*a[2],coordvar[3])) /scalefactor[2]/scalefactor[3], @@ -99,7 +99,7 @@ -diff(a,coordvar[1])/scalefactor[1]], type(vector))$ -laplacian&& (laplacian a) := if nonscalarp(a) then grad div a -curl curl a +_laplacian&& (laplacian a) := if nonscalarp(a) then grad div a -curl curl a else if dimension=3 then (diff(diff(a,coordvar[1])*scalefactor[2] *scalefactor[3]/scalefactor[1],coordvar[1]) @@ -114,7 +114,7 @@ +diff(diff(a,coordvar[2])*scalefactor[1] /scalefactor[2],coordvar[2]))/scalefactor[1]/scalefactor[2]$ -dotdel&& (v dotdel b) := if nonscalarp(b) then block([result], +_dotdel&& (v dotdel b) := if nonscalarp(b) then block([result], result:if last(properties(christsym))=declared\ array then /* use christoffel symbols */ map(lambda([j], @@ -139,7 +139,7 @@ /scalefactor[i],i,1,dimension), type([v]))$ -christoffel&& christoffel := (array(christsym,3,3,3), +_christoffel&& christoffel := (array(christsym,3,3,3), christsym[i,j,k]:=0, for i thru 3 do (christsym[i,i,i]:diff(scalefactor[i],coordvar[i]) |