On Tue, Aug 25, 2020 at 10:01 AM Karin&NiKo <niko.karin@gmail.com> wrote:Of course!So I can interpolate the mesh coordinates into the vector space. Then I have to know how the degrees of freedom are numbered, haven't I?Is it : [n0_u0, n0_u1, n0_u2, n0_p, n0_t, n1_u0, n1_u1, n1_u2, n1_p, n1_t, ...] or [n0_u0, n1_u0, n2_u0, ....., n0_u1, n1_u1, n2_u1, ...., n0_u2, n1_u2, ....] , n stands for a "node", ui for the i-th component of the vector space Vu, p for the Vp DOF and t for the Vt DOF ?Hi Nicolas,What are you trying to do overall?Thanks,MattNicolas_______________________________________________Le mar. 25 août 2020 à 15:34, Lawrence Mitchell <wence@gmx.li> a écrit :
> On 25 Aug 2020, at 14:31, Karin&NiKo <niko.karin@gmail.com> wrote:
>
> I feel sorry to bother you again but something is going wrong. Here is my script :
>
> from firedrake import *
>
> nbx = 1
> nby = 1
> lx = 0.5
> ly = 0.5
> mesh = RectangleMesh(nbx, nby, lx, ly, quadrilateral=False)
>
> Vu = VectorFunctionSpace(mesh, "Lagrange", 2)
> Vp = FunctionSpace(mesh, "Lagrange", 1)
> Vt = FunctionSpace(mesh, "Lagrange", 1)
> Z = Vu * Vp * Vt
>
> dof_coord = Function(Z)
> for fn in dof_coord.split():
> fn.interpolate(mesh.coordinates)
The mesh.coordinates function is in a vector space, and Vp and Vt are both scalar spaces, so you can't interpolate from one into the other.
Lawrence
firedrake mailing list
firedrake@imperial.ac.uk
https://mailman.ic.ac.uk/mailman/listinfo/firedrake
--What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.
-- Norbert Wiener