Commit e892c60c authored by Célestin Marot's avatar Célestin Marot
Browse files

updated README to tell all the story :p

parent 1b91169e
The `hxtSPR()` function, given in HXTSPR.h, allows to find the best
The `hxtSPR()` function, given in `HXTSPR.h`, allows to find the best
tetrahedralization of a cavity in a relatively short time considering it is an
NP-hard problem. HXTSPR use a branch and bound algorithm first described in the
NP-hard problem. The implementation is described in the 28th IMR paper entitled
**Reviving the Search for Optimal Tetrahedralizations**.
## The story
HXTSPR use a branch and bound algorithm first described in the
2006 paper:
> "Optimal Tetrahedralization for Small Polyhedron: A New Local Transformation
> Strategy for 3-D Mesh Generation and Mesh Improvement"
> Optimal Tetrahedralization for Small Polyhedron: A New Local Transformation
> Strategy for 3-D Mesh Generation and Mesh Improvement
> (Liu, Jianfei and Sun, Shuli and Wang, Dachuan)
However, the basic branch and bound algorithm described in that paper is quite
slow, but the paper promise to describe some optimizations in a subsequent paper.
However, the following paper on the subject by the same main author,
released one year later does not describe any improvements over the basic
> Three-dimensional constrained boundary recovery with an enhanced Steiner
> point suppression procedure
> (Liu, Jianfei and Chen, Bin and Chen, Yongqiang)
Then, in 2009, Liu et al. released another paper describing several
optimizations, making their algorithm usable in practise:
> Small polyhedron reconnection for mesh improvement and its implementation
> based on advancing front technique
> (Liu, Jianfei and Chen, Y. Q. and Sun, S. L.)
Unfortunately, I skipped this one and didn't read it... (how dumb can one be ?)
For my defense, the abstract doesn't really advertise that the paper brings
several optimization that make it thousands of time faster than a basic
"almost brute-force" implementation. Also, when cited by other paper, I was
mistaking the 2009 article with the 2006 IMR proceeding that almost has the
same name
> Small Polyhedron Reconnection: A New Way to Eliminate Poorly-Shaped Tetrahedra
Therefore, in 2019, I (Célestin Marot) began my own implementation of the
*Small Polyhedron Reconnection* (SPR) with Kilian Verhetsel, under the
coordination of Jean-François Remacle.
Following our good results, we released a paper for the 28th International
Meshing Roundtable in Buffalo NY, entitled:
> **Reviving the Search for Optimal Tetrahedralizations**
> **(Marot, Célestin and Verhetsel, Kilian and Remacle, Jean-Francois)**
Like Liu et al. in their 2009 paper, we took advantage in the multiple undefined
points of the basic algorithm, namely the choice of *the digging face* and
*the order of candidate nodes*. However, our new implementation brings a few
However, the basic branch and bound algorithm described is quite slow. Several
optimizations are described in
- **the digging face** is not only chosen to have the worst quality, it also
has the least number of possible tetrahedra. In addition, the quality measure
can be a totally arbitrary user-defined function. In comparison, Liu et al.
use measure of angles that won't work with anysotropic meshes.
- **the order of candidate nodes** is chosen regarding multiple criteria that
are very different from Liu et al. A candidate node has is chosen in priority
- It is the opposite node in one, two or all adjacent triangles
- It is an interior node
- It appears in a lot of triangles
- It results in a good tetrahedron
Those criteria do not depend on the metric or the quality measure unlike the
criterium given by Liu et al.
- **Memoization**: we save known qualities and validity of tetrahedra. This
optimization has regularly shown speedups of 50,000 on 30 points cavities !
Because those worst cavities will generally take 99% of a program time, we
can safely say that this optimization alone makes this implementation far
- **open-source implementation** All the commented source code
of the SPR function lie in this repository.
## build test example in .5s
......@@ -27,6 +94,19 @@ optimizations are described in
git clean -f
## Documentation
`HXTSPR.h` contains the documentation on the `SPRCavity` structure and the
`hxtSPR(SPRCavity* c)` function. With the small example given in
`test.c`, it should be pretty straightforward to understand how the function
All optimization
The exact predicates of J.R. Shewchuk have seen a few improvements to make this
library thread-safe and also such that you can call `exactinit()` in other parts
of your code...
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment