← Back to team overview

ufl team mailing list archive

Re: *Function checks/bugs

 

On Tue, Feb 03, 2009 at 02:58:32PM +0100, Martin Sandve Alnæs wrote:
> 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

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

-- 
Anders


> 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

Attachment: signature.asc
Description: Digital signature


References