← Back to team overview

ufl team mailing list archive

[HG UFL] Fixed incorrect use of type(x) vs x._uflid in all algorithms.

 

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

changeset:   354:b1bd0dc1877ba1626c1a16345b18023ffb20d098
tag:         tip
user:        "Martin Sandve Alnæs <martinal@xxxxxxxxx>"
date:        Mon Oct 27 12:06:28 2008 +0100
files:       ufl/algorithms/__init__.py ufl/algorithms/analysis.py ufl/algorithms/dependencies.py ufl/algorithms/transformations.py ufl/algorithms/ufl2latex.py ufl/algorithms/variables.py
description:
Fixed incorrect use of type(x) vs x._uflid in all algorithms.
Keeping this correct will require some disipline though...
Don't hesitate to ask me when unsure!


changeset:   353:a7499b8d87db5c961dc593dca7866306e6b2d8cf
user:        "Martin Sandve Alnæs <martinal@xxxxxxxxx>"
date:        Fri Oct 24 14:36:52 2008 +0200
files:       ROADMAP ufl/__init__.py ufl/algebra.py ufl/algorithms/ad.py ufl/algorithms/analysis.py ufl/algorithms/dependencies.py ufl/algorithms/formtransformations.py ufl/algorithms/indexalgorithms.py ufl/algorithms/transformations.py ufl/algorithms/ufl2latex.py ufl/algorithms/variables.py ufl/base.py ufl/classes.py ufl/common.py
description:
Fast hack to prepare for major bugfix that would have
prevented subclassing Function like PyDOLFIN wants to do.
The change involves adding an "UFL id" as a static
variable in each class, which is done easily in classes.py:

 for c in all_ufl_classes:
    c._uflid = c

The second part is replacing all "dict" and "defaultdict"
objects in algorithms where UFLObject subclasses are used
as keys by new classes UFLTypeDict and UFLTypeDefaultDict
found in common.py, which uses "key._uflid" instead of "key"
for dict lookup. So when looking for "dolfin.Function" in
this kind of dict, in fact "dolfin.Function._uflid" is
used which translates to "ufl.Function._uflid" which
is really just "ufl.Function".

This additional class introduces some overhead,
which can be optimized away later.


changeset:   352:de007501ae8da58864cde56c6035973b81ae1ecd
user:        "Martin Sandve Alnæs <martinal@xxxxxxxxx>"
date:        Fri Oct 24 12:03:01 2008 +0200
files:       test/ffcforms.py
description:
Temporarily catching exceptions from lhs and rhs.

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