Dear Domenico, In the two assembly languages, the gradient has indeed the dimension of the mesh, i.e. a 3D one in this case. It is along the tangent direction of the line in this case. One way to obtain the tangent vector is to use "element_K" from the high-level generic assembly (gradient of the geometric transformation). The assembly string " -p*Grad_u.element_K " should work. May be "element_K" have to be transposed.
Additionally, if you need to interpolate some field from the 3D mesh to the 1D mesh and perform some matrix assembly, the use of the high-level generic assembly is far more simple (see http://download.gna.org/getfem/html/homepage/userdoc/gasm_high.html#interpolate-transformations). Yves. ----- Original Message ----- From: "Domenico Notaro" <[email protected]> To: "getfem-users" <[email protected]> Sent: Sunday, July 26, 2015 7:30:42 PM Subject: [Getfem-users] Assembly of 1D Poiseuille term Dear Users, I am studying a coupled 3D-1D problem, for the sake of simplicity let's imagine a straight line immersed in a box. I am wondering how to assemble the matrix corresponding to the weak formulation of the Poiseuille term in the 1D problem, -(p, du/ds), being p the pressure of the fluid inside the segment, u the velocity and s the arc length along the segment. I have to idea how to write the derivative inside the generic_assembly since the only way I know to compute derivate is "Gradient(#..)" that is a vector. Do I need to project the gradient along the direction of the segment? If this is the case, I don't know how to compute the tangent versor. Thank you in advance. Regards, domenico_notaro _______________________________________________ Getfem-users mailing list [email protected] https://mail.gna.org/listinfo/getfem-users _______________________________________________ Getfem-users mailing list [email protected] https://mail.gna.org/listinfo/getfem-users
