const-construct facets_of_border

This commit is contained in:
Laurent Rineau 2025-09-23 15:54:04 +02:00
parent 9726fb59bc
commit 9a241b2a9d
1 changed files with 14 additions and 8 deletions

View File

@ -2190,18 +2190,24 @@ private:
process_older_cavity_algorithm(intersecting_edges, intersecting_cells, facets_of_upper_cavity, facets_of_lower_cavity); process_older_cavity_algorithm(intersecting_edges, intersecting_cells, facets_of_upper_cavity, facets_of_lower_cavity);
} // older algorithm } // older algorithm
std::set<Facet> facets_of_border; // those facets are viewed from the outside of the cavity
Union_find<Vertex_handle> vertices_of_cavity_union_find; const std::set<Facet> facets_of_border = std::invoke([&] {
if(this->use_newer_cavity_algorithm()) { std::set<Facet> facets_of_border;
for(auto c: intersecting_cells) { if(this->use_newer_cavity_algorithm()) {
for(int i = 0; i < 4; ++i) { for(auto c : intersecting_cells) {
auto n = c->neighbor(i); for(int i = 0; i < 4; ++i) {
if(intersecting_cells.count(n) == 0) { auto n = c->neighbor(i);
facets_of_border.emplace(n, n->index(c)); if(intersecting_cells.count(n) == 0) {
facets_of_border.emplace(n, n->index(c));
}
} }
} }
} }
return facets_of_border;
});
if(this->use_newer_cavity_algorithm()) {
Unique_hash_map<Vertex_handle, typename Union_find<Vertex_handle>::handle> vertices_of_cavity_handles; Unique_hash_map<Vertex_handle, typename Union_find<Vertex_handle>::handle> vertices_of_cavity_handles;
Union_find<Vertex_handle> vertices_of_cavity_union_find;
for(auto c: intersecting_cells) { for(auto c: intersecting_cells) {
for(auto v : tr().vertices(c)) { for(auto v : tr().vertices(c)) {
if(!is_marked(v)) { if(!is_marked(v)) {