Subject: [UFL-dev] [Bug 460956] [NEW] Invalid expression in Division

From: Marie Rognes <[email-masked]>
Date: Mon, 26 Oct 2009 10:07:58 -0000

Public bug reported:

The following example gives a "this is an invalid expression" error. 
However, it runs nicely with E = 0.5*u instead of E = u/2.0 

from ufl import *

V = FiniteElement("CG", triangle, 1)
v  = TestFunction(V)
u  = Function(V)

E = u/2.0   # This fails
#E = 0.5*u   # This works
E = variable(E)

psi = E**2
S = diff(psi, E)

F = S*v*dx

A = derivative(F, u)

print lhs(A)

** Affects: ufl
     Importance: Undecided
         Status: New

-- 
Invalid expression in Division
https://bugs.launchpad.net/bugs/460956
You received this bug notification because you are subscribed to UFL.

Status in Unified Form Language: New

Bug description:

The following example gives a "this is an invalid expression" error. 
However, it runs nicely with E = 0.5*u instead of E = u/2.0 

from ufl import *

V = FiniteElement("CG", triangle, 1)
v  = TestFunction(V)
u  = Function(V)

E = u/2.0   # This fails
#E = 0.5*u   # This works
E = variable(E)

psi = E**2
S = diff(psi, E)

F = S*v*dx

A = derivative(F, u)

print lhs(A)

---

From: oelgaard <[email-masked]>
Date: Tue, 27 Oct 2009 09:38:21 -0000

** Changed in: ufl
       Status: New => Confirmed

Status in Unified Form Language: Confirmed

Bug description:

from ufl import *

E = u/2.0   # This fails
#E = 0.5*u   # This works
E = variable(E)

psi = E**2
S = diff(psi, E)

F = S*v*dx

A = derivative(F, u)

print lhs(A)