Skip to content

Releases: CMU-CBML/HybridOctree_Hex

HybridOctree_Hex_v1.3

06 Mar 02:28
Compare
Choose a tag to compare

Changes in v1.3

  1. Improved the initialization efficiency.
  2. Improved output message readability.
  3. 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).

  1. To adjust the deepest octree level, modify the VOXEL_SIZE in Initialization.h Line 6. Feasible values: 3, 4, 5, ..., 9.
  2. To make the mesh coarse/dense at detailed features, modify the C_THRES and H_THRES in Initialization.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

01 Feb 03:56
344cb8f
Compare
Choose a tag to compare

Changes in v1.2

  1. Improved the octree structure generation code speed.
  2. Modified default parameters for better performance.
  3. Cleaned unnecessary or even unused code, improved code readability.
  4. 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).

  1. To adjust the deepest octree level, modify the VOXEL_SIZE in Initialization.h Line 6. Feasible values: 3, 4, 5, ..., 9.
  2. To make the mesh coarse/dense at detailed features, modify the C_THRES and H_THRES in Initialization.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

16 Jan 08:56
46f4fef
Compare
Choose a tag to compare

Changes in v1.1

  1. Supported Linux/Unix compilation.
  2. Improved the quality improvement code speed.
  3. 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

12 Jan 22:07
Compare
Choose a tag to compare

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.