-Wunused-local-typedefs is a new warning flag of gcc-4.7, and it will enabled
by -Wall since gcc-4.8 (not yet released).
The fix is a big set of removals of unused typedefs (or comments, or moves,
depending on the context).
Bug reported by a user against CGAL-4.0.2
A single triangle cannot be meshed!
The fault was a buggy assertion added in the following revision:
|-----------------------------------------------------------------------
|r66359 | lrineau | 2011-11-16 18:58:22 +0100 (Wed, 16 Nov 2011) | 3 lines
|
|Add an assertion that checks that a point constructed as the midpoint of an
|edge is located either on the edge or inside one of the two incident faces.
|
|-----------------------------------------------------------------------
And the assertion message was:
terminate called after throwing an instance of 'CGAL::Assertion_exception'
what(): CGAL ERROR: assertion violation!
Expr: zone.locate_type != Tr::FACE || zone.fh == f || zone.fh == n
File: /home/lrineau/wc/Mesh_2/test/Mesh_2/../../include/CGAL/Mesh_2/Refine_edges.h
Line: 430
Explanation: Your data set contains at least a vertex that is very close to
a constrained edge! Mesh_2 cannot mesh that sort of data set.
If one wants to use Mesh_2 with Triangulation_2_projection_traits_3 (a
projection traits constructed with a normal vector), one cannot use a
default constructed geom traits, but only one passed on argument. Then the
criteria class needs to be constructed with tr.geom_traits() as argument.
"New directory Mesh_2/include/CGAL/Meshes/ that aggregates several
non documented files that are common to Mesh_2, Mesh_3 and Surface_mesher."
I forgot to commit the removal of old files.
Boost.Bimap is a bit faster (150-190% faster), and less
memory-consumer. Whereas the old Double_map implementation does not seem to
be sensitive to caching effects, the Bimap implementation seems to be
faster when run twice or more.
See the measurements bellow. Three runs of ./bench_double_map.bimap and
./bench_double_map.cgal. They are both compiled with -O2, and
./bench_double_map.bimap is compiled with -DCGAL_USE_BOOST_BIMAP
-I<path_to_boost_bimap>.
lrineau@tsetse ~/CGAL/Packages/Mesh_2/test/Mesh_2 $ for in in 1 2 3; do
echo 'BIMAP';
./bench_double_map.bimap 200000 30;
echo 'OLD DOUBLE_MAP';
./bench_double_map.cgal 200000 30;
done
BIMAP
Total time: 4.41933
Time for 'insert': 3.15152
Time for 'pop_front': 1.26781
Resident memory: 14843904
Virtual memory: 26423296
OLD DOUBLE_MAP
Total time: 6.581
Time for 'insert': 4.5593
Time for 'pop_front': 2.0217
Resident memory: 18030592
Virtual memory: 29519872
BIMAP
Total time: 3.56746
Time for 'insert': 2.49262
Time for 'pop_front': 1.07484
Resident memory: 14843904
Virtual memory: 26427392
OLD DOUBLE_MAP
Total time: 6.76597
Time for 'insert': 4.70729
Time for 'pop_front': 2.05869
Resident memory: 18034688
Virtual memory: 29519872
BIMAP
Total time: 3.51347
Time for 'insert': 2.43964
Time for 'pop_front': 1.07383
Resident memory: 14856192
Virtual memory: 26427392
OLD DOUBLE_MAP
Total time: 6.74597
Time for 'insert': 4.6183
Time for 'pop_front': 2.12768
Resident memory: 17854464
Virtual memory: 29523968
The following (commented) line triggered the error:
direct_func[rit->second] = rit;
The new following line fixes the bug. Actually, it is even more
efficient.
direct_func.insert(std::make_pair(rit->second, rit));
- factorize code in Is_locally_conforming_Gabriel and
Is_locally_conforming_Delaunay.
- all triangulation references are now named "tr" (instead of "ct").
(Tests OK)