Subject: [UFL-dev] [HG UFL] Improved variable handling in expand_compounds.

From: [email-masked] (UFL)
Date: Mon, 27 Oct 2008 11:52:52 +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:   355:2008244953abb0409dbb3fede4a900e606d01188
tag:         tip
user:        "Martin Sandve Alnæs <[email-masked]>"
date:        Mon Oct 27 11:52:48 2008 +0100
files:       ufl/algorithms/analysis.py ufl/algorithms/transformations.py ufl/algorithms/variables.py
description:
Improved variable handling in expand_compounds.

changeset:   354:b1bd0dc1877ba1626c1a16345b18023ffb20d098
user:        "Martin Sandve Alnæs <[email-masked]>"
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 <[email-masked]>"
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.

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