Subject: [UFL-dev] legal form?

From: Kristian Oelgaard <[email-masked]>
Date: Mon, 02 Feb 2009 15:06:41 +0100

Hello,

Should the following form be legal in UFL?

element = FiniteElement("Lagrange", triangle, 1)
element1 = VectorElement("Lagrange", triangle, 1)

v = TestFunction(element)
u = TrialFunction(element)

V = TestFunction(element1)
U = TrialFunction(element1)

f = Function(element)

a = inner(V, U)*dx + f*v*u*dx

It passes the validate_form() in checks.py

However, extracting basisfunctions yield:
[BasisFunction(VectorElement('Lagrange', Cell('triangle', 1), 1, 2), -2),
BasisFunction(VectorElement('Lagrange', Cell('triangle', 1), 1, 2), -1)]

redefining the form:

a = f*inner(V, U)*dx + v*u*dx

The extract basis yield:

[BasisFunction(FiniteElement('Lagrange', Cell('triangle', 1), 1), -2),
BasisFunction(FiniteElement('Lagrange', Cell('triangle', 1), 1), -1)]

Kristian

---

From: Martin Sandve Alnæs <[email-masked]>
Date: Mon, 2 Feb 2009 16:14:32 +0100

Hi,
this shouldn't be legal, (u,U) and (v,V) here should be derived from
mixed elements to be used in the same form:

e = element + element1
v, V = TestFunctions(e)
u, U = TrialFunctions(e)

I guess we should add some sanity checks for BasisFunctions with
counts < 0 in validate_form().

Or how do you handle this in FFC?

Martin

On Mon, Feb 2, 2009 at 3:06 PM, Kristian Oelgaard
<[email-masked]> wrote:
> _______________________________________________
> UFL-dev mailing list
> [email-masked]
> http://fenics.org/mailman/listinfo/ufl-dev
>