Commit Graph

677 Commits

Author SHA1 Message Date
Sébastien Loriot 143a8e1e88 fix warning 2025-07-03 09:31:23 +02:00
Jane Tournois fcf02c4ceb make tetrahedral_remeshing deterministic
* use make_vertex_pair(edge) for ordered pair
* do not move vertices in the order of the unordered_map m_vertex_id,
but in the order of vertices_iterator, which is deterministic. To do so,
add struct Move that embeds all the needed data to compute the move

AND avoid computing twice the same midpoint
2025-06-20 14:22:50 +02:00
Jane Tournois e7aec72cdb fix operator<() for Dihedral_angle_cosine
using <= makes possible to have
dh1 < dh2 && dh2 < dh1 valid
2025-05-13 15:39:18 +02:00
Andreas Fabri feaa60ff81 Remove name of parameter which is only there for matching a function 2025-03-19 08:40:49 +01:00
Jane Tournois fcfae432e5 trailing whitespaces 2025-03-18 16:53:42 +01:00
Jane Tournois 1e553a2e90 for tetrahedra with very-very small volume (like 1e-15), split at midpoint can invert orientation
this commit introduces a heuristic to try other split points, close to midpoint, and hope
to find one that do not invert any incident tetrahedron to the edge to be split
2025-03-18 16:44:01 +01:00
Jane Tournois 9687034ac3 move `remove_from_complex(e)` after checking orientation
otherwise it may happen that `e` is removed from complex, then Vertex_handle()
is returned to cancel split, and `e` is not re-added to the complex
2025-03-14 15:53:14 +01:00
Mael 72520db3a8
Use std::optional::reset
Co-authored-by: Anirudh Lakhanpal <91114837+SharonIV0x86@users.noreply.github.com>
2025-01-17 09:15:36 +01:00
Mael Rouxel-Labbé e1b7c4726e Replace boost::optional with std::optional
See https://github.com/CGAL/cgal/pull/7526
2025-01-16 13:45:12 +01:00
Jane Tournois 76de0f3f8c this assertion is invalid
it would break for example when the function takes a far vertex, inserted by
parallel version of Mesh_3
2024-07-25 12:18:39 +02:00
Jane Tournois 7cb7be8a2e 3 missing typedefs 2024-05-16 10:41:29 +02:00
Sébastien Loriot cf186388f6 accomodate AABB-tree package API update 2024-05-15 18:43:57 +02:00
Jane Tournois 428a2bf600 doc 2024-05-10 10:39:21 +02:00
Jane Tournois 30a66089b8 replace f by ff!
and use facet_edges() helper function
2024-05-06 17:50:23 +02:00
Jane Tournois f8ff5f6f1c verbose mode 2024-05-06 17:28:23 +02:00
Jane Tournois de8953bacf rename mass to density 2024-05-06 16:54:20 +02:00
Jane Tournois 6727a64e6a Revert "fix moving with sizing formula"
This reverts commit bbeb755d379b56198ee879b648b80bde7fed041e

but keep the vh*_moving booleans
2024-05-06 15:38:35 +02:00
Jane Tournois d4e2bd0436 speedup max_cos_dihedral_angle 2024-05-06 09:13:25 +02:00
Jane Tournois 0b203b1d26 add missing 'expensive' 2024-05-02 15:44:58 +02:00
Jane Tournois f8d3a4bce9 avoid copies 2024-05-02 15:44:42 +02:00
Jane Tournois cb734cd9fd unused typedef 2024-05-02 15:44:20 +02:00
Jane Tournois ff15dd7121 turn more assertions into expensive_assertions 2024-04-30 17:04:36 +02:00
Jane Tournois 2fc25a87e3 fix moving with sizing formula
xi* = sum(xi * length / sizing(midpoint)) * 1./sum(length / sizing(midpoint))

