Subject: [UFL-dev] [HG UFL] Removed AxisType, simplifying MultiIndex and related code a bit.

From: [email-masked] (UFL)
Date: Sat, 10 Jan 2009 15:14:02 +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:   492:982082a9d9df0fad6ceab20e57f7a734d7aae9ea
tag:         tip
user:        "Martin Sandve Alnæs <[email-masked]>"
date:        Sat Jan 10 15:14:29 2009 +0100
files:       ufl/algorithms/ufl2latex.py ufl/classes.py ufl/differentiation.py ufl/exproperators.py ufl/indexing.py ufl/tensors.py
description:
Removed AxisType, simplifying MultiIndex and related code a bit.
Indexing with an axis is now represented differently:

  A = <rank 2 tensor expression>
  b = A[i,:] # rank 1 expression with one free index

is the same as

  b = as_tensor(A[i,j], (j,))

or

  b = A[i,j](j)

using the previously checked in experimental syntax.

changeset:   491:a040706efebd95438b1bed69ac26258884f051da
user:        "Martin Sandve Alnæs <[email-masked]>"
date:        Sat Jan 10 14:03:56 2009 +0100
files:       test/test.py ufl/exproperators.py ufl/indexing.py
description:
Experimental syntax feature: using A(i,j) as short for as_tensor(A, (i,j)).
Example:

A = <rank 2 tensor expression>
a = A[i,j] # a represents the set of all scalar components of A
C = a(j,i) # C is a rank 2 tensor again (transpose of A actually)

Is this confusing? Obviously must be documented.

changeset:   490:e7cf673d1ce6df800e11e8f3117e0d3255315167
user:        "Martin Sandve Alnæs <[email-masked]>"
date:        Fri Jan 09 15:46:54 2009 +0100
files:       ufl/algorithms/old_ad.py
description:
removed old_ad.py

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

---

From: Anders Logg <[email-masked]>
Date: Sat, 10 Jan 2009 15:19:36 +0100

>   b = as_tensor(A[i,j], (j,))

The first one looks good to have (move from free-indexed expression to
tensor) but is it something that it should be mapped to __call__?

__call__ can be saved for other things like for example

  A[i,j](x)

which would be the value at a specific point x.

-- 
Anders

> _______________________________________________
> UFL-dev mailing list
> [email-masked]
> http://fenics.org/mailman/listinfo/ufl-dev

---

From: "Martin Sandve Alnæs" <[email-masked]>
Date: Sat, 10 Jan 2009 15:33:46 +0100

> which would be the value at a specific point x.

The __call__ mapping was just an experiment.
I agree it doesn't feel right, so I'll remove it.

Evaluating an expression at a specific point doesn't make much
sense without values for basis functions and functions though.
But it would be good to have for testing!

Martin