# Point ordering for vtkLagrangeHexahedron?

**URL:** https://discourse.vtk.org/t/point-ordering-for-vtklagrangehexahedron/4253
**Category:** Support
**Created:** [September 18, 2020, 6:03pm UTC](https://discourse.vtk.org/t/point-ordering-for-vtklagrangehexahedron/4253 "2020-09-18T18:03:26Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![RonRahaman](https://discourse.vtk.org/user_avatar/discourse.vtk.org/ronrahaman/32/2350_2.png) [@RonRahaman](https://discourse.vtk.org/u/RonRahaman)
#### Post date: [September 18, 2020, 6:03pm UTC](https://discourse.vtk.org/t/point-ordering-for-vtklagrangehexahedron/4253/1 "2020-09-18T18:03:26Z")

</div>

I’m interested in using vtkLagrangeHexahedrons for my app (a spectral element simulation). I’ve written a simple example, but the surfaces look funky.

This is a 3rd order hex, and it’s labeled with the vertex IDs. I’ve set them up according to the diagrams [from this blog post](https://blog.kitware.com/modeling-arbitrary-order-lagrange-finite-elements-in-the-visualization-toolkit/).

Is there a problem with my point ordering? Or do you expect surfaces to look like this for the Lagrange hexes?

 ![Screen Shot 2020-09-18 at 12.46.21 PM](https://discourse.vtk.org/uploads/default/original/2X/9/963998fc6ede470b6081e5e46d7cf51c595e33c5.png)

Thanks!

---

<div class="post-metadata">

### Author: ![RonRahaman](https://discourse.vtk.org/user_avatar/discourse.vtk.org/ronrahaman/32/2350_2.png) [@RonRahaman](https://discourse.vtk.org/u/RonRahaman)
#### Post date: [September 18, 2020, 6:12pm UTC](https://discourse.vtk.org/t/point-ordering-for-vtklagrangehexahedron/4253/2 "2020-09-18T18:12:36Z")

</div>

BTW, [a comment in the ParaView forum](https://discourse.paraview.org/t/arbitary-order-lagrange-hexahedron-element-connectivity/1153/5) said there were some mistakes in the [KitWare blog post](https://blog.kitware.com/modeling-arbitrary-order-lagrange-finite-elements-in-the-visualization-toolkit/), but I can’t seem to track down the corrections.

---

<div class="post-metadata">

### Author: ![RonRahaman](https://discourse.vtk.org/user_avatar/discourse.vtk.org/ronrahaman/32/2350_2.png) [@RonRahaman](https://discourse.vtk.org/u/RonRahaman)
#### Post date: [September 18, 2020, 7:50pm UTC](https://discourse.vtk.org/t/point-ordering-for-vtklagrangehexahedron/4253/3 "2020-09-18T19:50:22Z")

</div>

I did some inspection and experimentation, and I found that I could get the expected cells by swapping:

- Face 40 \<–\> Face 32
- Face 44 \<–\> Face 36
- Edge (30,31) \<–\> Edge (28, 29)

Those numberings are based on the diagrams in the blog post.

With these swaps, it seems to make the ordering rules more consistent with the blog post’s text description. I’d still appreciate some verification, though! 🙂
