Commit Graph

288 Commits

Author SHA1 Message Date
Andreas Fabri b42fd4428d Triangulation_{2,3): Add ranges 2019-06-03 15:36:34 +02:00
Andreas Fabri 2d1c78fdd9 Unify T3 2019-05-20 18:23:08 +02:00
Sébastien Loriot 0ce7fc09b5 turns iterator pairs into iterable ranges 2019-03-29 13:28:22 +01:00
Sébastien Loriot d60f5645aa replace BOOST_FOREACH by c++ ranged-based for loop
some of the command used for the replacement:
ack --cpp  BOOST_FOREACH -l  | xargs sed -i -E "s/BOOST_FOREACH\(([a-zA-Z_:&0-9]+)\s(\w+)\,/for(\1 \2 :/"
ack --cpp  BOOST_FOREACH -l  | xargs sed -i -E "s/BOOST_FOREACH\((const [a-zA-Z_:&0-9]+)\s(\w+)\,/for(\1 \2 :/"
ack --cpp  BOOST_FOREACH -l  | xargs sed -i -E "s/BOOST_FOREACH\((const typename [a-zA-Z_:&0-9]+)\s(\w+)\,/for(\1 \2 :/"
ack --cpp  BOOST_FOREACH -l  | xargs sed -i -E "s/BOOST_FOREACH\((typename [<>a-zA-Z_:&0-9]+)\s(\w+)\,/for(\1 \2 :/"
ack "boost/foreach.hpp" -l --cpp | xargs sed -i '/boost\/foreach.hpp>/d'
2019-03-29 13:22:15 +01:00
Mael Rouxel-Labbé 17d46e9211 Merge branch 'Periodic_3_mesh_3-Feature-MBogdanov-old' into Periodic_3_mesh_3-Feature-MBogdanov 2018-04-26 11:55:17 +02:00
Andreas Fabri 063a91a771 Use CGAL::random_shuffle 2018-04-04 14:00:23 +01:00
Mael Rouxel-Labbé c28e05be0c Merge branch 'Periodic_3_mesh_3-Feature-MBogdanov-old' into Periodic_3_mesh_3-Feature-MBogdanov 2018-02-23 12:50:06 +01:00
Andreas Fabri 6cc385c6ec Number_types 2018-01-17 15:47:18 +00:00
Mael Rouxel-Labbé c5993c95b3 Replaced a postcondition
When manually building a triangulation, we might have inserted vertices but
not yet cells, and thus the dimension is 0 but point() should still work.
This is the case in tet_soup_to_c3t3 for example.
2017-12-12 00:46:01 +01:00
Mael Rouxel-Labbé ba3a59ed5a Merge branch 'Periodic_3_mesh_3-Feature-MBogdanov-old' into Periodic_3_mesh_3-Feature-MBogdanov 2017-11-30 15:54:00 +01:00
Mael Rouxel-Labbé 812109df83 Added Mesh_3_regular_triangulation_3_wrapper
This wrapper around Regular_triangulation_3 adds undocumented, straightforward
functions which are required for Mesh_3 because of Periodic_3_mesh_3:
they are functions for which both (periodic and non-periodic) triangulations
have fundamentally different implementations, usually because Periodic_3_mesh_3
does not know the offset of a point and must brute-force check all
possibilities. To allow Periodic_3_mesh_3 to use Mesh_3's files,
each mesh triangulation implements its own version.
2017-11-22 14:23:59 +01:00
Sébastien Loriot ee57fc2d6c add SPDX identifier for files under the GPL-3+ license 2017-11-12 10:17:51 +01:00
Mael Rouxel-Labbé 7d7fb2f81d Generalized the signatures of some predicate wrappers
Since construct_point() is used, the arguments can be either Point_3 or
Weighted_point_3.
2017-11-06 14:40:29 +01:00
Mael Rouxel-Labbé 5c9e18a2f6 Improved readability of Regular/Delaunay_triangulation_3
The quest continues
2017-11-01 15:09:18 +01:00
Mael Rouxel-Labbé 9edd4194ba Fixed Triangulation_3.h indentation and whitespace (no real changes) 2017-10-31 18:23:31 +01:00
Mael Rouxel-Labbé ac0a27cdfd Made Mesh_3's optimizers work with periodic triangulations 2017-10-31 15:47:23 +01:00
Mael Rouxel-Labbé 1f4475d471 Merge branch 'Periodic_3_mesh_3-Feature-MBogdanov-old' into Periodic_3_mesh_3-Feature-MBogdanov 2017-10-27 16:26:27 +02:00
Mael Rouxel-Labbé bae6f15fa5 WIP commit 2017-10-27 15:34:33 +02:00
Mael Rouxel-Labbé 7b379d4338 Temporarily moved code from RT3 to T3 2017-10-22 23:40:45 +02:00
Mael Rouxel-Labbé aaeaf35380 Introduced the tag "Periodic_tag" to mark distinguish periodic triangulations 2017-08-23 16:18:05 +02:00
Mael Rouxel-Labbé 7943d0877e Fixed taking reference to temporary (ter) 2017-06-30 11:40:14 +02:00
Mael Rouxel-Labbé 02a9a91e40 Cleaned off useless 'using' 2017-06-30 11:32:07 +02:00
Mael Rouxel-Labbé 4ac89861ba Fixed (?) taking reference to temporary 2017-06-28 10:17:14 +02:00
Mael Rouxel-Labbé 8c7bda5f2d Changed from boost::function_property_map to CGAL::internal::boost_'s
This is so it's always available, even if using an old version of boost
2017-06-28 10:17:14 +02:00
Mael Rouxel-Labbé ddfc4fc0fe T2/T3 now use Perturbation_order in tests with symbolic perturbations 2017-06-28 10:16:23 +02:00
Mael Rouxel-Labbé 87e0ae40b0 Closed a parenthesis 2017-06-28 10:16:23 +02:00
Mael Rouxel-Labbé 4b556707a4 Use boost::function_property_map to apply spatial_sort to weighted points 2017-06-28 10:14:35 +02:00
Mael Rouxel-Labbé 47b3e7193e Comparison result should be of type Comparison_result
(it worked anyway since Comparison_result is a Sign internally)
2017-06-28 10:14:35 +02:00
Mael Rouxel-Labbé 94abc23da9 Adapted the call to spatial_sort() to handle weighted points
Downside: we copy points at each comparison, which is terrible! No noticeable
changes when profiling the construction of a triangulation.

