← Back to team overview

dolfin team mailing list archive

Re: [Ufl] Debug derivative

 

Thanks that worked just fine!

It turned out that derivative worked just fine! The bug I chased was a 
regression from my fix of the EpetraMatrix :P

But it is certainly nice to know that UFL differentiate nasty expressions just 
fine!

Johan


On Friday August 5 2011 04:48:52 Kristian Ølgaard wrote:
> Is printing the output from expand_derivatives good enough for you?
> 
> from ufl.algorithms import expand_derivatives
> element = FiniteElement("Lagrange", triangle, 1)
> u   = Coefficient(element)
> du = TrialFunction(element)
> v   = TestFunction(element)
> L1 = u**2*v*dx
> J1 = derivative(L1,u,du)
> print expand_derivatives(J1)
> 
> Kristian
> 
> On 5 August 2011 08:01, Johan Hake <johan.hake@xxxxxxxxx> wrote:
> > Hello!
> > 
> > I am suspecting that there are a bug in the differentiation algorithm.
> > How can I debug the result of a call to derivative(form)?
> > 
> > Johan
> > 
> > _______________________________________________
> > Mailing list: https://launchpad.net/~ufl
> > Post to     : ufl@xxxxxxxxxxxxxxxxxxx
> > Unsubscribe : https://launchpad.net/~ufl
> > More help   : https://help.launchpad.net/ListHelp
> 
> _______________________________________________
> Mailing list: https://launchpad.net/~ufl
> Post to     : ufl@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~ufl
> More help   : https://help.launchpad.net/ListHelp


References