Commit Graph

348 Commits

Author SHA1 Message Date
Sébastien Loriot 19ab4c1907 fix non utf-8 character 2017-01-19 15:20:24 +01:00
Andreas Fabri f9ada57886 Mesh_2: Initialize to avoid warning 2016-11-14 09:14:30 +01:00
Laurent Rineau 3f052834bd Split Mesh_2
There is a new `Mesher_level` package, that gathers the foundation
files (mesher levels and auxiliary files) for `Mesh_2`,
`Surface_mesher`, and `Mesh_3`.
2016-09-30 15:23:16 +02:00
Laurent Rineau 51f5697d3d Add missing #include 2016-09-30 15:23:14 +02:00
Laurent Rineau a59084cc79 Fix missing includes 2016-09-30 15:22:26 +02:00
Andreas Fabri aff5dbc5c9 check for boost version < 1.60 2016-02-15 19:15:06 +01:00
Simon Giraudot 6607436610 Move #pragma at beginning/end of document 2016-02-05 15:32:19 +01:00
Andreas Fabri c473841ad2 suppress a warning 2016-02-05 14:59:10 +01:00
Sébastien Loriot 443b8cc2d7 precompute area functor 2016-02-01 10:23:29 +01:00
Sébastien Loriot 72c8aa7b05 make 2D-lloyd working with the projection traits 2016-01-29 15:16:51 +01:00
Laurent Rineau e0f8f4f85f Refresh the branch Mesh_3-manifold_criterion-lrineau
For the moment, the manifold feature is no longer working.

Merge remote-tracking branch 'cgal-dev/Mesh_3-manifold_criterion-lrineau' into Mesh_3-manifold_criterion-lrineau

Conflicts:
	Mesh_3/include/CGAL/Mesh_3/Mesh_complex_3_in_triangulation_3_base.h
	Mesh_3/include/CGAL/Mesh_3/Mesher_3.h
	Mesh_3/include/CGAL/Mesh_3/Refine_facets_3.h
	Polyhedron/demo/Polyhedron/Polyhedron_3.cpp
	Polyhedron/demo/Polyhedron/Polyhedron_demo_mesh_3_plugin.cpp
	Polyhedron/demo/Polyhedron/Polyhedron_demo_mesh_3_plugin_cgal_code.cpp
2015-12-18 14:55:20 +01:00
Andreas Fabri 0e59c3488a 12 -> 8 2015-12-07 17:36:11 +01:00
Andreas Fabri dd17f1ad5d Set BOOST_PARAMETER_MAX_ARITY to the needed value in the concerned packages 2015-12-01 17:05:53 +01:00
Andreas Fabri 2ce8b07ec0 Define BOOST_PARAMETER_MAX_ARITY in <CGAL/config.h>
This macro has to be larger than the default value
and it must be set before including <boost/parameter.hpp>

Instead of setting it to 12 in the packages that
need it, we do this in <CGAL/config.h> and produce
an error if a user has set it to a value < 12
2015-11-16 11:21:31 +01:00
Jane Tournois 1de18c20a8 avoid returning a ref to temporary object 2015-06-01 14:50:51 +02:00
Jane Tournois 81d77803d3 avoid storing a std::pair
this is an attempt to fix the compilation error in the testsuite
for clang-6.0 and cpp11
2015-06-01 14:50:40 +02:00
Jane Tournois 828eed2b24 calling a constructor from a constructor is cpp11 2015-05-19 10:01:00 +02:00
Jane Tournois 8511ff88b8 add copyright 2015-05-19 09:07:54 +02:00
Jane Tournois 13aa560db6 fix warning about variable "tr" not used 2015-05-19 09:07:54 +02:00
Jane Tournois 3f798a6542 add another pragma to ignore warning from clang 2015-05-19 09:04:28 +02:00
Jane Tournois 8e61cfdd49 new attempt to fix unused variables warning from boost with clang
and add namespace CGAL for Lloyd 2D parameters
2015-05-19 09:04:28 +02:00
Jane Tournois 6808066af3 fix warning from boost with gcc 2015-05-19 09:04:28 +02:00
Andreas Fabri 2cda7ff7f6 min() -> (min)() 2015-05-19 09:04:28 +02:00
Andreas Fabri 74c817fe7f Add an include 2015-05-19 09:04:27 +02:00
Jane Tournois 0c6b51f46f add newline at end of file
fix warnings
2015-05-19 09:04:27 +02:00
Jane Tournois 9322f881c5 fix unused variable, and implement barycentric coordinates on an edge 2015-05-19 09:04:27 +02:00
Jane Tournois cc801f779f fix unused parameter warnings 2015-05-19 09:04:26 +02:00
Jane Tournois 1517354702 fix unused variable warning 2015-05-19 09:04:26 +02:00
Jane Tournois f8c3ef0a30 fix compilation for (max) 2015-05-19 09:04:26 +02:00
Sébastien Loriot 7cabb0c508 Merge branch 'rebase/Mesh_2-add_optimizers-GF-old' into rebase/Mesh_2-add_optimizers-GF
Conflicts:
	GraphicsView/demo/Triangulation_2/Constrained_Delaunay_triangulation_2.cpp
	GraphicsView/demo/Triangulation_2/Constrained_Delaunay_triangulation_2.ui
	Triangulation_2/include/CGAL/Constrained_Delaunay_triangulation_2.h
