Subject: [FFC-dev] scalar weight linear element

From: Vuk Milisic <[email-masked]>
Date: Wed, 25 Jun 2008 11:52:45 +0200

Hello,

If I have a mixed element and I want a scalar weight
for instance x[0], is the following piece of code correct ?

P2 = FiniteElement("Lagrange", "triangle", 2)

P1 = FiniteElement("Lagrange", "triangle", 1)

Vh = (P2 + P2 +P2) 

Th = Vh + P1

(v, q) = TestFunctions(Th)

(u, p) = TrialFunctions(Th)

(phi,pkmu) = Functions (Th)

Py = Function(P2)

a=(phi[i]*u[i]*v[i])*Py+pkmu*p*q

I can't compile that, something's wrong ?

VM

-- 

-----------------------------------
Vuk Milisic
Chargé de Recherche
LJK-IMAG UMR 5523
51, rue des Mathematiques -  B. P. 53 
38041 Grenoble Cedex 9  France 
Office   n° 66
Tel:  +33 4 76 63 57 38
Fax:  +33 4 76 63 12 63
http://ljk.imag.fr/membres/Vuk.Milisic/
-----------------------------------

---

From: Anders Logg <[email-masked]>
Date: Wed, 25 Jun 2008 12:39:07 +0200

> I can't compile that, something's wrong ?

You can't have an index appear three times in a term. The index 'i'
must appear exactly twice.

And you forgot to multiply by dx.

-- 
Anders