Skip to content

HybridOctree_Hex_v1.0

Compare
Choose a tag to compare
@gt2001 gt2001 released this 12 Jan 22:07
· 297 commits to main since this release

Input

The program supports .raw input models. The format of a .raw file should look like this, below is a unit cube centered at (0, 0, 0):

8 12
-0.5 -0.5 -0.5
0.5 -0.5 -0.5
0.5 0.5 -0.5
-0.5 0.5 -0.5
-0.5 -0.5 0.5
0.5 -0.5 0.5
0.5 0.5 0.5
-0.5 0.5 0.5
0 1 2
0 3 2
4 5 6
4 7 6
0 1 5
0 4 5
1 2 6
1 5 6
2 3 7
2 6 7
0 3 7
0 4 7

Line 1 contains two integers, representing #vert and #elem.
Line 2 to Line #vert+1 contain three real numbers, representing xyz coordinates.
Line #vert+2 to Line #vert+#elem+1 contain three integers in [0, #vert), representing three indexes to form triangles.

Please replace the volumeFileName in Main.cpp Line 8 with your own input file name.

To make the mesh coarse (not recommended because it might cause wrong topology in the final mesh) or dense at detailed features, modify the C_THRES and H_THRES in Initialization.h Line 7, 8.

Output

The mesh result is in finalMesh.vtk.

Compile

Please compile with cmake. No third-party packages are needed.