2015-05-19 09:01:20 +02:00
Sébastien Loriot 67049fbdd4 add missing typename 2015-05-19 08:54:37 +02:00
Sébastien Loriot f4addd127b fix compilation issue with g++ 2015-05-19 08:54:36 +02:00
Jane Tournois 83c415bca9 move Mesh_optimization_return_code from Mesh_3 to Mesh_2
Mesh_3 already depends on Mesh_2,
but not the other way around
2015-05-19 08:54:36 +02:00
Jane Tournois c7138ff48d add barycentric coordinates to compute sizing at p inside a face
+ add code to interpolate on finite vertices of an infinite face

they are not used by default because it's expensive, unless the macro
CGAL_MESH_2_SIZING_FIELD_USE_BARYCENTRIC_COORDINATES is defined.
Can be useful to be more precise about the sizing
2015-05-19 08:54:35 +02:00
Jane Tournois 717e795c1a make the specification of DelaunayMeshFaceBase_2 complete
+ change access functions names to make them conform to CGAL
+ add preconditions in the code
2015-05-19 08:54:33 +02:00
Jane Tournois 4cf8655c00 move all the cdt.dual(v) code from Triangulation_2 to Mesh_2
we do not change the API of Triangulation_2 for now
maybe later, and this version should be easy to keep backward compatible
2015-05-19 08:54:33 +02:00
Jane Tournois 2b7d774c36 fix the convergence criterion 2014-11-28 12:59:31 +01:00
Andreas Fabri 2916850771 use iformat for reading doubles 2014-11-26 16:53:50 +01:00
Jane Tournois d119879313 add namespace parameters for parameters of lloyd_optimize_mesh_2 2014-11-25 10:42:38 +01:00
Jane Tournois bd08614cc1 fix compilation 2014-11-24 17:01:14 +01:00
Jane Tournois 7e037664e6 fix compilation when verbose mode is off 2014-11-24 17:00:29 +01:00
Jane Tournois f76c88f2fe cleaning 2014-11-24 15:03:35 +01:00
Jane Tournois 78eff786e5 fix missing parameter 2014-11-21 16:21:10 +01:00
Jane Tournois 3e8416954f add mark as a parameter for lloyd_optimize_mesh_2
this allow to choose (as in refine_Delaunay_mesh_2 if
the seeds describe the domain to be meshed (inside), or the complementary
2014-11-21 15:51:28 +01:00
Jane Tournois acdf610682 fix compilation when no seed is given 2014-11-21 11:23:07 +01:00
Jane Tournois e4161ce685 handle seeds in lloyd_optimize_mesh_2 2014-11-20 16:13:46 +01:00
Jane Tournois bd9bbd0427 remove Odt for now 2014-11-20 15:00:55 +01:00
Jane Tournois fbab5edb60 return Mesh_optimization_return_code as Mesh_3 optimizers do 2014-11-18 11:25:09 +01:00
Jane Tournois b2edb9d20b introduce freezing of vertices that do not move enough 2014-11-18 10:48:23 +01:00
Jane Tournois 338a9593f7 use boost named parameters as done in Mesh_3 2014-11-17 16:54:24 +01:00
Jane Tournois b641f2f257 use time limit 2014-11-17 16:53:25 +01:00
Jane Tournois 562ef9f972 use Mesh_sizing_field as in Mesh_3 for Lloyd optimization
this avoids migration phenomena of vertices, that "break"
the distribution of points built during the refinement process
2014-11-14 13:04:48 +01:00
Jane Tournois be2003940f fix histogram function 2014-11-14 12:39:56 +01:00
Jane Tournois ab9811ad8b add output of angles histograms 2014-11-13 16:29:21 +01:00
Jane Tournois 8647878a6a use check_convergence() to stop optimization when vertices do not move enough
the convergence ratio is set to 0.001 by default

+ fix the use of moving_vertices for iterations after the first one
2014-11-12 17:13:18 +01:00
Jane Tournois 5e2fab9a51 add verbose stuff 2014-11-12 16:52:49 +01:00
Jane Tournois 89527055bb add update of blind-ness and inside-ness of facets to the optimization function 2014-11-12 15:48:35 +01:00
Jane Tournois e02773efd1 move files about sizing, and change template parameter. Geom_traits is enough 2014-11-12 15:42:27 +01:00
Jane Tournois e971112c1c this file should remain in the demo folder 2014-11-12 13:07:02 +01:00
Jane Tournois d071e71773 move demo "include" code to Mesh_2 "include" code. These files are needed for Lloyd 2014-11-12 12:51:09 +01:00
Jane Tournois 5666a7db17 add code for Lloyd optimization, and in the demo 2014-11-07 17:07:14 +01:00
Jane Tournois d53c211d83 cleaning 2014-11-07 16:16:03 +01:00
Jane Tournois 74581dcb5d do not put constrained vertices in the moving_vertices container
and add verbose code
2014-11-07 14:13:17 +01:00
Jane Tournois 6726d84dbc fix compilation when verbose mode is off 2014-11-07 12:20:47 +01:00
Jane Tournois 6ad29f3299 fix border/constrained cases 2014-11-07 12:20:19 +01:00
Jane Tournois ee5c1cea4b add code for optimization.
- Lloyd move should be ok, but faces blindness is not updated properly until now
- ODT move still needs to be redefined when constraints appear
2014-10-10 15:37:25 +02:00
Jane Tournois 62098e8445 introduce framework for mesh optimization
- for now, Lloyd_move and Odt_move return an empty move
- example added
2014-10-09 13:51:22 +02:00
Jane Tournois 4cf43198e2 dual(v) returns an OutputIterator that collects rays and segments
to do so, use the Dispatch_output_iterator

- Constrained Voronoi diagram is now a class that has a pointer to a CDT
as member. We don't need an extra CDT anymore
- update examples
- also update the CDT 2 demo to see Voronoi cells, that are only valid when the
triangulation is Delaunay (constrained or not)
2014-10-07 15:03:41 +02:00
Clement Jamin f3c00442fd Merge branch 'Mesh_3-parallel-cjamin-old' into Mesh_3-parallel-cjamin 2014-05-14 19:05:40 +02:00
Clement Jamin 157cd0465f Merge branch 'Mesh_3-parallel-cjamin-old' into Mesh_3-parallel-cjamin
Conflicts:
	Mesh_3/demo/Mesh_3/Mesh_3_optimization_plugin_cgal_code.cpp
	Mesh_3/doc/Mesh_3/Concepts/MeshCellBase_3.h
	Mesh_3/include/CGAL/Mesh_3/C3T3_helpers.h
	Mesh_3/include/CGAL/Mesh_3/Mesh_complex_3_in_triangulation_3_base.h
	Mesh_3/include/CGAL/Mesh_3/Mesh_global_optimizer.h
	Mesh_3/include/CGAL/Mesh_3/Sliver_perturber.h
	Mesh_3/include/CGAL/Mesh_3/Slivers_exuder.h
	Mesh_3/include/CGAL/Mesh_3/Triangulation_helpers.h
	Mesh_3/include/CGAL/Mesh_3/config.h
	Mesh_3/include/CGAL/Mesh_3/vertex_perturbation.h
	Mesh_3/include/CGAL/Polyhedral_mesh_domain_3.h
	Mesh_3/include/CGAL/exude_mesh_3.h
	Mesh_3/test/Mesh_3/test_meshing_utilities.h
	Triangulation_3/include/CGAL/Triangulation_cell_base_with_circumcenter_3.h
2014-03-10 17:01:03 +01:00
Laurent Rineau ecd44ef651 Cosmetic changes
My coding style has evolved a lot since 2002!
2014-01-09 14:21:12 +01:00
Laurent Rineau 2c236ff01d Fix a bug in the constructor if Filter_circulator
The Intel Compiler 14.0, with -O2 or -O3, triggers a bug in the old
version of the code. After the construction of the filtered circulator,
`test(*this)` was not guaranteed. I am not sure if the bug is in the
code or in the compiler, but the constructor was an ugly piece of
code! (*this) was used in the body of the constructor in non obvious
ways. An object is reputed constructed once the internalizers are
evaluated, as far as I know, so probably the previous version of the
code was valid. However, that sound strange to copy an object inside the
body of the constructor of that object. Maybe that confused the
compiler.

Anyway, I have modified the implementation of that constructor in a
cleaner way, and I have added an assertion (that was failing with the
old implementation).
2014-01-09 14:15:45 +01:00
Clement Jamin 730d34bb23 Create a separate Mesher_level.h file for Mesh_3
Before, we were using the Mesher_level.h file of the Mesh_2 package,
but the parallel version introduced some changes and a
dependency from Mesh_2 to Mesh_3 that is not wished.
I restored the original Mesher_level.h file in Mesh_2.
2013-09-11 15:45:55 +02:00
Clement Jamin 138710d997 Remove useless #include 2013-07-25 14:44:01 +02:00
Clement Jamin 206b20bc15 Merge branch 'Mesh_3-parallel-cjamin-old' into Mesh_3-parallel-cjamin 2013-07-02 17:37:50 +02:00
Laurent Rineau ba634e28fd Modularization of Mesh_3::Refine_facets_3
That class template now has a "base" class, to that is can be refined,
before the CRTP is applied to build the mesher level.
2013-06-27 17:10:59 +02:00
Clement Jamin bc360c8b13 Changes for GCC compilation + removed some trailing spaces 2013-06-07 17:40:53 +02:00
Clement Jamin dbe1c9c597 Reversed the "facet_not_in_its_cz" variables by removing the "not" 2013-05-28 15:56:22 +02:00
Clement Jamin 127926aa14 Proof-reading + minor changes
Renamed unlock_all_tls_locked_locations => unlock_all_points_locked_by_this_thread
2013-05-28 15:07:20 +02:00
Clement Jamin 8745b999ad Replaced is_base_of by is_convertible. 2013-05-22 15:15:05 +02:00
Clement Jamin f2d188c599 Replaced the CGAL_MESH_3_ADD_OUTSIDE_POINTS_ON_A_FAR_SPHERE macro
Now, we add points on a far spheres by default in the parallel version, but not in the sequential version. So, two macros: CGAL_SEQUENTIAL_MESH_3_ADD_OUTSIDE_POINTS_ON_A_FAR_SPHERE and CGAL_PARALLEL_MESH_3_DO_NOT_ADD_OUTSIDE_POINTS_ON_A_FAR_SPHERE.
2013-03-15 14:30:35 +01:00
Clement Jamin 462fac46fc No output if no VERBOSE mode activated + class for debugging
Replaced ExplicitFacet by Explicit_simplex for debugging purpose
2013-03-14 11:17:04 +01:00
Clement Jamin ce9aba9375 Removed the parallel_for-based and parallel_do-based strategies.
Just keep the task-scheduler-based strategy, the fastest one.
2013-03-13 11:23:46 +01:00
Clement Jamin 1f0e994a00 Renamed a few functions + tabs to spaces conversion + benchmark output + minor changes 2013-03-11 15:46:27 +01:00
Clement Jamin 3eae2927e7 Merge branch 'Mesh_3-parallel-cjamin-old' into Mesh_3-parallel-cjamin 2013-03-04 15:50:57 +01:00
Clement Jamin a8d38a5fed Code clean-up 2013-02-28 19:46:06 +01:00
Andreas Fabri 876a4a5753 remove unused variables and #if 0 buggy non used code 2013-02-26 17:05:13 +01:00
Laurent Rineau 66c5d23154 Use CGAL_assume to remove warnings 2013-02-20 18:55:43 +01:00
Clement Jamin 8d5352e15f Better grid lock data structure.
There is just one grid lock data structure class now, with several specialization.
Moreover, now the type of the lock data structure is only defined in the triangulation.
2013-02-18 12:58:57 +01:00
Clement Jamin bce43fbb8e Improved the way parallelism is handle in Mesh_3/Triangulation_3
Added a better support for parallelism in Triangulation_3.
Simplified how to enable/disable concurrency in Mesh_3.
Moved the Compact_container stategies to a new file.
2013-02-15 18:07:43 +01:00
Clement Jamin 70312d7299 Code clean-up 2013-02-13 19:57:01 +01:00
Clement Jamin eb2ed63d8b Changed the way we activate concurrency in Triangulation_3 + Code clean-up 2013-02-11 19:12:30 +01:00
Clement Jamin c4859681e3 Removed the "localization ids" related code.
It was an old, unused and slow.
2013-02-06 18:57:36 +01:00
Andreas Fabri 9fea4e7c99 one less warning in Mesh_2, Point_set_2 2013-01-30 18:49:40 +01:00
Clément Jamin 4f262b956a Clean-up TODOs 2012-11-20 15:00:32 +01:00
Clément Jamin 3ff6969e63 Had forgotten to remove this temporary code 2012-10-25 12:00:37 +00:00
Clément Jamin 1ca7174e01 Merge from Mesh_3-improvements-GF
+ some bugfixes (most of them are related to the parallel version)

This version works (sequential and parallel) as long as the following macros are NOT defined:
* CGAL_COMPACT_MESH_VERTEX_CELL
* CGAL_INTRUSIVE_LIST
* FORCE_STRUCTURAL_FILTERING
2012-10-16 14:02:16 +00:00
Clément Jamin 4e1f8aa4f8 Merge from next 2012-10-15 08:28:01 +00:00
Laurent Rineau 795c71fc9b Fix headers of Mesh_2 and Mesh_3. All were missing #include.
I found out that way that <CGAL/Mesh_3/Refine_facets.h> and
<CGAL/Mesh_3/Protect_edges_sizing_field> were using global functions
instead of functors of the traits class.

Note also the funny bug that <CGAL/Regular_triangulation_cell_base_3.h> was
depending on <CGAL/Triangulation_vertex_base_3.h>!
2012-10-08 09:33:38 +00:00
Laurent Rineau 0a081c2abd Add an option to check the syntax of headers, individually.
That feature can be enabled with g++, clang++, and icpc (intel). It could
be implemented for MSVC, with the flag /Zs, but that is not yet done (and
probably will not).

The option is controlled by a CMake option, CGAL_ENABLE_CHECK_HEADERS, that
is disabled by default. If that option is enabled by the user, then CMake
will check if the compiler $CXX understand the syntax:
  $CXX -x c++ -fsyntax-only CGAL/header.h
and send an error otherwise.

Then phony targets will be created:
  - a target check_CGAL__header_h for each header <CGAL/header.h>,
  - a target check_pkg_<pkg> for each package <pgk>,
  - and a target check_headers for the whole CGAL.

Those new targets currently give a lot of compilation errors if
CGAL_ENABLE_CHECK_HEADERS is enabled!

+ fix several missing includes in Mesh_2.
2012-10-05 12:21:44 +00:00
Clément Jamin 2366fee1e1 Merge from next 2012-09-28 14:51:02 +00:00
Clément Jamin 23ff0b1012 Oops, bugfix on my previous bugfix 2012-08-31 08:41:47 +00:00
Clément Jamin e401dd9175 Bugfix (see comment in Mesher_level.h) 2012-08-31 08:30:14 +00:00
Laurent Rineau db194534c7 First big patch to fix -Wunused-local-typedefs
-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).
2012-08-01 13:29:16 +00:00
Laurent Rineau fcd8565b46 Revert a buggy revision
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.
2012-07-26 14:02:13 +00:00
Clément Jamin fc40c96c3d For GCC 2012-07-11 10:11:31 +00:00
Clément Jamin 1c664776c9 The parallel version can now be built with GCC 2012-07-10 16:53:34 +00:00
Clément Jamin 41f9cbe411 Sequential Mesh_3 can now be compiled by GCC. 2012-07-09 15:44:58 +00:00
Clément Jamin 40f602fea9 Minor changes (comments, etc.) 2012-06-21 12:03:03 +00:00
Clément Jamin d42a0fc71d Improved tag dispatching 2012-06-20 13:04:40 +00:00
Clément Jamin 3725168185 Backup commit (I need to roll back to an older version) 2012-06-15 11:28:09 +00:00
Clément Jamin 78cddbe55b bugfix 2012-06-13 10:04:23 +00:00
Clément Jamin b268598665 Replace LINKED_WITH_TBB by CGAL_LINKED_WITH_TBB. 2012-06-13 09:33:08 +00:00
Clément Jamin b948543cc6 Use of a Tag (template parameter) to activate/deactivate concurrency in Mesh_3, instead of #ifdef macros. 2012-06-09 08:52:37 +00:00
Clément Jamin dfbddff185 Bugfixes + some clean-up 2012-05-30 14:49:02 +00:00
Laurent Rineau fd77f801dc Bug fix: g++-4.7 (and C++03/11) requires to qualify the call. 2012-05-21 06:53:58 +00:00
Clément Jamin d2792dff8d - Added the ability to add points on a sphere outside the domain in the sequential case => better performance for the fandisk model (x2). I'm still wondering why...
- Code refactoring/clean-up
2012-05-04 15:20:28 +00:00
Clément Jamin 9da17676e9 Clean-up / formatting 2012-05-03 16:37:48 +00:00
Clément Jamin 5a628edd4e - New worksharing technique: we use a coarse version of the mesh to split the space.
- Some clean-up (removed g_global_mutex)
2012-05-03 16:05:36 +00:00
Clément Jamin 107a428fb5 - Added the ability to sort work batches according to quality, in order to reduce the number of inserted vertices
- Modified config parameters manager (Concurrent_mesher_config class)
2012-05-02 15:21:31 +00:00
Clément Jamin 0eee3dc040 Fixed a deadlock introduced recently.
Added some assertions in the way...
2012-04-25 13:00:12 +00:00
Clément Jamin fb7d171271 Oops. Forgot to remove a line. 2012-04-24 16:01:54 +00:00
Clément Jamin 107b268756 - Now, we first start by a little bit of sequential refinement, in order to get a better approximation of the bounding box
- New worksharing strategy, which groups tasks by batches and let TBB manage the load balancing => the results are slightly improved, compared to parallel_do
- New params in config file
2012-04-24 15:06:10 +00:00
Clément Jamin fc121a451d - Some clean-up
- Function get_number_of_bad_elements in the mesher levels (for debugging)
- option CGAL_MESH_3_ADD_OUTSIDE_POINTS_ON_A_FAR_SPHERE to reduce contention on the infinite vertex
2012-04-24 07:59:29 +00:00
Clément Jamin 9492b2eb84 Added the option to sort the refinement queue after the initial scans (facets and cells), when the queue is an unsorted container. 2012-04-20 09:45:58 +00:00
Clément Jamin 8002220aed Clean-up and bugfixes 2012-04-13 13:57:54 +00:00
Clément Jamin ce132eb34a The concurrency parameters are now stored in a config file which is handled via boost::program_options. 2012-04-12 13:37:15 +00:00
Clément Jamin 9933dd83a4 - Some clean-up: moved global variables (locking/worksharing data structures) to member variables of Mesher_3.
- Some tests on the worksharing strategies
2012-04-12 08:33:43 +00:00
Clément Jamin 69272e4d9a Test with a worksharing strategy (based on TBB task scheduler) + test with parallel_do. 2012-04-10 13:23:51 +00:00
Clément Jamin a0a92cdf64 The problem "A facet is not in conflict with its refinement point" (can occur in sequential version too) is now solved => we switch to exact computation (for the dual) when it happens.
Note: don't try to #define CGAL_MESH_3_DO_NOT_LOCK_INFINITE_VERTEX, it doesn't work yet.
2012-04-04 07:05:46 +00:00
Clément Jamin a520f3cbf0 Corrected a rare race condition.
The few bad facets that are created during the "cell refinement" step are treated immediately inside the thread which created them.
2012-03-29 15:05:28 +00:00
Clément Jamin a3f27eff3c Finally, a fully parallel version of the refinement. Not very efficient, though, but the idea was to identify all data races and to protect it using locks, atomics, TLS... Needs some tests now, to check if we didn't miss any rare data race. 2012-03-26 07:39:58 +00:00
Clément Jamin da923ba811 Forget about yesterday. There was a studid mutex making the whole thing nearly sequential.
Anyway, now the refinement of the facets is parallel. The speedup is around 2-3 on a 12-core CPU. Can do better, but at least it shows it's not sequential.
The refinement of the cells is not parallel, yet.
One last thing: the program needs to be restarted between two refinements (should be fixed soon).
2012-03-23 18:05:24 +00:00
Clément Jamin 4ccf8e0447 First working parallel version. It's not faster than the sequential one, but not slower neither (depends if you're optimistic or not). The good news is that we found all (?) the sections to protect or to make thread-local. 2012-03-22 17:07:03 +00:00
Clément Jamin 7137347f95 Added::process_a_batch_of_elements(...) which use parallel_for to insert batch of facets/cells. For now, the body is protected by a scoped_lock to avoid races => no speedup! 2012-03-07 13:57:16 +00:00
Laurent Rineau 8f59fd9592 Turn QPL into LGPLv3+ 2012-01-13 16:33:35 +00:00
Laurent Rineau 9024d5bc04 Fix the text of the assertion msg. Thanks to Sebastien L. 2011-11-16 18:25:18 +00:00
Laurent Rineau 3d1dc999a0 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.
2011-11-16 17:58:22 +00:00
Laurent Rineau 0a363c52b5 Fix a bug introduced in trunk: criteria for Mesh_2 needs a geom traits 2011-06-04 17:00:31 +00:00
Laurent Rineau 5e1de228a1 Do not use systematically a default constructed geom traits
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.
2011-03-23 17:45:59 +00:00
Sébastien Loriot ae62b2ae4d remove warnings 2011-02-24 16:36:04 +00:00
Andreas Fabri 43aea3bd18 Remove unused variable 2010-11-12 08:06:17 +00:00
Sébastien Loriot 5c8f3946f4 call to is_conforming_[Gabriel,Delaunay] was no longer possible: fix proposal.
Add a test into the testsuite
2010-10-19 14:23:04 +00:00
Stéphane Tayeb 61f6dcbc10 previous data member is now a reference in Null_mesher_visitor_level: visitor used by Mesh_3 as Previous_level has a state, so doing a copy is not an option. 2010-06-09 15:39:04 +00:00
Andreas Fabri 8e47168183 Remove extra ';' 2010-05-17 14:05:54 +00:00
Andreas Fabri 397bc16d9f Remove ';' 2010-05-14 09:13:45 +00:00
Laurent Rineau 49b095589d Strict-ansi compliance 2010-05-08 11:49:52 +00:00
Sébastien Loriot 72ef527fc6 remove extra ; 2010-04-26 09:00:17 +00:00
Laurent Rineau d8e2cfaecd Fix yet another bug of Mesh_2: if a vertex of the CDT has all its incident
edges in a cluster of constrained edges, then the construction of the
cluster was buggy.
2010-03-23 14:59:11 +00:00
Laurent Rineau 73c9d4fb3d Determinize Mesh_2 (comparison of Face_handles in Double_map). 2010-03-10 18:05:57 +00:00
Laurent Rineau 1c84cc189b Fix a bug of Mesh_2 that exists for years (since r23141, 2004-10-19)! 2010-03-10 16:46:10 +00:00
Laurent Rineau 274143fa4d - Fix the Mesh_2 test suite: previously it was no longer testing anything!
- Fix the handling of the cdt with the triangulation plus_2.
- Add tests with CDT_plus_2.
2010-03-09 15:25:12 +00:00
Stéphane Tayeb a9813aa1ef Fix double map container: pop_next_element_impl now pops the first element of the internal double map. 2010-02-26 10:45:22 +00:00
Stéphane Tayeb 88b3b85630 Fix a bug concerning Boost.Bimap (boost 1.41.0) and _GLIBCXX_PARALLEL g++ flag. 2010-01-27 17:09:55 +00:00
Sylvain Pion 5fda817f95 Remove a few "warning: extra ';'" with g++ -pedantic. 2009-11-14 11:49:52 +00:00
Laurent Rineau c5e779d227 Add a edges mesher level that prevents edges to be refined, and let some bad triangles in the mesh (when their circumcenter encroaches a constrained edge, or when their circumcenter lies outside the meshing domain. 2009-06-24 14:12:12 +00:00
Sylvain Pion 55b427d531 lenght -> length 2009-04-07 19:30:59 +00:00
Andreas Fabri 0879f84971 Don't use deprecated functions internally 2008-11-02 20:43:30 +00:00
Laurent Rineau 324db7bcee Rename variables: add "sq" in their names, so that one know that the
distances are squared.
2008-09-26 13:46:54 +00:00
Laurent Rineau a8cdc7ca4a Remove Boost.Bimap FEATURE: it is now hard-coded that bimap is supported iff boost version is >= 1.35 2008-09-24 09:13:57 +00:00
Andreas Fabri 64d8e77840 Overload meshing function for domains selevted by the user 2008-09-24 08:58:02 +00:00
Andreas Fabri 9e667d5865 Put parenthesis around block even if it is only one statement 2008-09-24 08:57:10 +00:00
Andreas Fabri 4c55f38979 fixes for bimap which is now in the boost distribution 2008-09-24 08:56:24 +00:00
Sylvain Pion eff6efd3af CGAL_NULL and CGAL_NULL_TYPE are now constant macros, so replace them by:
- CGAL_NULL -> NULL
- CGAL_NULL_TYPE -> CGAL::Nullptr_t (typedef to const void *)
2008-07-12 21:58:52 +00:00
Laurent Rineau b92312032e Leftovers from commit 42968:
"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.
2008-04-25 13:38:54 +00:00
Laurent Rineau 22629c62b3 New directory Mesh_2/include/CGAL/Meshes/ that aggregates several
non documented files that are common to Mesh_2, Mesh_3 and Surface_mesher.
2008-04-21 16:07:38 +00:00
Laurent Rineau 767ea68f72 fix warnings "CGAL/Mesh_2/Refine_edges_with_clusters.h", line 160: Warning: tr hides[...]" 2008-01-22 14:01:48 +00:00
Laurent Rineau 699fb3e257 Better follow under mouse feature: use a segment, instead of a point.
That allows to better track the mouse movement.
2007-11-15 10:05:14 +00:00
Laurent Rineau 917ff4701f Fix an old bug: the Terminator algorithm was not implemented correctly 2007-11-15 10:03:40 +00:00
Laurent Rineau 1ead79b7c8 Fix an old bug: the Terminator algorithm was not implemented correctly 2007-11-15 10:03:22 +00:00
Laurent Rineau 800e21e0eb Fix Mesh_2 in trunk: Mesh_2::Refine_edges_visitor<> no longer carries data.
Now, its data are references to private data of one instance of Mesh_2::Refine_edges<>,
so that they can be safely modified.
2007-10-16 14:41:34 +00:00
Laurent Rineau e42871f6d5 fix macros CGAL_MESHES_NO_OUTPUT and CGAL_MESHES_OUTPUT_ON_CERR 2007-10-16 12:01:02 +00:00
Laurent Rineau 1f471177ce push current version 2007-06-06 12:54:28 +00:00
Laurent Rineau b800ebce7d fix compilation errors in Mesh_3 2007-05-14 14:02:39 +00:00
Laurent Rineau 4d50b11e89 Bug fixed at breakfast time: incorrect use of Boost.Bimap! (stupid me)
Explanation: Double_map is supposed to be a map in one way, and a
  multimap in the reverse way.

  "La nuit porte conseil." (french proverb)
2007-03-30 08:35:10 +00:00
Laurent Rineau f1d5ec3a62 Use Boost.Bimap in Double_map.
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
2007-03-14 18:53:37 +00:00
Laurent Rineau b4171c96e5 updated debug output, if CGAL_MESHES_DEBUG_REFINEMENT_POINTS is defined 2007-03-12 10:38:51 +00:00
Laurent Rineau eb080638fc Fix an error with -D_GLIBCXX_DEBUG -D_GLIBCPP_CONCEPT_CHECKS
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));
2007-02-23 13:01:04 +00:00
Laurent Rineau 3a33daaf8c Cosmetic changes in this file: rename "z" to "zone", and the boolean
"should_be_true" to "is_edge", so that the assertion message is not that
bad.
2006-12-07 15:57:16 +00:00
Laurent Rineau 4394be3bbc - refactoring of <CGAL/Mesh_2/Refine_edges.h>:
- factorize code in Is_locally_conforming_Gabriel and
    Is_locally_conforming_Delaunay.
    - all triangulation references are now named "tr" (instead of "ct").
