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
88666391da
introduce weighted_circumcenter() for RegularTriangulationCellBase_3
...
weighted_circumcenter() replaces circumcenter() in the regular framework,
which is not a member of TriangulationCellBase_3 anymore.
Triangulation_cell_base_with_circumcenter_3 is deprecated and replaced by:
Delaunay_triangulation_cell_base_with_circumcenter_3
and
Regular_triangulation_cell_base_with_circumcenter_3.
Implement the changes in documentation, Triangulation_3 code and Mesh_3 code.
2014-01-16 16:55:19 +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
7b55c30ba5
fix the use of Triangulation_cell_base_with_circumcenter
...
Triangulation_cell_base_with_circumcenter should not be responsible for
computing the circumcenter value. It is only responsible for its caching.
The Cell_base used as second template parameter should make the construction,
in the circumcenter() function.
Also fix the order of derivation in Mesh_cell_base_3
2014-01-10 14:31:02 +01:00
Jane Tournois
bf9e964f0e
remove macro CGAL_REGULAR_TRIANGULATION_3_USE_CIRCUMCENTER_CACHE
...
has been checked and is always activated
2014-01-09 12:05:50 +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
Jane Tournois
a78c94b81b
fix compilation of Mesh_3 demo using new features
2013-11-18 16:11:32 +01:00
Laurent Rineau
74e1bad5a4
fix a warning
2013-10-31 11:08:30 +01:00
Laurent Rineau
6561b0d811
Fix warnings
...
- Twice unused typedefs (because their uses were commented)
- Once member variables initialized in wrong order
2013-10-24 17:22:42 +02:00
Jane Tournois
9f90f2a7de
remove useless const in return types
2013-10-24 17:11:42 +02:00
Jane Tournois
c557164a44
Merge branch 'Mesh_3-add_sliver_perturber_criteria-GF-old' into Mesh_3-add_sliver_perturber_criteria-GF
2013-10-24 16:28:10 +02:00
Jane Tournois
0a7ea58e1f
rename K to Gt because it does not need to be a kernel
2013-10-24 14:22:36 +02:00
Jane Tournois
6f47edcbef
fix use of K (defined in Sliver_criterion)
2013-10-24 11:53:54 +02:00
Sébastien Loriot
5f495e579e
fix gcc compilation issues
2013-10-24 11:14:04 +02:00
Jane Tournois
145f01a8f6
reset sliver_cache at the end of perturbation to have them free to perturb wrt another criterion now
2013-10-22 12:50:39 +02:00
Jane Tournois
a5f7c5ab7f
add boolean template parameter to Sliver_criterion, that decides if
...
the sliver_cache should be updated by operator()(cell_handle).
It can be useful when we write a complex criterion that implies two simpler
criteria for example, and we want the cache to be updated for only one of them
(to avoid inconsistencies)
+ add a sliver_cache reset because valid_move does re-compute the cache
2013-10-21 15:24:24 +02:00
Jane Tournois
064225638b
Revert "fix compilation of my previous commit in debug mode"
...
This reverts commit 36f92c50a3 .
And fix it for compilation on debug mode
2013-10-18 14:33:55 +02:00
Jane Tournois
5b50dfad86
make use of the sliver_cache in sliver_criteria
...
warning : this assumes that sliver_cache stores the value corresponding to this criterion!
2013-10-18 13:01:57 +02:00
Jane Tournois
36f92c50a3
fix compilation of my previous commit in debug mode
2013-10-18 13:00:55 +02:00
Jane Tournois
ca249eb5f9
add an operator()(Cell_handle) to Sliver_criterion
...
this implies changing the template parameters of Sliver_criterion,
which now needs to know the Triangulation type
2013-10-18 12:38:21 +02:00
Jane Tournois
ec2b35e398
make sure the same default values as in master are used
...
- default_value (=12) for perturber,
- max_value (=90) for exuder
2013-10-17 15:48:39 +02:00
Jane Tournois
80f3618be8
complete previous commit
2013-10-17 12:18:04 +02:00
Jane Tournois
ae851c9747
remove sliver_bound_ member variable from the perturber and exuder
...
This variable is now stored exclusively in the sliver_criterion choosen for optimization.
And - remove some default parameters to avoid inconsistencies
2013-10-17 11:19:37 +02:00
Laurent Rineau
fcbbe713d5
No longer deprecate Mesh_cell_base_3
...
Compact_mesh_cell_base_3 has a different API than Mesh_cell_base_3. Unless
one uses the default template parameters, the new API is less
convenient. We cannot deprecate Mesh_cell_base_3 so easily.
2013-10-16 16:34:41 +02:00
Jane Tournois
864fbaae36
Merge remote-tracking branch 'remotes/origin/Mesh_3-fix_perturber-GF' into Mesh_3-add_sliver_perturber_criteria-GF
...
Conflicts:
Mesh_3/include/CGAL/Mesh_3/C3T3_helpers.h
2013-10-15 11:56:25 +02:00
Laurent Rineau
1855c174d6
Reverting "a second intrusive list of cells should not be used this would induce some bugs in global optimizers (because modified_cells should be an intrusive list, and we should not modify previous_intrusive and next_intrusive for cells that are not inside this list"
...
Revert "a second intrusive list of cells should not be used"
This reverts commit 8674523d10 .
2013-10-14 17:16:52 +02:00
Laurent Rineau
924aa6a01e
Fix whitespace in recent commits
2013-10-14 17:12:54 +02:00
Laurent Rineau
240385d011
Add expensive assertions to check the circumcenter cache
2013-10-14 17:12:54 +02:00
Jane Tournois
13ed8627c2
fix check_surface_mesh topology criterion
...
the vertex that is moving should not be taken into account when we compare the list of vertices of the move conflict zone before/after the move
2013-10-14 17:08:00 +02:00
Jane Tournois
8674523d10
a second intrusive list of cells should not be used
...
this would induce some bugs in global optimizers (because modified_cells should be an intrusive list, and we should not modify previous_intrusive and next_intrusive for cells that are not inside this list
2013-10-14 17:05:05 +02:00
Jane Tournois
14d78bea51
remove set_sliver_value inside debugging code to have the same behavior with and without the macro being defined
2013-10-14 15:55:41 +02:00
Jane Tournois
8744e35474
add more expensive debugging code
2013-10-11 16:29:43 +02:00
Jane Tournois
4a25da8353
add expensive debugging code
2013-10-11 16:19:34 +02:00
Jane Tournois
85beea510e
use Sliver_criterion_value functor inside Is_sliver
2013-10-11 15:08:40 +02:00
Laurent Rineau
7ef932d79b
add assertion to check cache validity
2013-10-11 15:04:25 +02:00
Jane Tournois
46b39b0377
Merge branch 'Mesh_3-add_sliver_perturber_criteria-GF-old' into Mesh_3-add_sliver_perturber_criteria-GF
...
Conflicts:
Mesh_3/include/CGAL/Mesh_3/C3T3_helpers.h
2013-10-10 11:59:09 +02:00
Laurent Rineau
3f88b4d746
Merge remote-tracking branch 'origin/Mesh_3-fix_perturber-GF'
...
- In Mesh_3, fix the sliver perturber
- the invalidatation of caches,
- the topological check (in check_surface_mesh) was not enough.
Tested in CGAL-4.3-Ic-194
2013-10-09 14:51:32 +02:00
Laurent Rineau
2c78278fdc
Fix a compilation bug with older version of g++, and Boost Lambda
...
The error was triggered by the following code in CGAL/Mesh_3/C3T3_helpers.h:
template <typename CellForwardIterator>
void reset_circumcenter_cache(CellForwardIterator cells_begin,
CellForwardIterator cells_end) const
{
namespace bl = boost::lambda;
std::for_each(cells_begin, cells_end,
bl::bind(&Cell::invalidate_circumcenter, *bl::_1) );
}
See for example test results here:
CGAL-4.3-Ic-193/Polyhedron_Demo/TestReport_lrineau_i686_Linux-2.6_g++-4.1.2_CentOS-5.1.gz
2013-10-08 16:55:58 +02:00
Laurent Rineau
85d880efc1
Constify two methods that can be const
2013-10-08 16:54:34 +02:00
Jane Tournois
72deb04640
fix compilation on windows
...
(cherry picked from commit 8ec9e7e2cfd51edf026807059343b4220093611e)
2013-10-08 16:51:26 +02:00
Laurent Rineau
8edeb9095f
Add more comment debug outputs (for future debugging)
2013-10-08 16:11:19 +02:00
Laurent Rineau
7248da1509
Fix the slivers perturber
...
The testsuite showed that our previous patch was not correct: the sliver
cache is modified by a call to C3T3_helper::min_sliver_in_c3t3_value() when
its parameter use_cache=false. For that reason, the resetting of sliver
caches was not done at the right place in update_mesh_no_topo_change().
2013-10-08 14:23:05 +02:00
Laurent Rineau
55153e58b1
Fix a warning about unused local typedef
2013-10-04 18:01:17 +02:00
Jane Tournois
245250dfad
do not test inside_protecting_balls for ODT and Lloyd because it slows down the algorithm and never happens for Lloyd and ODT (experimentally tested. Maybe it can happen some day...)
2013-10-02 12:59:03 +02:00
Laurent Rineau
f06d2057d6
Uniformize my uses of std::setprecision
2013-09-27 17:58:00 +02:00
Laurent Rineau
67b20e8a19
Fix the sliver perturber
...
- the invalidatation of caches,
- the topological check (in check_surface_mesh) was not enough.
2013-09-27 17:52:57 +02:00
Jane Tournois
dd25eb2cfd
add simple check to avoid some comparisons
2013-09-26 16:45:12 +02:00
Jane Tournois
00bad608c5
add helper function
2013-09-26 16:18:48 +02:00
Sébastien Loriot
a05c50e83a
fix backward compatibility of Mesh_3 with intersection API v1
2013-09-25 18:13:11 +02:00
Jane Tournois
8a59b57dc2
Revert "set vertex weight in exuder by using old_v->set_point(p) instead of insert(p)"
...
This reverts commit f56360f94b .
Note : connectivity can change with "insert", not with "set_point",
so this commit was wrong
2013-09-24 13:58:40 +02:00
Jane Tournois
e59c57f08e
make sure that global optimizers (lloyd and odt) don't move vertices inside protecting balls
2013-09-23 16:53:44 +02:00
Jane Tournois
85eecc920f
make sure that the perturber does not insert any vertex inside a protecting ball
2013-09-23 16:35:09 +02:00
Andreas Fabri
9ed4f837c3
Merge branch 'CGAL-compilable_headers-GF'
...
The conflict was about whitesapce
Approved by the release manager
Conflicts:
Polyhedron/include/CGAL/Polyhedron_copy_3.h
2013-09-23 14:50:17 +02:00
Jane Tournois
f56360f94b
set vertex weight in exuder by using old_v->set_point(p) instead of insert(p)
2013-09-20 17:02:36 +02:00
Jane Tournois
c14ea9db07
rename variable because criterion is not necessarily an angle (anymore)
2013-09-20 16:16:57 +02:00
Jane Tournois
6bc75327f5
use new sliver criterion functions before_move and valid_move to decide whether a move should be made or not
2013-09-20 16:04:26 +02:00
Laurent Rineau
45f2b7634f
Merge branch 'Mesh_3-fix_assertion_in_the_protection_code-lrineau'
...
Fix the test of an assertion in <CGAL/Mesh_3/Protect_edges_sizing_field.h>…
Tested in CGAL-4.3-Ic-174.
Approuved for CGAL-4.3 by the Release Manager.
2013-09-18 15:07:56 +02:00
Laurent Rineau
930a7862d4
Fix the patch when CGAL_NO_ASSERTIONS is defined.
2013-09-17 11:10:42 +02:00
Laurent Rineau
7b6fb384d3
Remove extra semi-colons
2013-09-17 11:03:17 +02:00
Laurent Rineau
34b13affef
Try to "fix" an assertion that compares a computed value to another
...
On the paper, dleft_frac must be greater that 1.0. But with rounding
errors, it can be slightly lower. Let's try to compare it with
1.0-2*ulp(1.0).
I do not like that sort of hack but I do not know what to do best.
2013-09-17 10:58:38 +02:00
Andreas Fabri
aa1d4e57f2
Remove unused variable name
2013-09-17 09:36:35 +02:00
Jane Tournois
69cc217279
add a boolean option to valid_move to accept a move if the new value is lower than the old one, but above the sliver_bound
2013-09-16 11:28:59 +02:00
Jane Tournois
1a449621b4
fix access to static max_value
2013-09-16 11:25:08 +02:00
Andreas Fabri
6c547e5663
Mainly added includes
2013-09-13 22:24:30 +02:00
Andreas Fabri
3f93665e03
Suppress a VC++ warning with a pragma
2013-09-12 12:49:11 +02:00