diff --git a/stack/maxima/contrib/vectorcalculus.mac b/stack/maxima/contrib/vectorcalculus.mac index e41351c22bcbabb143c2cd40e3b780aaa036a5a8..9570f3b6e5215800ccee3da107913c59c05610ff 100644 --- a/stack/maxima/contrib/vectorcalculus.mac +++ b/stack/maxima/contrib/vectorcalculus.mac @@ -24,7 +24,7 @@ /* Calculate the divergence of a vector-valued function */ /****************************************************************/ div(u, vars):= block([div_vec], - if not(listp(vars)) or emptyp(vars) then error("div: the second argument must be a list of variables."), + /* TODO: error trapping: if not(listp(vars)) or emptyp(vars) then error("div: the second argument must be a list of variables."), */ if matrixp(u) then funcs: list_matrix_entries(u) else funcs: flatten(u), /* TODO: confirm div should always simplify? */ div_vec: map(lambda([ex], ev(diff(funcs[ex],vars[ex]), simp)), ev(makelist(ii,ii,1,length(vars)), simp)), @@ -39,7 +39,7 @@ s_test_case(div(matrix([x^2*cos(y),y^3]),[x,y]), 2*x*cos(y)+3*y^2); /* Calculate the curl of a vector-valued function */ /****************************************************************/ curl(u,vars):= block([cux, cuy, cuz], - if not(listp(vars)) or emptyp(vars) then error("curl: the second argument must be a list of 3 variables."), + /* TODO: error trapping: if not(listp(vars)) or emptyp(vars) then error("curl: the second argument must be a list of 3 variables."), */ if matrixp(u) then [ux,uy,uz]: list_matrix_entries(u) else [ux,uy,uz]: flatten(u), cux: diff(uz,vars[2]) - diff(uy,vars[3]), cuy: diff(ux,vars[3]) - diff(uz,vars[1]),