dolfin team mailing list archive
-
dolfin team
-
Mailing list archive
-
Message #12767
Re: Extracting vector field from a tensor field
On Sat, Mar 21, 2009 at 05:05:53PM +0100, Martin Sandve Alnæs wrote:
> Hi,
> now that we can use tensor elements in dolfin through UFL,
> what would be the easiest way to extract a row of a tensor
> field (Function over a TensorElement) as a vector field?
> I think scalar subcomponents can easily be extracted,
> but is it possible to piece these together to a vector field?
> Something like:
>
> Function v(V);
> Function a = A[0];
> Function b = A[1];
> v[0] = a;
> v[0] = b;
I don't understand. What is A and what dimension does v have?
We already have some support for this. For any mixed space one may
extract sub spaces and sub functions. Here's the favorite Stokes
example:
(W = V + Q)
Function w(W);
Function u = w[0]; // u vector-valued with d components
Function p = w[1]; // p scalar
Function ux = u[0]; // ux scalar
Function uy = u[1]; // uy scalar
--
Anders
Attachment:
signature.asc
Description: Digital signature
Follow ups
References