ufl team mailing list archive
-
ufl team
-
Mailing list archive
-
Message #01628
Re: Enriching mixed element
-
To:
Mehdi <m.nikbakht@xxxxxxxxxx>
-
From:
Marie Rognes <meg@xxxxxxxxx>
-
Date:
Wed, 16 Jun 2010 15:04:28 +0200
-
Cc:
ufl@xxxxxxxxxxxxxxxxxxx
-
In-reply-to:
<1276692941.2304.52.camel@Mehdi-laptop>
-
User-agent:
Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.9) Gecko/20100516 Thunderbird/3.0.4
On 16. juni 2010 14:55, Mehdi wrote:
> Hello,
>
> Assume the enriched element defined inside Mini.ufl,
>
> P1 = VectorElement("Lagrange", triangle, 1)
> B = VectorElement("Bubble", triangle, 3)
> Q = FiniteElement("CG", triangle, 1)
>
> Mini = (P1 + B)*Q
>
> We Have defined Function Space V on this element and a function u on V,
>
> Function U(V);
>
> One can access to the sub functions of this mixed space by using
>
> Function& u = U[0];
> Function& p = U[1];
>
> However, we can't have access to the sub components of u. The problem is
> when we define enriched element for the vector elements, ufl assumes
> that
>
> P1 + B = (P1_x*P1_y) + (B_x*B_y)
>
> Isn't this more natural and consistent, if we interpret this as,
>
> P1 + B = (P1_x + B_x)*(P1_y + B_y)
>
> If we do so, we can access to the sub functions of u easily.
>
It makes perfect sense to me that an enriched mixed element is an
enriched element.
Correspondingly a mixed enriched element is a mixed element, cf:
# Create enriched mixed element
P1 = VectorElement("Lagrange", triangle, 1)
B = VectorElement("Bubble", triangle, 3)
element = P1 + B
# Create mixed enriched element
P1 = FiniteElement("Lagrange", triangle, 1)
B = FiniteElement("Bubble", triangle, 3)
element = (P1 + B)*(P1 + B)
Maybe the second version is what you want?
--
Marie
References