# Arbitary Order Lagrange Hexahedron Element Connectivity

**URL:** https://discourse.paraview.org/t/arbitary-order-lagrange-hexahedron-element-connectivity/1153
**Category:** ParaView Support
**Created:** [January 19, 2019, 2:45am UTC](https://discourse.paraview.org/t/arbitary-order-lagrange-hexahedron-element-connectivity/1153 "2019-01-19T02:45:06Z")
**Posts on this page:** 11
**Page:** 1

<div class="post-metadata">

### Author: ![vrkssai](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/v/e19b73/32.png) [@vrkssai](https://discourse.paraview.org/u/vrkssai)
#### Post date: [January 19, 2019, 2:45am UTC](https://discourse.paraview.org/t/arbitary-order-lagrange-hexahedron-element-connectivity/1153/1 "2019-01-19T02:45:07Z")

</div>

The new versions of ParaView(5.5 and above) supports arbitary order lagrange hexahedron elements. The ordering of the points (lagrange points facepoints+interior+corners)associated with the elements hasn’t been provided either in the ParaView reference guide or in VTK file format specification in VTK guide. (For simple hex the ordering of nodes is clockwise from inside the cell for one face and similar for the nodes in the opp face ). How do we figure such ordering or pattern for the Arbitary Order Lagrange Hexahedron ?

---

<div class="post-metadata">

### Author: ![cory.quammen](https://discourse.paraview.org/user_avatar/discourse.paraview.org/cory.quammen/32/11193_2.png) [@cory.quammen](https://discourse.paraview.org/u/cory.quammen)
#### Post date: [January 20, 2019, 3:03pm UTC](https://discourse.paraview.org/t/arbitary-order-lagrange-hexahedron-element-connectivity/1153/2 "2019-01-20T15:03:45Z")

</div>

@tjcorona or @dcthomp should know.

---

<div class="post-metadata">

### Author: ![vrkssai](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/v/e19b73/32.png) [@vrkssai](https://discourse.paraview.org/u/vrkssai)
#### Post date: [January 24, 2019, 6:34pm UTC](https://discourse.paraview.org/t/arbitary-order-lagrange-hexahedron-element-connectivity/1153/3 "2019-01-24T18:34:14Z")

</div>

I haven’t had luck messaging them, anyway I could get any leads on the topic? Anything however small is appreciated

---

<div class="post-metadata">

### Author: ![cory.quammen](https://discourse.paraview.org/user_avatar/discourse.paraview.org/cory.quammen/32/11193_2.png) [@cory.quammen](https://discourse.paraview.org/u/cory.quammen)
#### Post date: [February 5, 2019, 3:47pm UTC](https://discourse.paraview.org/t/arbitary-order-lagrange-hexahedron-element-connectivity/1153/4 "2019-02-05T15:47:03Z")

</div>

Here is a blog post @tjcorona and @dcthomp wrote that should shed light on the ordering.

> **[Modeling Arbitrary-order Lagrange Finite Elements in the Visualization Toolkit -...](https://blog.kitware.com/modeling-arbitrary-order-lagrange-finite-elements-in-the-visualization-toolkit/)**
>
> Two techniques that are used by simulations are geometric refinement (also known as hierarchical refinement, or h-refinement) and polynomial refinement (also known as p-refinement). Traditional ... Read More

---

<div class="post-metadata">

### Author: ![vrkssai](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/v/e19b73/32.png) [@vrkssai](https://discourse.paraview.org/u/vrkssai)
#### Post date: [February 5, 2019, 8:29pm UTC](https://discourse.paraview.org/t/arbitary-order-lagrange-hexahedron-element-connectivity/1153/5 "2019-02-05T20:29:11Z")

</div>

The comments under the blogpost actually helped me find the solution, someone spotted a few mistakes in the blogpost as well. Thanks for the solution !

---

<div class="post-metadata">

### Author: ![RonRahaman](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/r/aca169/32.png) [@RonRahaman](https://discourse.paraview.org/u/RonRahaman)
#### Post date: [September 18, 2020, 6:07pm UTC](https://discourse.paraview.org/t/arbitary-order-lagrange-hexahedron-element-connectivity/1153/6 "2020-09-18T18:07:58Z")

</div>

@vrkssai Do you recall what the mistakes in that blog post were? The comments aren’t visible anymore. I set up my problem according to the diagrams, but it really seems like there’s a problem with the point ordering…

---

<div class="post-metadata">

### Author: ![vrkssai](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/v/e19b73/32.png) [@vrkssai](https://discourse.paraview.org/u/vrkssai)
#### Post date: [September 23, 2020, 12:31am UTC](https://discourse.paraview.org/t/arbitary-order-lagrange-hexahedron-element-connectivity/1153/7 "2020-09-23T00:31:51Z")

</div>

Yes, their node ordering was wrong. I would suggest going through the Paraview Reader/Writer code on Gitlab. It would be a C++ file which has all the logic reader/writer uses for lagrange hexahedron. From that you can use it in whatever application you need. I’ll see if I can find the file.

---

<div class="post-metadata">

### Author: ![vrkssai](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/v/e19b73/32.png) [@vrkssai](https://discourse.paraview.org/u/vrkssai)
#### Post date: [September 23, 2020, 12:53am UTC](https://discourse.paraview.org/t/arbitary-order-lagrange-hexahedron-element-connectivity/1153/8 "2020-09-23T00:53:55Z")

</div>

I found the file its this one.[vtkHigherOrderHexahedron.cxx](https://discourse.paraview.org/uploads/short-url/v5UJUCwAp6BgMGIwDoSa3SVaupe.cxx) (24.6 KB)

Location: Common/DataModel/vtkHigherOrderHexahedron.cxx  
Look at lines from 607, function : int vtkHigherOrderHexahedron::PointIndexFromIJK(int i, int j, int k, const int\* order), this should have all the information you need.

---

<div class="post-metadata">

### Author: ![RonRahaman](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/r/aca169/32.png) [@RonRahaman](https://discourse.paraview.org/u/RonRahaman)
#### Post date: [September 23, 2020, 2:12pm UTC](https://discourse.paraview.org/t/arbitary-order-lagrange-hexahedron-element-connectivity/1153/9 "2020-09-23T14:12:15Z")

</div>

Wonderful, thanks!

---

<div class="post-metadata">

### Author: ![vrkssai](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/v/e19b73/32.png) [@vrkssai](https://discourse.paraview.org/u/vrkssai)
#### Post date: [September 23, 2020, 2:13pm UTC](https://discourse.paraview.org/t/arbitary-order-lagrange-hexahedron-element-connectivity/1153/10 "2020-09-23T14:13:39Z")

</div>

May I ask what are you working on? DG or FEM?

---

<div class="post-metadata">

### Author: ![RonRahaman](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/r/aca169/32.png) [@RonRahaman](https://discourse.paraview.org/u/RonRahaman)
#### Post date: [September 23, 2020, 2:20pm UTC](https://discourse.paraview.org/t/arbitary-order-lagrange-hexahedron-element-connectivity/1153/11 "2020-09-23T14:20:27Z")

</div>

Spectral element methods, actually
