← Back to team overview

ffc team mailing list archive

error in simplify()

 

Related to an earlier post on 'Error in mixed elements'

It looks like the update of simplify() (changeset:   812:c9b63179cee6) changed
the results of a lot of forms, including Elasticity.form.

This is easily verified by running the src/demo/pde/elasticity demo with form
files compiled with and without simplify() (comment the line 'simplify(form)' in
analyze.py) and then compare the results with kdiff3 or equivalent.


implementation specific:

simplify() works OK for:
element = FiniteElement("Lagrange", "triangle", 1)
v = TestFunction(element)
u = TrialFunction(element)
a = dot(grad(v),grad(u))*dx + dot(grad(v),grad(u))*dx

but not for:
element = VectorElement("Lagrange", "triangle", 1)
v = TestFunction(element)
u = TrialFunction(element)

def sig(v):
    return [2.0*v[0], v[1]]

a = dot(grad(sig(v)),grad(sig(u)))*dx

The test in contract_monomials() (contraction_likely()) needs to be a little
more strict, but not as strict as diff() (I tried to use this instead, but then
nothing happened)

Kristian