Subject: [FFC-dev] Further improvements of the Python interface. The reference tensor and [...]

From: [email-masked]
Date: Sat, 21 May 2005 02:24:52 +0200

Commit from logg (2005-05-21 02:24 CEST)
----------------

Further improvements of the Python interface. The reference tensor and
the primary and secondary indices for iteration over the reference
tensor are now easily accessible from the Python interface.

Here's a simple example for compiling Poisson:

from ffc.compiler.compiler import *

dx = Integral("interior")
k  = Index()

element = FiniteElement("Lagrange", "triangle", 3)

v = BasisFunction(element)
u = BasisFunction(element)
a = u.dx(k)*v.dx(k)*dx

form = compile(a, "Poisson")

A0 = form.reference_tensor()
indices_0 = form.primary_indices()
indices_1 = form.secondary_indices()

  ffc  src/ffc/compiler/form.py       1.10
  ffc  src/reference/Elasticity.h     1.14
  ffc  src/reference/Heat.h           1.14
  ffc  src/reference/Mass.h           1.2
  ffc  src/reference/NavierStokes.h   1.13
  ffc  src/reference/Poisson.h        1.14
  ffc  src/reference/PoissonSystem.h  1.14