Subject: [UFL-dev] [HG UFL] Implemented more tests for expand_indices, and extended

From: [email-masked] (UFL)
Date: Thu, 19 Mar 2009 11:48:19 +0100 (CET)

One or more new changesets pushed to the primary ufl repository.
A short summary of the last three changesets is included below.

changeset:   745:3ed369882f9ab40666fa66011acb1d72cd6ded6a
tag:         tip
user:        "Martin Sandve Alnæs <[email-masked]>"
date:        Thu Mar 19 11:48:16 2009 +0100
files:       test/expand_indices.py ufl/__init__.py ufl/algorithms/transformations.py ufl/differentiation.py ufl/indexed.py ufl/log.py ufl/terminal.py
description:
Implemented more tests for expand_indices, and extended
the functionality of evaluate to handle derivatives of
functions like this:

def N(x, derivatives=()):
    if derivatives == ():
        return 1.23*x[0]
    if derivatives == (0,):
        return 1.23
    return 0.0

f = Function(element)
x = (3,4)
mapping = { f: N }
g = f + f.dx(0)**2

print g(x, mapping) # prints 5.2029

In [10]: 1.23*3 + 1.23**2
Out[10]: 5.2028999999999996

This will enable better tests of differentiation.

Also changed default streamhandler to use stdout.

changeset:   744:6552e9a51352cae42496843b6897c2407b5a4ed9
user:        "Martin Sandve Alnæs <[email-masked]>"
date:        Thu Mar 19 10:46:10 2009 +0100
files:       test/expand_indices.py ufl/algorithms/transformations.py ufl/terminal.py
description:
Bugfix in evaluate (Expr.__call__) for vector-valued terminals.
Added beginnings of a test for expand_indices, wish
to speed it up but need to make sure it's correct!

changeset:   743:b4568646cd1efaae02102633a77e5bc59c1bccc5
user:        Anders Logg <[email-masked]>
date:        Tue Mar 17 20:58:26 2009 +0100
files:       scripts/form2ufl
description:
Further improvements in form2ufl

----------------------------------------------------------------------
For more details, visit http://www.fenics.org/hg/ufl