Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Periodic_3_mesh_3: Avoid Making Copies #8639

Merged
merged 10 commits into from
Dec 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions Mesh_3/include/CGAL/Mesh_3/min_dihedral_angle.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ minimum_dihedral_angle(
const typename K::Point_3& p1,
const typename K::Point_3& p2,
const typename K::Point_3& p3,
K k = K())
const K& k = K())
{
typedef typename K::FT FT;

Expand Down Expand Up @@ -84,7 +84,7 @@ minimum_dihedral_angle(
const typename K::Point_3& p1,
const typename K::Point_3& p2,
const typename K::Point_3& p3,
K k = K())
const K& k = K())
{
typedef typename K::FT FT;

Expand Down Expand Up @@ -139,7 +139,7 @@ minimum_dihedral_angle(

template <typename K>
typename K::FT
minimum_dihedral_angle(const typename K::Tetrahedron_3& t, K k = K() )
minimum_dihedral_angle(const typename K::Tetrahedron_3& t , const K& k = K())
{
return minimum_dihedral_angle(t[0],t[1],t[2],t[3],k);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -236,11 +236,19 @@ C3t3 make_mesh(const Labeling_function& labeling_function, const Iso_cuboid& can
{
Periodic_mesh_domain domain(labeling_function, canonical_cube);

#ifdef CGAL_NDEBUG
Periodic_mesh_criteria criteria(facet_angle = 30.,
facet_size = 0.03 * 2 /*domain's edge length*/,
facet_distance = 0.03 * 2 /*domain's edge length*/,
cell_radius_edge_ratio = 2.,
cell_size = 0.05);
#else
Periodic_mesh_criteria criteria(facet_angle = 30.,
facet_size = 0.1 * 2 /*domain's edge length*/,
facet_distance = 0.1 * 2 /*domain's edge length*/,
cell_radius_edge_ratio = 2.,
cell_size = 0.1);
#endif

return CGAL::make_periodic_3_mesh_3<C3t3>(domain, criteria);
}
Expand Down Expand Up @@ -313,7 +321,6 @@ int main(int, char**)
std::cout << std::endl;
}
}

std::cout << "EXIT SUCCESS" << std::endl;
return 0;
}
Original file line number Diff line number Diff line change
Expand Up @@ -544,7 +544,7 @@ class Periodic_3_regular_triangulation_3
typedef CGAL::Periodic_3_regular_triangulation_remove_traits_3< Gt > P3removeT;
typedef CGAL::Regular_triangulation_3< P3removeT > Euclidean_triangulation;
typedef Vertex_remover< Euclidean_triangulation > Remover;
P3removeT remove_traits(domain());
P3removeT remove_traits(geom_traits());
Euclidean_triangulation tmp(remove_traits);
Remover remover(this, tmp);
Conflict_tester ct(this);
Expand Down Expand Up @@ -576,7 +576,7 @@ class Periodic_3_regular_triangulation_3
typedef CGAL::Regular_triangulation_3< P3removeT > Euclidean_triangulation;
typedef Vertex_remover< Euclidean_triangulation > Remover;

P3removeT remove_traits(domain());
P3removeT remove_traits(geom_traits());
Euclidean_triangulation tmp(remove_traits);
Remover remover(this, tmp);
Cover_manager cover_manager(*this);
Expand Down
Loading