Subject: [Ufl] Debug derivative

From: Johan Hake <[email-masked]>
Date: Thu, 4 Aug 2011 23:01:38 -0700

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

---

From: Kristian Ølgaard <[email-masked]>
Date: Fri, 5 Aug 2011 13:48:52 +0200

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 <[email-masked]> wrote:
> _______________________________________________
> Mailing list: https://launchpad.net/~ufl
> Post to     : [email-masked]
> Unsubscribe : https://launchpad.net/~ufl
> More help   : https://help.launchpad.net/ListHelp
>

---

From: Johan Hake <[email-masked]>
Date: Sat, 6 Aug 2011 00:18:04 -0700

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:
> > 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
> >