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: example 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?

  • 3
    $\begingroup$ 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. $\endgroup$ – Bill Greene Jun 22 '18 at 10:27
  • $\begingroup$ 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. $\endgroup$ – gazoh Jun 22 '18 at 10:30
  • $\begingroup$ 154 is ccw, 451 is cw. Possibly your code is giving positive area for the first ordering and negative area for the second. $\endgroup$ – Bill Greene Jun 22 '18 at 10:34
  • $\begingroup$ Right, I edited the question to 541. This wasn't my issue, just a typo in the question $\endgroup$ – gazoh Jun 22 '18 at 10:54
  • $\begingroup$ Did you check the Jacobian in each case? $\endgroup$ – nicoguaro Jun 22 '18 at 13:16

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 [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.
  4. Compare the RHSs for both numberings of the element [1].
  • $\begingroup$ 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.) $\endgroup$ – 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


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.