Subject: [UFL-dev] *Function checks/bugs

From: Martin Sandve Alnæs <[email-masked]>
Date: Tue, 3 Feb 2009 14:58:32 +0100

The example
a = inner(v,u)*dx + inner(V,U)*dx
should now fail in validate_form(a).

However, we still have the bug or feature:

v1 = TestFunction(element)
v2 = TestFunction(element)

v1 == v2 # True
a = (v1+v2) # => 2*v1

The only way to fix it that I see is to make
"v1 == v2" return False, that is to implement
BasisFunction.__eq__ as "return self is other".
This isn't quite what we want either, so I'm
inclined to just see this as an obscure
issue that will never occur in practice.

Martin

---

From: Anders Logg <[email-masked]>
Date: Sun, 15 Feb 2009 22:23:00 +0100

> v2 = TestFunction(element)

I think this looks good. With v1 and v2 defined as above, "==" should
return True and then the above simplification is correct.

-- 
Anders