← Back to team overview

ufl team mailing list archive

[HG UFL] Bugfix in expand_indices for division.

 

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

changeset:   746:0b2ad7acb69bfdd027a6882c3f62b73b7e66cf73
tag:         tip
user:        "Martin Sandve Alnæs <martinal@xxxxxxxxx>"
date:        Thu Mar 19 13:19:45 2009 +0100
files:       ufl/algorithms/transformations.py ufl/common.py
description:
Bugfix in expand_indices for division.


changeset:   745:3ed369882f9ab40666fa66011acb1d72cd6ded6a
user:        "Martin Sandve Alnæs <martinal@xxxxxxxxx>"
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 <martinal@xxxxxxxxx>"
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!

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