Commit Graph

506 Commits

Author SHA1 Message Date
Jane Tournois 44fa8f7a93 compute distances in a canonical order to make ODT deterministic 2014-02-13 19:46:36 +01:00
Jane Tournois f4ae054d81 compute volume and centroid of cell by taking the points always in the same order to improve consistency 2014-02-13 19:46:35 +01:00
Andreas Fabri 83546c53b1 Add a time stamp in vertices and cells of triangulations and polyhedra
and use this for operator< of handles in order to make mesh generation
 deterministic
2014-02-13 19:46:34 +01:00
Jane Tournois 2ab45a8514 sort facets and tetrahedra with indices, to get always the same file for the same mesh 2014-02-13 19:46:30 +01:00
Jane Tournois 4d47194a7b Merge branch 'Mesh_3-fix_perturber_slivers_empty_bug-GF-rebased'
This branch fixes a bug in the sliver perturber.
It introduces some new data structures to backup the metadata
stored in cells before each perturbation. This allows to
recover these data without recomputing them in case the move
is reverted.

The bug fix comes from the fact that rec-omputed values might
have been different after the move from what they were before the
move, in a tetrahedron which is the same but for which the
Cell_handle is new.

Approved by the release manager.
2014-02-06 11:24:41 +01:00
Laurent Rineau bfbe63275a Define macros to 1 instead of empty values
In <CGAL/Mesh_3/config.h>, the macro are defined to 1, and no longer
defined to empty values.
2014-02-04 14:31:28 +01:00
Laurent Rineau 874e96a553 Fix a bug of the bissection oracle (Labeled_mesh_domain_3)
In CGAL-4.2 and previous, when a facet f was between finite cells c1,
and c2, with different subdomain indices, the surface patch index of f
was the pair { c1->subdomain_index(), c2->subdomain_index() }, say the
pair (1, 2). Since CGAL-4.3, with
CGAL_MESH_3_NO_LONGER_CALLS_DO_INTERSECT_3, the Do_intersect functor of
the domain is no longer called, and only Construct_intersection. If the
bissection eventually found out that the bissection ended up between the
volumes labeled 1 and 3, then the returned surface patch index was
{1,3}, instead of {1,2}. That commit fixes that "bug", and restores
the behavior of CGAL-4.2.
2014-02-04 12:33:59 +01:00
Laurent Rineau 2a86c88732 Add an assertion 2014-02-03 18:18:05 +01:00
Laurent Rineau 777b7e8800 Fix whitespace, in three lines 2014-02-03 17:44:27 +01:00
Laurent Rineau 2189f6e3d3 Fix a warning (unused local typedef) 2014-02-03 17:43:48 +01:00
Laurent Rineau 9fd6f2c539 Fix a compilation error
When CGAL_MESH_3_NO_LONGER_CALLS_DO_INTERSECT_3 is not defined (it is
defined by default by <CGAL/Mesh_3/config.h>), there was a compilation
error.
2014-02-03 17:40:41 +01:00
Jane Tournois f0b11abe87 Merge branch 'Mesh_3-fix_perturber_slivers_empty_bug-GF-rebased' of ssh://scm.cgal.org/var/git/cgal into Mesh_3-fix_perturber_slivers_empty_bug-GF-rebased 2014-01-31 17:33:43 +01:00
Jane Tournois 136f0ef1d1 avoid removing cells and facets twice from c3t3
these will be removed by move_point_topo_change_conflict_zone_known
anyway
2014-01-31 17:32:17 +01:00
Jane Tournois c0423f1da0 remove a function which has become useless 2014-01-31 17:24:33 +01:00
Laurent Rineau 652347ba8d Better version of verify_surface()
It now checks if the surface patch index of a facet has changed. And it
only call the checker once per facet, instead of two.
2014-01-31 16:47:13 +01:00
Laurent Rineau 680e0bfe49 New options and result types for Update_c3t3::operator()
- Update_c3t3::operator()(Cell_handle) returns a
  boost::optional<Subdomain_index> instead of a Boolean.

- Update_c3t3::operator()(Facet) returns a
  boost::optional<Surface_patch_index> instead of a Boolean.

- Update_c3t3::operator()(Facet) gets a new option that allows to update
  the facet surface center, without updating the c3t3 itself.
2014-01-31 16:39:08 +01:00
Laurent Rineau c833ffc2e1 Additional assertion in restore_from_cells_backup
When restore_from_cells_backup() is called, one verifies that all the
backuped values are used.
2014-01-31 14:43:18 +01:00
Laurent Rineau 7b9a9ce50c Merge remote-tracking branch 'origin/Mesh_3-fix_perturber_slivers_empty_bug-GF-rebased' into Mesh_3-fix_perturber_slivers_empty_bug-GF-rebased
Conflicts:
	Mesh_3/include/CGAL/Mesh_3/C3T3_helpers.h