(Tests OK)
2006-12-01 17:32:40 +00:00
Laurent Rineau 503e340eec Fix the Gabriel test, to be a *strict* Gabriel test: if a point lies on the
boundary of the diametral circle, then the edge is not conforming Gabriel.
2006-11-30 15:05:29 +00:00
Laurent Rineau 8ecd768345 modify comments after discussion with Jane Tournois. 2006-10-25 15:41:37 +00:00
Andreas Fabri 71b746b58c fixed min/max problem 2006-08-17 09:14:39 +00:00
Andreas Fabri 2d151a776a Fixed min max problem 2006-07-30 13:09:30 +00:00
Laurent Rineau 774e48f5f7 - fix a Rebind bug in <CGAL/Delaunay_mesh_face_base_2.h>, reported by
"Mike A. Harris" <mharris@mharris.ca> on the cgal-discuss mailing list.
- add a new test file to avoid that bug to reappear one day.
2006-07-25 09:25:45 +00:00
Laurent Rineau 0d1d892da1 - new debug macros:
- CGAL_MESH_3_DIRTY_DEBUG_SPHERES,
  - and CGAL_MESHES_DEBUG_REFINEMENT_POINTS.
- new macro CGAL_MESHES_OUTPUT_STREAM, which is set to std::cout by
default.
- in Mesh_2: new header <CGAL/Mesh_2/Output_stream.h>
2006-07-10 09:25:35 +00:00
Laurent Rineau 550d1df0ed - new debug macros:
- CGAL_MESH_3_DEBUG_INSERTION_RADIUS,
   - CGAL_MESH_2_DEBUG_INSERTION_RADIUS,
   - CGAL_MESHES_DEBUG_REFINEMENT_POINTS,
   - and CGAL_MESH_3_DIRTY_DEBUG_SPHERES.
  These are not activated by default, of course. The latter was to debug
  test/Mesh_3/combined_spheres.cpp.
