Subject: [UFL-dev] [HG UFL] Implemented shape() in all classes.

From: [email-masked] (UFL)
Date: Fri, 15 Aug 2008 13:54:50 +0200 (CEST)

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

changeset:   157:d0da2d48d30138a9faaaf377d5a2d29668b471b4
tag:         tip
user:        "Martin Sandve Alnæs <[email-masked]>"
date:        Fri Aug 15 13:46:04 2008 +0200
files:       test/elements.py test/indices.py ufl/algebra.py ufl/base.py ufl/basisfunctions.py ufl/common.py ufl/differentiation.py ufl/finiteelement.py ufl/geometry.py ufl/indexing.py ufl/mathfunctions.py ufl/restriction.py ufl/tensoralgebra.py ufl/tensors.py ufl/variable.py
description:
Implemented shape() in all classes.
Fixed some nasty bugs in Tensor as well.
We should have some more extensive tests of this though.

changeset:   156:9f6c5f94b8fb8c03fb468c03d3c21a72ee638d2e
user:        "Martin Sandve Alnæs <[email-masked]>"
date:        Thu Aug 14 22:15:07 2008 +0200
files:       ufl/algorithms/transformations.py ufl/algorithms/utilities.py ufl/finiteelement.py ufl/indexing.py
description:
Bugfixes.
 "%s" % a
or
 "%r" % b
can be wrong if a or b are tuples...

changeset:   155:eebcc07fceaea030bf8b6fa40e3c8690c25e1f2f
user:        "Martin Sandve Alnæs <[email-masked]>"
date:        Thu Aug 14 22:10:20 2008 +0200
files:       ufl/algebra.py ufl/base.py ufl/differentiation.py ufl/finiteelement.py ufl/form.py ufl/formoperators.py ufl/indexing.py ufl/integral.py ufl/mathfunctions.py ufl/restriction.py ufl/tensoralgebra.py ufl/tensors.py ufl/variable.py
description:
Cleanup unnecessary use of str and repr in formatted strings:
"%s%r" % (a,b)
is always equivalent to
"%s%s" % (str(a), repr(b))

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

---

From: Anders Logg <[email-masked]>
Date: Fri, 15 Aug 2008 14:40:17 +0200

> We should have some more extensive tests of this though.

Has value_rank(), value_dimension() etc been removed?

-- 
Anders

---

From: "Martin Sandve Alnæs" <[email-masked]>
Date: Fri, 15 Aug 2008 15:09:34 +0200

> Has value_rank(), value_dimension() etc been removed?

Yes.

I kept UFLObject.rank for now, but implemented it as "return
len(self.shape())" in the baseclass and removed it from the
subclasses. This way I didn't have to fix all rank checks yet.

--
Martin

---

From: Anders Logg <[email-masked]>
Date: Fri, 15 Aug 2008 17:08:16 +0200

> subclasses. This way I didn't have to fix all rank checks yet.

ok, sounds good.

-- 
Anders