2014-01-31 14:29:38 +01:00
Jane Tournois 53b5ea0a27 complete Update_c3t3 with remove_from_complex when appropriate 2014-01-31 14:27:57 +01:00
Laurent Rineau d497281da1 Rename a variable 'vertex' to 'old_vertex' for consistency 2014-01-31 14:27:52 +01:00
Jane Tournois 93d89ed8c4 complete update of c3t3
using Update_c3t3 or restore_from_cells_backup, allow updaters
to remove cells and facets from the c3t3
2014-01-31 11:41:27 +01:00
Jane Tournois c2d55d967e fix update_mesh_no_topo_change
valid_move(c3t3_cells(conflict_cells)) was computed using the outdated
c3t3-ness of cells
Now c3t3 update is done iff the surface has not been broken, and
new sliver_criterion values are computed on updated cells
2014-01-31 11:31:01 +01:00
Jane Tournois 2bbf85a79f remove useless function 2014-01-31 10:37:49 +01:00
Jane Tournois 0b1b21bbc2 reverse comparison 2014-01-31 10:32:04 +01:00
Jane Tournois 9d64447700 fix Cell_data_backup
vertex indices in Cell_from_ids should not be sorted,
otherwise, what is stored in surface_patch_index[i]
does not correspond to the right i.
Copy indices to have them :
- in the original order
- and sorted (for set::find)
2014-01-30 18:36:49 +01:00
Jane Tournois e576b213b0 move testing code to CGAL_assertion_code 2014-01-30 18:31:29 +01:00
Jane Tournois 3e395078c3 backup of cells should not be done entirely for newly created cells 2014-01-30 18:30:09 +01:00
Jane Tournois 2cf4d6fa62 complete Update_c3t3 with remove_from_complex when appropriate 2014-01-30 18:25:21 +01:00
Laurent Rineau 271ae30833 Fix a warning about an unused type 2014-01-30 17:14:19 +01:00
Jane Tournois 9ac3121293 attempts to fix the bug
- move fill_cells_backup to before computing anything
- cells backup of sliver_value only needs cache to be valid
- comment improvement
2014-01-28 09:56:35 +01:00
Jane Tournois 976b73e1e5 make assertion stronger, and code simpler 2014-01-27 14:17:14 +01:00
Jane Tournois 385090cc72 remove break statement
it should have been removed at the same time as the double loop.
Improve the use of std::set::find,
and add assertion code.
2014-01-24 15:25:24 +01:00
Jane Tournois 5096f05990 remove commented assertion 2014-01-23 10:59:43 +01:00
Jane Tournois a48a0d36b7 remove useless end of lines whitespaces 2014-01-17 17:19:51 +01:00
Jane Tournois 24a5d601aa order IDs in Cell_from_ids to improve recovery (avoid quadratic searching) 2014-01-17 16:39:03 +01:00
Jane Tournois fa21907b3d fix the use of cpp11, and warnings.
note : use a array<std::size_t,4> instead of a map<std::size_t, std::size_t>
2014-01-16 11:35:05 +01:00
Jane Tournois bae5f52c03 remove template parameter that allows not to store c3t3 info. It is actually always needed to do so 2014-01-16 11:35:05 +01:00
Jane Tournois aa61073ef5 make the assertion more precise 2014-01-16 11:35:04 +01:00
Jane Tournois 122db0e026 don't backup infinite cells 2014-01-16 11:35:04 +01:00
Jane Tournois 8f778be277 comment the assertion that checks if sliver_cache has the same value as the computed sliverity value, because it goes against the cells meta-data backup that we are doing to speed-up and add consistency to revert_move (used when perturber failed to improve the quality of the mesh locally (sliverity may have changed of 10^-15 or so, unfortunately)) 2014-01-16 11:35:04 +01:00
Jane Tournois 14ac2ccc09 add comment 2014-01-16 11:35:03 +01:00
Jane Tournois 0798f093d4 hardcode the use of std::size_t as id_type for PVertex 2014-01-16 11:35:03 +01:00
Jane Tournois 11a8050381 add a template parameter to decide whether we store c3t3 info or not in the cells meta-data backup 2014-01-16 11:35:02 +01:00
Jane Tournois 0609558919 avoid recomputing the c3t3 after each revert_move in sliver perturber.
The meta-data such as sliver_cache and c3t3 info are stored in an
auxiliary data, and restored after revert_move
2014-01-16 11:35:02 +01:00
Jane Tournois 7ad8520d8f Merge branch 'Mesh_3-add_sliver_perturber_criteria-GF-old' into Mesh_3-add_sliver_perturber_criteria-GF 2013-12-10 15:58:46 +01:00
Jane Tournois 3d3bad7734 attempt to fix the bug about CGAL_assertion(!slivers.empty()) in Sliver_perturber.h
there might be inconsistencies (of a few bits) between sliver cached values (64 bits) and values computed on the fly (potentially 80 bit on some 32 bits platforms)
2013-12-10 15:49:52 +01:00
Laurent Rineau 2a345ad60a Fix an assertion when the x86 coprocessor is used
See the comment in the file
2013-12-10 15:20:34 +01:00
Laurent Rineau 675f5b8b14 Fix a warning (unused variable) 2013-12-10 15:20:34 +01:00
Jane Tournois 7061eee190 fix a warning about missing virtual destructor 2013-12-10 14:54:28 +01:00
Jane Tournois 747ef0eade fix access to number_of_cells() and number_of_facets() in C3t3 (these functions are documented) 2013-12-06 10:54:48 +01:00