Subject: [FEniCS-users] tensor function

From: Patrick Riesen <[email-masked]>
Date: Mon, 28 Sep 2009 14:15:17 +0200

Hi,

i'm stuck with a problem applying BCs in a mixed problem with a (tensor, 
vector, scalar)-element , so maybe i got something wrong and need to ask 
the following to assure myself:

if i have a function called 'e' which is a (2x2)-sized tensor function, 
say with components as

| a b |
| c d |

how do the subfunctions/subspaces correspond to the components?

is it a = e[0] , b = e[1], c = e[2], d = e[3] ?

or maybe

a = e[0], d = e[1], b = e[2], c = e[3] ?

and if the tensor function is in a mixed element, say evp = (e, v, p) it 
should not make a difference if i access the components with either

e = evp[0] and then a = e[0]

or directly,

a = evp[0][0] ?

thanks for your help

patrick

---

From: Anders Logg <[email-masked]>
Date: Mon, 28 Sep 2009 14:20:33 +0200

> a = e[0], d = e[1], b = e[2], c = e[3] ?

e[0] = (a, b)
e[1] = (c, d)

e[0][0] = a
e[0][1] = b
e[1][0] = c
e[1][1] = d

> e = evp[0] and then a = e[0]

Shouldn't matter, but it might depend on the circumstances. For
example, you need to use split() instead of [] in Python when
accessing sub functions.

--
Anders

---

From: Patrick Riesen <[email-masked]>
Date: Mon, 28 Sep 2009 14:34:30 +0200

Hi,

thans for the quick response,

therefore when V is the function space of the (e, v, p) element and

> e[1][1] = d 

therefore doing

fs = new SubSpace(V,0,0)

corresponds to the subspace for the two components (a, b) of the element 
  and not just for a, which then would be SubSpace(V,0,0,0) ?

> ------------------------------------------------------------------------
> 
> _______________________________________________
> FEniCS-users mailing list
> [email-masked]
> http://fenics.org/mailman/listinfo/fenics-users

---

From: Anders Logg <[email-masked]>
Date: Mon, 28 Sep 2009 16:01:34 +0200

On Mon, Sep 28, 2009 at 02:34:30PM +0200, Patrick Riesen wrote:
> corresponds to the subspace for the two components (a, b) of the
> element  and not just for a, which then would be SubSpace(V,0,0,0) ?

Yes.

--
Anders

---

From: Patrick Riesen <[email-masked]>
Date: Mon, 28 Sep 2009 16:08:06 +0200

this helped to sort things out, thanks again.
patrick

---

From: Patrick Riesen <[email-masked]>
Date: Wed, 30 Sep 2009 10:52:10 +0200