# 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 $$ 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

## 2 Answers

There are a couple of places inside your code to look at:

1. Check $S^e_{1}$, the local stiffness matrix, and $T^e_{1}$, the local mass matrix, for element  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  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 , , and . Then, compare, how your local stiffness matrix $S^e_{1}$ is added to the global stiffness matrix for both numberings.
4. Compare the RHSs for both numberings of the element .
• Thanks for the tips, this inderctly answers my question: node numbering should'nt matter. Turns out the computation of my stiffness matrix was all wrong (but somehow errors canceled each other out for rectangular quads.) – gazoh Jun 25 '18 at 6:46

I think I face the same problem with you. I have the different result for clockwise and counterclockwise local numbering. I am using triangular element. I have just found that either it clockwise or counterclockwise local numbering should have the same result as long as we are correct to put the sign in the local stiffness matrix. The rule as I just read from the references is that if local numbering direction is opposite to the global numbering you put the minus sign for the local numbering stiffnes matrix and vice versa. For the details you can read this references https://drive.google.com/file/d/1Xd2gq8q6REr8DX1fumFxh8kYNaXG1I0o/view?usp=sharing