# Hexahedron Dominant Meshing with Hexahedron and Tetrahedron Elements only

**URL:** https://discourse.paraview.org/t/hexahedron-dominant-meshing-with-hexahedron-and-tetrahedron-elements-only/11922
**Category:** ParaView Support
**Created:** [April 19, 2023, 12:49am UTC](https://discourse.paraview.org/t/hexahedron-dominant-meshing-with-hexahedron-and-tetrahedron-elements-only/11922 "2023-04-19T00:49:20Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![netsonicyxf](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/n/f14d63/32.png) [@netsonicyxf](https://discourse.paraview.org/u/netsonicyxf)
#### Post date: [April 19, 2023, 12:49am UTC](https://discourse.paraview.org/t/hexahedron-dominant-meshing-with-hexahedron-and-tetrahedron-elements-only/11922/1 "2023-04-19T00:49:20Z")

</div>

In most cases the Hexahedron Dominant Meshing will include Hexahedron, Pentahedron, Pyramid and Tetrahedron elements.

I want to  
generate the Hexahedron Dominant Meshing with Hexahedron Dominant and Tetrahedron only.  
or  
convert the Hexahedron Dominant Meshing into a new mesh with Hexahedron Dominant and Tetrahedron only.

I found an old thread [[Gmsh] Regular mesh only composed by tetrahedra](http://onelab.info/pipermail/gmsh/2019/013408.html), it mentioned that:

> 1. Export a GMSH mesh composed of hexaedra in VTK.
> 2. **Open it in ParaView and apply the filter _Tetrahedralize_ to create a**  
> **tetrahedral mesh**.
> 3. Click on _Save Data_ to save it as VTU.

Is it possible to export the non-Hex elements only and use ParaView to convert them to tet elements?  
Or is there other way to do this?

---

<div class="post-metadata">

### Author: ![RHMoore](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/r/898d66/32.png) [@RHMoore](https://discourse.paraview.org/u/RHMoore)
#### Post date: [April 25, 2023, 7:57pm UTC](https://discourse.paraview.org/t/hexahedron-dominant-meshing-with-hexahedron-and-tetrahedron-elements-only/11922/2 "2023-04-25T19:57:20Z")

</div>

> [@netsonicyxf](#):
>
> Pentahedron

Since I did not see any reply for this item, I’ll take a quick stab at the issue, in case you want to write your own filter.

Assume that a Pentahedron can take two forms:

1. One quadrilateral base, like a pyramid. For this case, split it into two tetrahedra by making a diagonal along the quadrilateral base. You can split it one of two ways. I would split it using the diagonal that makes the best tetrahedra quality. The same split is performed on Pyramid elements.
2. Three quadrilateral sides, like a triangular prism. For this case, there are 6 choices. For one node, add lines to the two nodes it is not already connected to. This splits it into 2 tetrahedron. Pick the best node of the 6 in terms of shape quality.

For shape quality, I used Shewchuk’s scale invariant quality metric from the middle of Table 4.

> **[elemj.pdf](https://people.eecs.berkeley.edu/~jrs/papers/elemj.pdf)**
>
> 1161.65 KB

![image](https://discourse.paraview.org/uploads/default/original/2X/e/efd16b2747e1fc5a3bb8ea880b02cc8fb40fccf2.png)

For any reader who wants pictures of Pentahedron elements, see:

> **[Pentahedron -- from Wolfram MathWorld](https://mathworld.wolfram.com/Pentahedron.html)**
>
> A pentahedron is polyhedron having five faces. Because there are two pentahedral graphs, there are two convex pentahedra, corresponding to the topologies of the square pyramid and the triangular prism. F E V name 5 5 8 square pyramid 5 6 9 triangular...
