Subject: [FFC-dev] problems in splitting a mixed formulation

From: "Alessio Quaglino" <[email-masked]>
Date: Tue, 2 Oct 2007 10:20:51 +0200 (CEST)

I'm trying to split up a mixed formulation in the primitive forms to do
some benchmarks, but I get some errors. The simplest of my forms is:

name = "Divergence"
element1 = VectorElement("Lagrange", "tetrahedron", 1)
element2 = VectorElement("Discontinuous Lagrange", "tetrahedron", 0, 6)
element3 = FiniteElement("Lagrange", "tetrahedron", 1)

sigma = TrialFunctions(element2)
phi   = TestFunctions(element1)
dt_el3 = Function(element3)

def tomatrix(q):
    return [ [q[i + j + i * j - 4 * (j == 2) * (i == 2)] for i in
range(3)] for j in range(3) ]

sigmamatrix = tomatrix(sigma)
asigma	= dt_el3 * dot( sigmamatrix, grad(phi) )
a = ( asigma ) * dx

and I get the error:

Preprocessing form file: Divergence.form --> Divergence.py
*** Error at ( | vi-2[0],  | vi-2[1],  | vi-2[2])
*** Shape dimension is not defined for given expression.

Am I doing something wrong?

Alessio

---

From: Kristian Oelgaard <[email-masked]>
Date: Tue, 02 Oct 2007 10:31:16 +0200

> Am I doing something wrong?

Skip the plural (s) in TestFunctions and TrialFunctions

Kristian

> Alessio
> 
> _______________________________________________
> FFC-dev mailing list
> [email-masked]
> http://www.fenics.org/mailman/listinfo/ffc-dev
>