On Tue, Aug 25, 2020 at 10:17 AM Karin&NiKo <niko.karin@gmail.com> wrote:
Hi Matthew,
I wonder how to retrieve the dof and support entities of the entries of an assembled matrix. To make it clearer, let's say I consider a coupled thermo poro elasticity problem that I discretize with Lagrange P2 elements for the displacement, Lagrange P1 for the pressure and Lagrange P1 for the temperature. I would like to know which nodes and degrees of freedom the values of the assembly matrix refer to.
I read that. I mean what is the endgame? Also note that I think this information is in the Section for the DM. I am not sure how to extract the Section. Thanks, Matt
Nicolas
Le mar. 25 août 2020 à 16:03, Matthew Knepley <knepley@gmail.com> a écrit :
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,
Matt
Nicolas
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
https://www.cse.buffalo.edu/~knepley/ <http://www.cse.buffalo.edu/~knepley/>
-- 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 https://www.cse.buffalo.edu/~knepley/ <http://www.cse.buffalo.edu/~knepley/>