2006-07-10 09:13:23 +00:00
Laurent Rineau 0a1b5756e5 Copy Mesh_2, Mesh_3 and Surface_mesher, from the branch
"cannot_wait_for_CGAL-3.2" to the trunk.

My idea: the branch is the real working version, and I want it to be joined
back to the trunk:

          __________________________         cannot_wait_for_CGAL-3.2 branch
         /                          \
        /                            \ 
-------------------------------------------- trunk
        S                             M

The modification of the trunk between the splitting point S and the merging
point M has already been merged into "cannot_wait_for_CGAL-3.2".

The trunk versions of these three packages have been removed already.
2006-06-06 13:38:15 +00:00
Laurent Rineau b80c458ae5 Remove trunk of Mesh_2, Mesh_3 and Surface_mesher.
Do not worry: I will "svn cp" the branch "cannot_wait_for_CGAL-3.2" into the
trunk, and the trunk will inherit from the logs of the branch.

My idea: the branch is the real working version, and I want it to be joined
back to the trunk:

          __________________________         cannot_wait_for_CGAL-3.2 branch
         /                          \
        /                            \ 
-------------------------------------------- trunk
        S                             M

The modification of the trunk between the splitting point S and the merging
point M has already been merged into "cannot_wait_for_CGAL-3.2".
2006-06-06 13:36:21 +00:00
Laurent Rineau 0161de5a27 - added test_conforming and test_meshing in test/ with test files.
- rename test/Mesh_2/makefile to GNUmakefile, not submitted:
  makefiles in the testsuite are generated.
