## libmesh-users

 Re: [Libmesh-users] About libMesh node numbering From: John Peterson - 2009-07-13 18:39:06 On Mon, Jul 13, 2009 at 12:11 PM, wrote: > Hi John: >   I'm currently working on a problem that might be implemented with libMesh. > It requires a change of variables from global to local coordinates. The > nodes have to be inputed in the mapping equation in a certain order so that > the jacobian is not negative. > Can you recommend a reference that explains why this is tha case? Sure, I usually think of this in terms of cross products. Wikipedia explains this well for the (positive) area of a 2D parallelogram. http://en.wikipedia.org/wiki/Cross_product#Geometric_meaning The area is defined to be positive according to the usual "right-hand rule" convention. The 2D elements in LibMesh follow this convention. Also, any finite element book which is in print today should explain it. > The numbering is based on convention and is dependent on the library. > Do you know what convention libMesh uses for this? Generally counter-clockwise node numbering for 2D elements. All the element's numbering schemes can be seen in their respective header files, e.g. include/geom/face_tri3.h. > Do you have any paper about libMesh that adresses this issue? There is a libmesh paper, but it doesn't really address these issues. Other than the libmesh-users mailing list (where I copied this message) you should also check out an introductory FEM text. -- John 
 Re: [Libmesh-users] About libMesh node numbering From: John Peterson - 2009-07-17 10:23:52 On Wed, Jul 15, 2009 at 7:17 PM, wrote: > The jacobian for a 2d triangular element is a constant. I heard that for a > quadratic 2d triangular element the jacobian should be linear but I'm > getting a quadratic one (I'm using classical coordinate transformations: x = > ax' + by' + cx'y' + dx'^2 + ey'^2). It should be the same in natural > coordinates. Should the final result be linear? The 2D Jacobian is a 2x2 matrix given by [dx/dxi, dx/deta] [dy/dxi, dy/deta] Expressing x (resp y.) in terms of the quadratic basis functions phi: x = \sum_i x_i \phi_i and differentiating, you should be able to convince yourself that the entries of the Jacobian for the quadratic triangular element are linear in xi and eta, the coordinates of the reference element. Give it a try, the basis functions for the TRI6 can be found in src/fe/fe_lagrange_shape_2D.C starting at line 158. -- John