# Influence of node numbering in a FEM problem?

In a FEM mesh, does the order of node numbering in an element has any importance?

I'm currently trying to code my own FEM solver, which seems to work fine with quadrilateral elements, however I'm having difficulties whith triangular meshes, which yield different results when renumbering the nodes in the elements.

For example, given the following mesh:

The solver yields different results if I define e.g. element $[1]$ as $(1) (5) (4)$ or $(5) (4) (1)$

Is this a known issue, or is there something wrong with my code?

• Your code may (inadvertently) be assuming the node ordering is either clockwise or counterclockwise. If you are using numerical integration, check the sign of element area. – Bill Greene Jun 22 '18 at 10:27
• Note that in the example, both numbering are ccw, yet they yield different results. Yet seeing your answer I suppose it means it shouldn't matter, so the problem is elsewhere. Which I can't identify, and my code works fine with quad and line elements. – gazoh Jun 22 '18 at 10:30
• 154 is ccw, 451 is cw. Possibly your code is giving positive area for the first ordering and negative area for the second. – Bill Greene Jun 22 '18 at 10:34
• Right, I edited the question to 541. This wasn't my issue, just a typo in the question – gazoh Jun 22 '18 at 10:54
• Did you check the Jacobian in each case? – nicoguaro Jun 22 '18 at 13:16

1. Check $S^e_{1}$, the local stiffness matrix, and $T^e_{1}$, the local mass matrix, for element [1] for both cases of the node numbering. – there can be a bug in how the local matrices $S^e_{1}$ and $T^e_{1}$ are created (as noted in comments, one common bug is the sign for the area $A_1$ for CW and CCW node numbering).
2. Make sure that the numbering for the element [1] does not influence $S^e_{2,3,4}$ and $T^e_{2,3,4}$, the local stiffness and mass matrices for the remaining untouched elements.
3. Assemble the global stiffness matrix $S$ starting from elements [2], [3], and [4]. Then, compare, how your local stiffness matrix $S^e_{1}$ is added to the global stiffness matrix for both numberings.