- fix a BUG in Mesher_level: one_step() and try_to_insert_one_point(), in
  Null_mesher_level must return false! This fix solves the "follow under
  mouse" bug of mesh_demo.C!
- change some DEBUG macro names to:
    CGAL_MESH_2_DEBUG_BAD_FACES
    CGAL_MESH_2_DEBUG_CLUSTERS
    CGAL_MESH_2_DEBUG_CONFLICTS_ZONE
    CGAL_MESH_2_DEBUG_DRAW
    CGAL_MESH_2_DEBUG_INSERTIONS
    CGAL_MESH_2_VERBOSE
  to please CGAL developer manual.
- add a seed in fish.poly

(Note to Andreas: this is the bug I was looking for. The added test file
helped me to find it cause.)
2006-04-13 16:07:19 +00:00
Laurent Rineau e15412aed1 patch for SunCC 2006-03-30 16:11:40 +00:00
Laurent Rineau 0530e82ca4 - fix a desynch between the doc and code: is_marked->is_in_domain, in the
face base type
2006-03-20 14:38:45 +00:00
Laurent Rineau 114d740b35 - Move the internal header
include/CGAL/Mesh_3/Triangulation_mesher_level_traits_3.h to Mesh_2.
- change its use to std::list to use of std::vector (and call reserve).
2006-02-27 17:23:10 +00:00
Laurent Rineau bf18b7b7ce Move include/CGAL/Mesh_3/Triangulation_mesher_level_traits_3.h to Mesh_2. 2006-02-27 17:19:11 +00:00
Laurent Saboret db6a8f948c Change CVS keywords to SVN style 2006-02-16 14:30:13 +00:00
Laurent Saboret 1aad55d4cb Change CVS keywords to SVN style 2006-02-14 10:08:15 +00:00
Laurent Saboret 541f5f7f0e Remove .cvsignore files (changed to svn:ignore properties) 2006-02-14 09:20:20 +00:00
Laurent Saboret 6b42bcbb9b Move packages to trunk root 2006-02-14 08:58:16 +00:00