← Back to team overview

ffc team mailing list archive

Re: [DOLFIN-dev] Dimension d in elasticity module

 

On Fri, Oct 07, 2005 at 04:58:10PM +0200, Garth N. Wells wrote:

> Knowing the tensor rank and dimension of each field of a mixed formulation would
> be useful for extracting "subfunctions".

You can access the list of elements that compose a mixed element
through the member variable elements:

e0 = FiniteElement(...)
e1 = FiniteElement(...)

element = e0 + e1

rank_0 = element.elements[0].rank()
rank_1 = element.elements[1].rank()

But maybe you mean that you need this is information to be included in
the generated code so it can be accessed in DOLFIN? We could do that,
and it would make it possible to implement some more advanced
functionality for the Function class in DOLFIN, like slicing out
subfunctions:

Function w(...);
Function u(w, 0, 2); // Components 0-1
Function p(w, 2);    // Component 2

/Anders



Follow ups