We need this copy because of Lazy kernel: despite construct_point_3 having
const Point_3& construct_point_3_object()(const Point_3&)
the Lazy kernel can return some copies.

Other solutions that were not used:
-- Distinguish the Ouput type of Unary_function_to_property map depending on
   the type of Kernel (ugly and not safe)
-- Use Weighted_point_mappers traits (but that blood will not be on my hands)
2017-06-28 10:14:35 +02:00
Mael Rouxel-Labbé cd9a908393 Ensured that we call kernel functions with the correct (bare) point type
Note that if the type `Point` is already `Point_3`, Construct_point_3 does not
do anything (except in the lazy kernel, but in that case, the running time is
horrible anyway).
2017-06-28 10:14:35 +02:00
Mael Rouxel-Labbé ae1fb2bfec Deduce Triangulation_3's point type from the TDS
Since we have a distinc vertex_base for regular triangulations and that this
regular vertex base defines a type Point, it is redundant to get the Point
type from the Geom_traits.

This also allows to remove the Weighted_point_mapper trick, and pass more easily
custom point types.
2017-06-28 10:14:35 +02:00
Andreas Fabri 787d46ffb8 Disable Point_3(const Weighted_point_3&) 2017-06-28 10:14:35 +02:00
Laurent Rineau dce8bb77ba Merge pull request #2053 from cjamin/Mesh_3-code_improvements-cjamin
Mesh_3: code improvements + bug fix
2017-04-14 18:32:05 +02:00
Clement Jamin 6ea82bbe2a Unnecessary double "if" blocks 2017-03-09 17:46:46 +01:00
Laurent Rineau c55e391f97 WIP: works with one thread 2017-02-17 16:37:11 +01:00
Sébastien Loriot 50510c05ea add include directive for license of all GPL header files
done using:
ack-grep "^GPL" */package_info/*/license.txt -l | awk -F "/" '{print $1}' > /tmp/gpl_packages
for i in `cat /tmp/gpl_packages | \
          grep -v Operations_on_polyhedra | \
          grep -v Algebraic_kernel_for_circles | \
          grep -v Algebraic_kernel_for_spheres | \
          grep -v Polyhedron_IO`;
do
  echo $i
  python Scripts/developer_scripts/add_license_in_pkg_header.py $i
done
python Scripts/developer_scripts/add_license_in_pkg_header.py Operations_on_polyhedra Polygon_mesh_processing
python Scripts/developer_scripts/add_license_in_pkg_header.py Algebraic_kernel_for_circles Circular_kernel_2
python Scripts/developer_scripts/add_license_in_pkg_header.py Algebraic_kernel_for_spheres Circular_kernel_3
python Scripts/developer_scripts/add_license_in_pkg_header.py Polyhedron_IO Polyhedron
2017-01-19 15:20:25 +01:00
Andreas Fabri e5e0cdd5f9 fix a typedef 2016-11-22 17:48:53 +01:00
Andreas Fabri ea50fb811d Cleanup. The 2D and 3D triangulation testsuite pass 2016-11-03 13:07:50 +01:00
Laurent Rineau 1f5fb012ba Merge pull request #1015 from afabri/Mesh_3-accelerations-GF
Accelerate vertex removal in a 3D triangulation and saving a mesh
2016-04-22 15:24:06 +02:00
Andreas Fabri abd9bfb125 std::map -> boost::unordered_map 2016-04-15 20:54:51 +02:00
Laurent Rineau 535c5bb5b2 Speed-up Triangulation_3::read_cells...
... by a factor 5 for big triangulations! The old code was using:

    std::map<size_t, Vertex_handle> V;
    std::map<size_t, Cell_handle> C;

whereas the indices are contiguous: from 0 to n. `std::vector` is a lot
better for that use case!
2016-04-06 16:03:55 +02:00
Andreas Fabri 4c477c853c Accelerete 3D version of inexact_locate as we do it for 2D 2016-02-15 10:57:59 +01:00
Clement Jamin 8f259e5dea Merge branch 'Triangulation-higher_dimensions-odevil_shornus-old' into Triangulation-higher_dimensions-odevil_shornus 2014-09-09 11:20:33 +02:00
Laurent Rineau 3deb8e7910 Merge branch 'Mesh_3-compare_index-GF-old' into Mesh_3-compare_index-GF
Create an integration branch for 'Mesh_3-compare_index-GF': a new branch
created from 'master', where I merged the previous version of
'Mesh_3-compare_index-GF'.

There was a conflict with two features recently merged into 'master' for
CGAL-4.5:

- the move of two files from include/CGAL/Mesh_3/ to include/CGAL/. See
  the small feature:
    http://cgal.org/wiki/Features/Small_Features/New_constructor_in_Label_mesh_domain_3_and_new_function_wrapper

- parallelism for Triangulation_3 and Mesh_3:
    http://cgal.org/wiki/Features/Parallel_Mesh_3

Conflicts:
	Combinatorial_map/include/CGAL/Cell_attribute.h
	Mesh_3/include/CGAL/Implicit_mesh_domain_3.h
	Mesh_3/include/CGAL/Labeled_image_mesh_domain_3.h
	Mesh_3/include/CGAL/Mesh_3/Sliver_perturber.h
	Mesh_3/include/CGAL/Polyhedral_mesh_domain_3.h
	Mesh_3/test/Mesh_3/test_meshing_3D_image.cpp
	Mesh_3/test/Mesh_3/test_meshing_polyhedron.cpp
	Mesh_3/test/Mesh_3/test_meshing_polyhedron_with_features.cpp
	Polyhedron/demo/Polyhedron/Polyhedron_type.h
	STL_Extension/include/CGAL/Compact_container.h
	STL_Extension/test/STL_Extension/test_Compact_container.cpp

I also modified the following files during the conflict resolution:

	Linear_cell_complex/include/CGAL/Cell_attribute_with_point.h
	Mesh_3/include/CGAL/Labeled_mesh_domain_3.h
	Mesh_3/include/CGAL/Polyhedral_mesh_domain_with_features_3.h
2014-07-18 15:47:14 +02:00
Clement Jamin aa1aa597bb Restore commit a09ed468 with a bug fix
"Thread-safe version of incident_cells and incident_facets"
2014-07-15 20:13:30 +02:00
Andreas Fabri 13bb5e38aa remove unused parameters 2014-07-09 16:02:45 +02:00
Clement Jamin da4cf8fc1d Fix gcc warnings (reorder + unused variables & typedef...) 2014-07-03 15:54:39 +02:00
Clement Jamin 0a4267b7ce Temporarily revert "Thread-safe version of incident_cells and incident_facets" 2014-07-03 15:41:02 +02:00
Clement Jamin 65e8d40e33 Fix warning 2014-07-03 09:26:25 +02:00
Clement Jamin 7af8f8b768 Fix compilation with GCC 2014-06-30 19:58:44 +02:00
Clement Jamin 82c89aa58e Fix template params 2014-06-30 15:52:24 +02:00
Clement Jamin a09ed46810 Thread-safe version of incident_cells and incident_facets 2014-06-23 10:45:26 +02:00
Clement Jamin 9f5927af61 Move function from C3T3_helpers to TDS
Move C3T3_helpers::get_incident_cells_without_using_tds_data to TDS::incident_cells_threadsafe
2014-06-23 08:21:09 +02:00
Clement Jamin 05efa677a1 Merge branch 'Triangulation-higher_dimensions-odevil_shornus-old' into Triangulation-higher_dimensions-odevil_shornus
Conflicts:
	NewKernel_d/include/CGAL/NewKernel_d/Cartesian_LA_functors.h
	NewKernel_d/test/NewKernel_d/Epick_d.cpp
2014-05-28 14:53:26 +02:00
Clement Jamin c9c8335811 More code clean-up 2014-05-27 13:46:34 +02:00
Sébastien Loriot 3fa09693a3 Merge branch 'Mesh_3-compare_index-GF-old' into Mesh_3-compare_index-GF
Conflicts:
	Mesh_3/include/CGAL/Mesh_3/Detect_features_in_polyhedra.h
	Mesh_3/include/CGAL/Mesh_domain_with_polyline_features_3.h
	Mesh_3/include/CGAL/Mesh_polyhedron_3.h
	Mesh_3/test/Mesh_3/test_meshing_polylines_only.cpp
	STL_Extension/include/CGAL/Compact_container.h
	STL_Extension/test/STL_Extension/test_Compact_container.cpp
2014-05-21 18:24:17 +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 db3a642de4 Missing include 2014-05-14 17:35:16 +02:00
Andreas Fabri a45ed40f5d Do not use the call stack for a recursive function as it may overflow 2014-03-25 16:01:27 +01:00
Jane Tournois ffc3bdfc2f there is no need to compare "ts". Comparing Vertex_handle's is enough 2014-02-14 15:22:54 +01:00
Jane Tournois 8d7ec0ef19 use time stamps in make_canonical(vertex_triple) 2014-02-14 12:55:29 +01:00
Olivier Devillers d8197fb718 merge master and Triangulation 2013-11-29 13:40:14 +01:00
Clement Jamin 6b65ad71da Changes in the "lock data structure" concept and models
The concept is now much more generic (SurjectiveLockDataStructure).
The names have been changed accordingly.
2013-10-16 12:17:56 +02:00
Clement Jamin 5101c3d2e7 Added my name in a few places + implementation history 2013-10-15 11:14:58 +02:00
Clement Jamin 29525dfcb7 Back-quotes for could_lock_zone and true + minor fixes + replace 0 by NULL 2013-10-15 10:27:35 +02:00
Clement Jamin a173372321 Fixes for GCC + removed trailing spaces 2013-09-25 11:18:18 +02:00
Clement Jamin 18895e6f42 Use the TBB's scalable allocator in a few places
=> better scalability of the parallel remove
2013-07-23 17:51:06 +02:00
Clement Jamin 8aaee67985 Removed some "p_" prefixes in variable names 2013-07-12 15:49:45 +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
Clement Jamin fcdf906f06 Option to add temporary points on a far sphere before insertion
Helps to reduce contention on the infinite vertex
But removing those points in the end takes time
so it's only worth it when points lie on a surface.
2013-07-02 12:57:26 +02:00
Clement Jamin 2dc6c405b8 Drop the use of the TBB malloc proxy, use TBB allocators manually instead
The TBB's "malloc proxy", which allows to replace all calls to the standard
allocators by calls to the TBB scalable allocator, is not available on MacOS.
Instead, we use the TBB allocators manually, where relevant.
2013-06-27 15:29:47 +02:00
Jane Tournois 404f2e0e3c merge 2013-06-21 10:01:19 +01:00
Clement Jamin bc360c8b13 Changes for GCC compilation + removed some trailing spaces 2013-06-07 17:40:53 +02:00
Clement Jamin 440a654a58 Added a concurrency-safe version of DT3::find_conflicts + better doc 2013-06-05 17:23:19 +02:00
Clement Jamin b43f28c6ab Renamed p_could_lock_zone + use NULL instead of 0 + CGAL_TRIANGULATION_3_PROFILING 2013-06-05 13:44:34 +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 eeeb6cc841 Smaller tag names (continued) 2013-05-28 15:42:39 +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
Sébastien Loriot 8d602ed8c2 Merge branch 'triangulation_3-copy_tds-sloriot'
Approved by the release manager

Conflicts:
	Alpha_shapes_3/test/Alpha_shapes_3/copy_tds.h
	Triangulation_2/doc/TDS_2/Concepts/TriangulationDataStructure_2.h

it introduces a more general copy_tds that allows to copy tds with different types of simplices.
2013-04-29 11:09:01 +02:00
Sébastien Loriot 498492e770 add set_infinite_vertex to Triangulation_3 and use it with copy_tds
the 2D version already exists
2013-04-12 16:04:59 +02:00
Clement Jamin ef756afafd Missing "dummy function" for the sequential case 2013-04-03 17:35:24 +02:00
Clement Jamin cc9dde002e Untabify 2013-03-27 15:30:46 +01:00
Clement Jamin de1f43e30b The remove is now fully parallel.
The remove operations are done in parallel as long as the dimension stays = 3, then the few remaining points are removed sequentially.
2013-03-27 13:47:40 +01:00
Clement Jamin 57d84ecb24 New constructor for Tri_3 and TDS + new way of testing "dim down" in the 3D case
New constructor taking 4 non-coplanar vertices, for faster construction of very small triangulations => a 3D triangulation is directly constructed.
The new "test_dim_down_using_incident_cells_3" is used in the 3D and will be used by the parallel version.
2013-03-26 19:00:37 +01:00
Jane Tournois 35120cdf53 small feature documentation about inexact_locate 2013-03-22 15:46:38 +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 a7cfd06598 Replaced the unused pair<bool,int> returned by try_lock by a simple bool. 2013-03-08 16:47:37 +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
Laurent Rineau bc7e2a1d71 Merge remote-tracking branch 'origin/Mesh_3-improvements-GF' into Mesh_3-improvements-GF-new
Mesh_3-improvements-GF-new is fresh fork of master

Conflicts:
	.gitattributes
	AABB_tree/include/CGAL/AABB_tree.h
	GraphicsView/src/CGAL_Qt4/DemosMainWindow.cpp
	Mesh_3/include/CGAL/Mesh_3/C3T3_helpers.h
	Mesh_3/include/CGAL/Mesh_3/Refine_facets_3.h
	Mesh_3/include/CGAL/Polyhedral_mesh_domain_3.h
2013-02-28 17:10:16 +01:00
Clement Jamin a29a847e55 Some tests with parallel removal of vertices. 2013-02-20 17:39:15 +01:00
Clement Jamin 44b8217d54 New/modified constructors for triangulations.
Can now take a lock data structure as parameter.
2013-02-19 10:39:39 +01:00
Clement Jamin 864f4eca81 Moved Spatial_grid_lock_data_structure_3.h to STL_Extension 2013-02-18 13:09:12 +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
Andreas Fabri 8b5b56adb1 make index an unsigned int 2013-02-15 11:30:08 +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
Andreas Fabri afeea1e124 replace size_t with int in loops over the vertices of a cell 2013-02-07 17:26:32 +01:00
Clement Jamin cb89562205 Removed the CGAL_MESH_3_ACTIVATE_GRID_INDEX_CACHE_IN_VERTEX macro.
It was buggy and useless.
2013-02-06 18:10:35 +01:00
Clement Jamin 5938113aff Moved some code because there was a problem with some #ifdef 2013-02-06 14:30:04 +01:00
Clement Jamin dc5e90b8cc Clean-up + some debugging functions + comments 2013-02-02 06:53:43 +01:00
Clement Jamin 2ee92ca346 Missing #ifdef 2013-01-30 17:30:31 +01:00
Clement Jamin ad4a9dcaf6 New is_element_locked_by_this_thread for testing purposes 2013-01-29 19:03:07 +01:00
Clement Jamin 7af597cb4f Parallel Mesh_3 can now be compiled with GCC 2013-01-17 14:49:04 +01:00
Clément Jamin ffc70d4482 Added support for concurrency to "locate" + minor changes 2012-11-20 15:16:21 +01:00
Clément Jamin 8a12c83451 The parallel version can now use safely FORCE_STRUCTURAL_FILTERING (optimization from GF-Improvements) 2012-10-17 16:33: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
Jane Tournois 7d169b85f8 r70573 from Mesh_3-experimental-GF
add macro to force Structural_filtering
2012-07-31 14:14:25 +00:00
Jane Tournois db9f968ea9 r70321 from Mesh_3-experimental-GF
Change inexact_locate and inexact_orientation from protected to public (needed for the commit in Mesh_3 concerning inexact_locate in Mesh_sizing_field)
2012-07-31 13:30:29 +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 3725168185 Backup commit (I need to roll back to an older version) 2012-06-15 11:28:09 +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
Olivier Devillers 576e7338c5 merge next 2012-05-24 09:20:13 +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 7d1d94f42e Merge from next 2012-04-24 16:24:13 +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
Laurent Rineau 95bec3999c Use Unique_has_map instead of std::map (patch from Andreas Fabri)
The gain on copies of T2 or T3 is the following:


afabri@klimt /cygdrive/c/cgal/next/Triangulation_3/benchmark/Triangulation_3
$ ./copy 1000000 2
36.806 sec

afabri@klimt /cygdrive/c/cgal/next/Triangulation_3/benchmark/Triangulation_3
$ ./copy 1000000 2
4.865 sec

The benchmarck copy.cpp is the following (not commited):

#define  CGAL_T3_HASH
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
#include <CGAL/Delaunay_triangulation_3.h>
#include <CGAL/Timer.h>
#include <CGAL/point_generators_3.h>


#include <iostream>
#include <fstream>
#include <string>
#include <vector>

typedef CGAL::Exact_predicates_inexact_constructions_kernel  K;
typedef CGAL::Delaunay_triangulation_3<K> Delaunay;
typedef K::Point_3                                     Point;
typedef CGAL::Creator_uniform_3<double,Point>  Creator;



int main(int argc, char **argv)
{
  int n=1000000;
  int rep=100;
  if (argc>=2)
    n=atoi(argv[1]);
  if (argc>=3)
    rep=atoi(argv[2]);
  std::vector<Point> points;
  points.reserve(n);  
  CGAL::Random_points_in_sphere_3<Point,Creator> g(1);
  CGAL::copy_n( g, n, std::back_inserter(points));
  Delaunay original;
  original.insert(points.begin(),points.end());
  
  double res = 0;
  for (int r=0;r<rep;++r){
    CGAL::Timer t;    t.start();
    Delaunay delaunay=original;
    t.stop();
    res+=t.time();
  }

  std::cout << res << std::endl;
            
  return 0;
}
2012-03-30 12:37:19 +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 677190c9ec merge from next 2012-01-17 15:26:27 +00:00
Clément Jamin 5c19245264 Merge from next 2012-01-16 19:38:35 +00:00
Laurent Rineau 8f59fd9592 Turn QPL into LGPLv3+ 2012-01-13 16:33:35 +00:00
Olivier Devillers bb02600abb better predicates in triangulation traits 2011-10-19 12:43:10 +00:00
Laurent Rineau b7c33d7b2e Add a comment to mark the end of move_if_no_collision
The function body of Triangulation_3<Gt,Tds>::move_if_no_collision is so
long that comments should be added to mark blocks ends. For now, mark the
end of the function body.
2011-08-24 13:39:51 +00:00
Andreas Fabri e8fb926dae Add missing return statements 2011-06-29 14:19:27 +00:00
Sébastien Loriot cc9929b7de qualify boost::bind to avoid ambiguity on windows. 2011-06-08 06:36:55 +00:00
Laurent Rineau a2daef39ab Add a comment, that explain a tricky line of code.
(Actually, seeing the code, I first thought there was a bug. But then I
understood. That is why I think the comment may be is helpful for others).
2011-02-11 10:43:45 +00:00
Laurent Rineau 7e1f88e0cb Abort operator>> as soon as one of the error flags failbit or badbit is set
on the stream. That avoids a possible very long loop if the stream format
is not the excepted one (imagine that is >> n sets n to INTMAX...)
2011-02-08 16:13:38 +00:00
Sébastien Loriot 3181ed9401 merge only the code to insert points with info by range from the branch
/branches/experimental-packages/Triangulation_insert_with_info/Triangulation_3
2011-01-10 16:00:51 +00:00
Laurent Rineau 96162627aa Merge the following small features in trunk:
https://cgal.geometryfactory.com/CGAL/Members/wiki/Features/Small_Features/Remove_cluster
  https://cgal.geometryfactory.com/CGAL/Members/wiki/Features/Small_Features/Structural_filtering

Merge also a partial support of:
  https://cgal.geometryfactory.com/CGAL/Members/wiki/Features/Small_Features/Rt::vertices_inside_conflict_zone
    (vertices_inside_conflict_zone" is added in Regular_triangulation_3,  without documenting it)
2010-12-10 17:02:10 +00:00
Laurent Rineau 0625b6c6bd int -> std::size_t|size_type 2010-06-24 13:27:44 +00:00
Andreas Fabri 1e12152c5f int size_t fixes 2010-06-24 12:50:37 +00:00
Andreas Fabri d185e4152f Finally use ptrdiff_t as return type for insert(beg, end) 2010-06-23 13:35:35 +00:00
Andreas Fabri b456cdb994 int -> size_type/std::size_t 2010-06-21 20:31:19 +00:00
Andreas Fabri c79a1ebbf6 int -> size_type/std::size_t 2010-06-21 14:12:02 +00:00
Sébastien Loriot 52317dd49f add python script (replace_CGAL_NAMESPACE.py) to replace CGAL_BEGIN_NAMESPACE and CGAL_END_NAMESPACE
by namespace CGAL { and } //namespace CGAL. in all .h and .cpp files
in a directory.
Apply it to all packages in the trunk
Remove macro definition from the config.h file.
2010-06-09 07:37:13 +00:00
Laurent Rineau 7e87099363 Merge the branch /branches/candidate-packages/Triangulation_3
- Work from:
    Pedro Machado Manhaes de Castro <Pedro.Machado@sophia.inria.fr>
    Olivier Devillers <Olivier.Devillers@sophia.inria.fr>
- The work is:
    - displacement for 3D triangulation (Olivier and Pedro)
         https://cgal.geometryfactory.com/CGAL/Members/wiki/Features/Move_T2T3
2010-05-31 08:48:09 +00:00
Andreas Fabri 6edc1c3f73 Remove random_shuffle from insert(b,e) functions as spatial_sort does it now 2010-01-27 13:50:23 +00:00
Sylvain Pion 84932f89cc Make locate() deterministic using Boost RNGs.
The previous approach using a local CGAL::Random failed because it still uses a
global state through drand48()...
2010-01-26 14:55:44 +00:00
Sylvain Pion ce3541e210 Improve locate() reproducibility. 2010-01-25 12:11:45 +00:00
Sylvain Pion 266a053335 More debugging aid : add an is_simplex() function to [expensive] check that
the handle passed to locate() belongs to the triangulation.
2010-01-14 23:20:18 +00:00
Sylvain Pion 45b6d32b62 Remove old (CGAL < 3.0) version of the remove() code (which could be triggered by CGAL_DELAUNAY_3_OLD_REMOVE).
No one complained about the new code, so let's remove the old remove.
2010-01-13 13:44:54 +00:00
Manuel Caroli 4bcee3abdf add geometric access functions point(...) +doc + tests 2009-12-04 12:14:50 +00:00
Sylvain Pion d09319501c Use canonical form for for-loops over iterator ranges. 2009-11-10 12:53:07 +00:00