← Back to team overview

ufl team mailing list archive

Re: FiniteElement classes

 

Martin Sandve Alnæs wrote:
2008/3/14, Anders Logg <logg@xxxxxxxxx>:
On Thu, Mar 13, 2008 at 05:46:03PM -0400, Marie Rognes wrote:
'>  > Just a comment: I typically want to write something like
 >
 >     VectorElement("Nedelec", ...)
 >
 > in order to have a vector of Nedelec elements...!

So, does that represent a tensor field?

For instance, yes.

I've implemented value_rank()
in the VectorElement and TensorElement that way, so the value rank of
a VectorElement is the value rank of the subelement (Nedelec) plus
one. Thus each row of the tensor is represented by a Nedelec element.

If you want a set of vector elements instead:
  fe = FiniteElement("Nedelec",...)
  me = MixedElement(fe, fe, fe)
  # or
  me = fe+fe+fe
should also work. The value rank of a MixedElement constructed one of
these ways is undefined, since Functions should be defined over its
subelements anyway.


I'm sure this works well. It is just a matter of philosophy in the naming, I guess. A VectorElement could either represent a vector field or a vector of elements... To me, the latter is the most intuitive, but that's probably just because that's what I'm used to ;)

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



References