Issue 1139: Description and Differentiation of vector, tensor, and multivector fields. http://code.google.com/p/sympy/issues/detail?id=1139
Comment #31 by [EMAIL PROTECTED]: I am presenting the following design plan for improving the output of generic functions and their derivatives. I will clearly state what I can do and need for someone who understands sympy better than I do to do. My objective for my programming methodology it to add to sympy and not change what is already there. For the purposes of improving the output notation the existing facilities shown in the following code will suffice: x = sympy.symbols('x1','x2') xt = tuple(x) x1 = x[0] x2 = x[1] f = Function('f')(*xt) g = Function('g')(*xt) print 'f =',f print 'g =',g dfx1 = diff(f,x[0]) print 'dfx1 =',dfx1 dfx2 = diff(f,x[1]) print 'dfx2 =',dfx2 That is declaring a function with "f = Function('f')(*xt)" and a derivative with "dfx1 = diff(f,x[0])" will suffice if "Function" and "diff" are classes that I can use for the base classes of for example 'newFunction" and "newdiff" where all the old base class operations and functions are preserved except for "__str__(self)". I will need to access the base class string representation and use text processing functions that I will develop to output a LaTeX representation via my "__str__" function for the derived classes. Additionally, I will the code so that when the program is in LaTeX output mode stdout will be redirected to a string. Any parts of the string not in LaTeX format will be converted to LaTeX format and a LaTeX preamble and postscript added to the string. The string will then be processed with latex and displayed with xdvi. My problems are that when I try to derive a class from "Function" not all the operations are preserved (+ for example). Additionally, you documentation states that "diff" is not a class. Note that is "diff" works on an instantciation of "myFuction" there is no problem. Does "diff(f,x1)" return a function? -- You received this message because you are listed in the owner or CC fields of this issue, or because you starred this issue. You may adjust your issue notification preferences at: http://code.google.com/hosting/settings --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "sympy-issues" group. To post to this group, send email to sympy-issues@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sympy-issues?hl=en -~----------~----~----~----~------~----~------~--~---