Hi all, Being curious - were there any follow-ups on this topic of creating a matrix of differential operators?
Best, Shawn On Thursday, May 2, 2013 at 8:08:54 AM UTC-7, Saullo G. P. Castro wrote: > > The referred solution in Stackoverflow > <http://stackoverflow.com/questions/15463412/matrix-of-differential-operators-in-python-module-sympy/16237073#16237073> > as > showed to work really well. In my local SymPy version (which is a fork of > 0.7.2-git from 30/04/2013) I've added an engineering module with the > Rayleigh Ritz method implemented. The user must supply the matrix of > differential operators [B], the trial functions [g] and the material > constitutive matrix [F] in order to get the buckling modes and the > eigenvectors (more details in here > <http://math.stackexchange.com/questions/363804/handling-matrix-of-differential-operator-when-using-the-ritz-method-for-an-extre> > or > in the Stackoverflow question > <http://stackoverflow.com/questions/15463412/differential-operator-usable-in-matrix-form-in-python-module-sympy> > ). > Is there a an interest from the SymPy group to add such functionality in > the master release? > Regards, > Saullo > > On Friday, April 26, 2013 3:03:04 PM UTC+2, Saullo Castro wrote: >> >> I have now a mid term solution based on all your tips and it has been >> posted in Stackoverflow >> <http://stackoverflow.com/questions/15463412/matrix-of-differential-operators-in-python-module-sympy/16237073#16237073>, >> >> in a post created for this issue. >> I would really appreciate if you could take a look there >> <http://stackoverflow.com/questions/15463412/matrix-of-differential-operators-in-python-module-sympy/16237073#16237073> >> >> and make any suggestions you believe would improve the solution. >> I am still not managing to perform all the differentiations, but at least >> now it is applied only where it should. >> >> Regards, >> Saullo >> >> On Monday, March 18, 2013 11:44:26 PM UTC+1, Julien Rioux wrote: >>> >>> On Monday, 18 March 2013 05:49:11 UTC-4, Saullo Castro wrote: >>>> >>>> Dear Mr. Zhang, we are using a differential operator as you need, >>>> please see more details on: >>>> >>>> http://stackoverflow.com/questions/15463412/matrix-of-differential-operators-in-python-module-sympy >>>> >>>> We could address it without changing the core classes in Sympy only >>>> when the differential operator is used on the left side. When it is used >>>> on >>>> the right side the method __mul__ in the core class Expr had to be changed. >>>> We are still looking for a Sympy native solution, though. >>>> >>>> Regards >>>> >>>> >>>> >>> _op_priority and the @call_highest_priority are there exactly for this >>> purpose. Define it in your class with a value above 10.0, which is Expr's >>> default value for it. Also define __rmul__, using the decorator >>> @call_highest_priority. This will allow your class to control what happens >>> during multiplication (left or right), but you will still run into subtle >>> problems because multiplication != application, as already a mentioned >>> couple of times. >>> >>> Cheers, >>> Julien >>> >> -- You received this message because you are subscribed to the Google Groups "sympy" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/sympy. To view this discussion on the web visit https://groups.google.com/d/msgid/sympy/0399992c-ffa9-49af-869d-de5079c1d29e%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