and reorganize code for fewer computations
2024-04-30 16:16:59 +02:00
Jane Tournois 3b74baac1a fix collapse condition 2024-04-30 16:15:23 +02:00
Jane Tournois 28f377a8a6 fix average_edge_length_3(cell)
we actually need all edges of selected cells, even boundary edges, to get a size gradation
as close as possible to the input sizes
2024-04-30 11:48:43 +02:00
Jane Tournois ebb70f7538 add approximate_edge_length(edge) helper function 2024-04-26 16:17:06 +02:00
Jane Tournois fad15d129b cleaning 2024-04-26 15:26:59 +02:00
Jane Tournois 1a4fd5ae04 use midpoint_with_info() in density_along_segment() 2024-04-26 15:26:42 +02:00
Jane Tournois 987dffb615 remove comment 2024-04-26 14:29:44 +02:00
Jane Tournois c954e36591 Improve Adaptive_remeshing_sizing_field
* use 2 kd_trees to find nearest neighbors, either on surfaces (kd_tree_2)
or inside volume (kd_tree_3)
* insert more points in the kd-trees, at centroids and midpoints, to densify the
point sets and be more robust to extreme cases (for example when there are no
vertices with dimension 3)
* interpolate sizing values among nearest neighbors
2024-04-26 14:29:25 +02:00
Jane Tournois 5f21b2c01f add midpoint_with_info() to avoid duplicate code 2024-04-26 14:24:04 +02:00
Jane Tournois 17736e925d compute lower and upper size bounds at edge midpoint 2024-04-26 11:52:01 +02:00
Jane Tournois e84b01b4a2 density is 1/sizing to have mass = length/sizing a quantity with no dimension
and rename function to density
2024-04-26 11:36:59 +02:00
Jane Tournois 97b5be8c35 move max_dimension_index() higher in file 2024-04-26 11:34:04 +02:00
Jane Tournois 4024802646 add missing return type 2024-04-26 11:32:04 +02:00
Jane Tournois 2563f90ee1 fix dump functions used inside debug macro 2024-04-26 11:29:39 +02:00
Jane Tournois e31281733c add boundary info to collapsibility test 2024-04-26 10:28:59 +02:00
Jane Tournois 99364301cc rename smoothed_positions to moves 2024-04-25 10:02:34 +02:00
Jane Tournois 8adec595ac add helper function to update bimap (as priority queue) 2024-04-15 12:17:51 +02:00
Jane Tournois b4c28e6806 Partially revert e483dacc3b44f4772043ccffa1a52c46ffcabdbe.
this function is needed in the demo plugin
2024-04-15 09:46:33 +02:00
Jane Tournois ed72bfc811 use Edge instead of pair<vertex> to avoid calling is_edge()
not much faster
2024-04-12 18:39:51 +02:00
Jane Tournois cee3385706 remove edges from bimap after collapse instead of checking if they are still too short 2024-04-12 16:55:11 +02:00
Jane Tournois 1dd7aa3a2b avoid a few vector constructions
(and remove unused code)
2024-04-12 09:19:35 +02:00
Jane Tournois 0f43097979 transform assertions into expensive_assertions 2024-04-11 15:23:17 +02:00
Jane Tournois 3a54c88055 0.9 induces up to 22 iterations
let's reduce it to 0.5 (up to 4 iterations/reductions)
2024-04-11 09:43:15 +02:00
Jane Tournois b0befd8008 move dumps from verbose to debug mode 2024-04-09 16:19:09 +02:00
Jane Tournois 60ebab92fc add timers in verbose mode 2024-04-09 16:17:38 +02:00
Jane Tournois d46474a318 add doxygen group for sizing fields 2024-04-09 15:20:25 +02:00
Jane Tournois 2a131effdb hide enable_if in DOXYGEN_RUNNING 2024-04-09 13:45:25 +02:00
Jane Tournois 4e8a4c7d64 make calls robust to all number types convertible to double
including int (now tested)
2024-04-09 12:40:00 +02:00