Releases: CMU-CBML/HybridOctree_Hex
HybridOctree_Hex_v1.3
Changes in v1.3
- Improved the initialization efficiency.
- Improved output message readability.
- Optimized default parameters.
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.
Parameters
The default parameters should work for most of the models, as they are relatively conservative (although this leads to some unnecessary elements).
- To adjust
the deepest octree level
, modify theVOXEL_SIZE
inInitialization.h Line 6
. Feasible values: 3, 4, 5, ..., 9. - To make the mesh
coarse/dense at detailed features
, modify theC_THRES
andH_THRES
inInitialization.h Line 7, 8
. Smaller C_THRES and H_THRES result in denser mesh.
Output
The mesh result is in finalMesh.vtk
. Notice that the program does not quit by itself. You can take the mesh result and terminate the program when you are satisfied with the mesh quality.
Compilation
Please compile with cmake. No third-party packages are needed.
Issue Report
Please report issues in the Issues
column or email me.
HybridOctree_Hex_v1.2
Changes in v1.2
- Improved the octree structure generation code speed.
- Modified default parameters for better performance.
- Cleaned unnecessary or even unused code, improved code readability.
- Improved output message readability.
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.
Parameters
The default parameters should work for most of the models, as they are relatively conservative (although this leads to some unnecessary elements).
- To adjust
the deepest octree level
, modify theVOXEL_SIZE
inInitialization.h Line 6
. Feasible values: 3, 4, 5, ..., 9. - To make the mesh
coarse/dense at detailed features
, modify theC_THRES
andH_THRES
inInitialization.h Line 7, 8
. Smaller C_THRES and H_THRES result in denser mesh.
Output
The mesh result is in finalMesh.vtk
. Notice that the program does not quit by itself. You can take the mesh result and terminate the program when you are satisfied with the mesh quality.
Compilation
Please compile with cmake. No third-party packages are needed.
Issue Report
Please report issues in the Issues
column or email me.
HybridOctree_Hex_v1.1
Changes in v1.1
- Supported Linux/Unix compilation.
- Improved the quality improvement code speed.
- Fixed a bug in smart Laplacian smoothing in the quality improvement code.
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.
HybridOctree_Hex_v1.0
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.