ufl team mailing list archive
-
ufl team
-
Mailing list archive
-
Message #00626
[HG UFL] Implemented Expr.evaluate function, evoced by __call__ operator like this:
One or more new changesets pushed to the primary ufl repository.
A short summary of the last three changesets is included below.
changeset: 493:2417909fd4fb81a9890f726c0f82efb942a2edb0
tag: tip
user: "Martin Sandve Alnæs <martinal@xxxxxxxxx>"
date: Sat Jan 10 17:25:39 2009 +0100
files: ufl/algebra.py ufl/conditional.py ufl/expr.py ufl/exproperators.py ufl/geometry.py ufl/indexing.py ufl/mathfunctions.py ufl/restriction.py ufl/scalar.py ufl/tensoralgebra.py ufl/tensors.py ufl/terminal.py ufl/variable.py ufl/zero.py
description:
Implemented Expr.evaluate function, evoced by __call__ operator like this:
x = cell.x
f = Function(element)
a = x[0]*f**2
x = (1.0, 2.0)
b = a(x, { f: 7 })
Some types are not implemented yet.
We could allow something else than scalar
values in argument mapping (the {f:7} part),
for example a callable that takes x as input.
changeset: 492:982082a9d9df0fad6ceab20e57f7a734d7aae9ea
user: "Martin Sandve Alnæs <martinal@xxxxxxxxx>"
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 <martinal@xxxxxxxxx>"
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.
----------------------------------------------------------------------
For more details, visit http://www.fenics.org/hg/ufl