← Back to team overview

ufl team mailing list archive

Re: FiniteElement classes

 

Martin Sandve Alnæs wrote:
Take a look at the file elements2.py in the latest ufl hg repository.
Is this ok?

Instead of

fe = FiniteElement("CG", ...) # scalar element
fe = FiniteElement("Nedelec", ...) # vector element
fe = VectorElement("CG", ...) # vector element
fe = VectorElement("Nedelec", ...) # invalid element


Just a comment: I typically want to write something like

   VectorElement("Nedelec", ...)

in order to have a vector of Nedelec elements...!


this goes like

fe = ScalarElement("CG", ...) # scalar element
fe = ScalarElement("Nedelec", ...) # invalid element
fe = VectorElement("CG", ...) # vector element
fe = VectorElement("Nedelec", ...) # vector element

It's up to the form compiler to say wether an element family makes
sense as a scalar/vector/tensor element or not, UFL expressions only
care about the polygon and value shape.


--
Marie E. Rognes
Ph.D Fellow, Centre of Mathematics for Applications, University of Oslo
http://folk.uio.no/meg



Follow ups

References