mirror of https://github.com/CGAL/cgal
Remove the "domain" parameter of the exuder
It had been added for the parallel version, but it's not needed anymore
This commit is contained in:
parent
e3abf7fc40
commit
a0948a9dac
|
|
@ -677,8 +677,7 @@ class Optimization_function < Domain, Exude_parameters >
|
||||||
typedef C3t3::Triangulation Tr;
|
typedef C3t3::Triangulation Tr;
|
||||||
typedef CGAL::Mesh_3::Min_dihedral_angle_criterion<Tr> Sc;
|
typedef CGAL::Mesh_3::Min_dihedral_angle_criterion<Tr> Sc;
|
||||||
typedef Exude_visitor Visitor;
|
typedef Exude_visitor Visitor;
|
||||||
typedef CGAL::Mesh_3::Slivers_exuder<
|
typedef CGAL::Mesh_3::Slivers_exuder<C3t3,Sc,Visitor> Exuder;
|
||||||
C3t3,Domain,Sc,Visitor> Exuder;
|
|
||||||
|
|
||||||
typedef Optimization_function_base< Domain > Base;
|
typedef Optimization_function_base< Domain > Base;
|
||||||
|
|
||||||
|
|
@ -716,7 +715,7 @@ protected:
|
||||||
if ( NULL != exude_ ) { return CGAL::MESH_OPTIMIZATION_UNKNOWN_ERROR; }
|
if ( NULL != exude_ ) { return CGAL::MESH_OPTIMIZATION_UNKNOWN_ERROR; }
|
||||||
|
|
||||||
// Create exuder
|
// Create exuder
|
||||||
exude_ = new Exuder(c3t3, domain, criterion_);
|
exude_ = new Exuder(c3t3, criterion_);
|
||||||
if ( NULL == exude_ ) { return CGAL::MESH_OPTIMIZATION_UNKNOWN_ERROR; }
|
if ( NULL == exude_ ) { return CGAL::MESH_OPTIMIZATION_UNKNOWN_ERROR; }
|
||||||
|
|
||||||
// Set time_limit
|
// Set time_limit
|
||||||
|
|
|
||||||
|
|
@ -60,7 +60,7 @@ int main()
|
||||||
CGAL::perturb_mesh_3(c3t3, domain, time_limit=5, sliver_bound=12);
|
CGAL::perturb_mesh_3(c3t3, domain, time_limit=5, sliver_bound=12);
|
||||||
|
|
||||||
// Exudation
|
// Exudation
|
||||||
CGAL::exude_mesh_3(c3t3, domain);
|
CGAL::exude_mesh_3(c3t3);
|
||||||
|
|
||||||
// Output
|
// Output
|
||||||
medit_file.open("out_optimized.mesh");
|
medit_file.open("out_optimized.mesh");
|
||||||
|
|
|
||||||
|
|
@ -52,7 +52,7 @@ int main()
|
||||||
no_perturb(), no_exude());
|
no_perturb(), no_exude());
|
||||||
|
|
||||||
CGAL::lloyd_optimize_mesh_3(c3t3_bis, domain, time_limit=30);
|
CGAL::lloyd_optimize_mesh_3(c3t3_bis, domain, time_limit=30);
|
||||||
CGAL::exude_mesh_3(c3t3_bis, domain, sliver_bound=10, time_limit=10);
|
CGAL::exude_mesh_3(c3t3_bis, sliver_bound=10, time_limit=10);
|
||||||
|
|
||||||
// Output
|
// Output
|
||||||
std::ofstream medit_file("out.mesh");
|
std::ofstream medit_file("out.mesh");
|
||||||
|
|
|
||||||
|
|
@ -3393,54 +3393,54 @@ bool
|
||||||
C3T3_helpers<C3T3,MD>::
|
C3T3_helpers<C3T3,MD>::
|
||||||
try_lock_and_get_incident_cells(const Vertex_handle& v,
|
try_lock_and_get_incident_cells(const Vertex_handle& v,
|
||||||
Cell_vector &cells) const
|
Cell_vector &cells) const
|
||||||
{
|
|
||||||
// We need to lock v individually first, to be sure v->cell() is valid
|
|
||||||
if (!try_lock_vertex(v))
|
|
||||||
return false;
|
|
||||||
|
|
||||||
Cell_handle d = v->cell();
|
|
||||||
if (!try_lock_element(d)) // LOCK
|
|
||||||
{
|
{
|
||||||
unlock_all_elements();
|
// We need to lock v individually first, to be sure v->cell() is valid
|
||||||
return false;
|
if (!try_lock_vertex(v))
|
||||||
}
|
return false;
|
||||||
cells.push_back(d);
|
|
||||||
d->tds_data().mark_in_conflict();
|
|
||||||
int head=0;
|
|
||||||
int tail=1;
|
|
||||||
do {
|
|
||||||
Cell_handle c = cells[head];
|
|
||||||
|
|
||||||
for (int i=0; i<4; ++i) {
|
Cell_handle d = v->cell();
|
||||||
if (c->vertex(i) == v)
|
if (!try_lock_element(d)) // LOCK
|
||||||
continue;
|
{
|
||||||
Cell_handle next = c->neighbor(i);
|
unlock_all_elements();
|
||||||
|
return false;
|
||||||
if (!try_lock_element(next)) // LOCK
|
|
||||||
{
|
|
||||||
BOOST_FOREACH(Cell_handle& ch,
|
|
||||||
std::make_pair(cells.begin(), cells.end()))
|
|
||||||
{
|
|
||||||
ch->tds_data().clear();
|
|
||||||
}
|
|
||||||
cells.clear();
|
|
||||||
unlock_all_elements();
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
if (! next->tds_data().is_clear())
|
|
||||||
continue;
|
|
||||||
cells.push_back(next);
|
|
||||||
++tail;
|
|
||||||
next->tds_data().mark_in_conflict();
|
|
||||||
}
|
}
|
||||||
++head;
|
cells.push_back(d);
|
||||||
} while(head != tail);
|
d->tds_data().mark_in_conflict();
|
||||||
BOOST_FOREACH(Cell_handle& ch, std::make_pair(cells.begin(), cells.end()))
|
int head=0;
|
||||||
{
|
int tail=1;
|
||||||
ch->tds_data().clear();
|
do {
|
||||||
|
Cell_handle c = cells[head];
|
||||||
|
|
||||||
|
for (int i=0; i<4; ++i) {
|
||||||
|
if (c->vertex(i) == v)
|
||||||
|
continue;
|
||||||
|
Cell_handle next = c->neighbor(i);
|
||||||
|
|
||||||
|
if (!try_lock_element(next)) // LOCK
|
||||||
|
{
|
||||||
|
BOOST_FOREACH(Cell_handle& ch,
|
||||||
|
std::make_pair(cells.begin(), cells.end()))
|
||||||
|
{
|
||||||
|
ch->tds_data().clear();
|
||||||
|
}
|
||||||
|
cells.clear();
|
||||||
|
unlock_all_elements();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (! next->tds_data().is_clear())
|
||||||
|
continue;
|
||||||
|
cells.push_back(next);
|
||||||
|
++tail;
|
||||||
|
next->tds_data().mark_in_conflict();
|
||||||
|
}
|
||||||
|
++head;
|
||||||
|
} while(head != tail);
|
||||||
|
BOOST_FOREACH(Cell_handle& ch, std::make_pair(cells.begin(), cells.end()))
|
||||||
|
{
|
||||||
|
ch->tds_data().clear();
|
||||||
|
}
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
template <typename C3T3, typename MD>
|
template <typename C3T3, typename MD>
|
||||||
template <typename Filter>
|
template <typename Filter>
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,6 @@
|
||||||
|
|
||||||
#include <CGAL/Double_map.h>
|
#include <CGAL/Double_map.h>
|
||||||
#include <CGAL/iterator.h>
|
#include <CGAL/iterator.h>
|
||||||
#include <CGAL/Mesh_3/C3T3_helpers.h>
|
|
||||||
#include <map>
|
#include <map>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <set>
|
#include <set>
|
||||||
|
|
@ -361,7 +360,6 @@ private:
|
||||||
|
|
||||||
template <
|
template <
|
||||||
typename C3T3,
|
typename C3T3,
|
||||||
typename MeshDomain,
|
|
||||||
typename SliverCriteria,
|
typename SliverCriteria,
|
||||||
typename Visitor_ = Null_exuder_visitor<C3T3>,
|
typename Visitor_ = Null_exuder_visitor<C3T3>,
|
||||||
typename FT = typename C3T3::Triangulation::Geom_traits::FT
|
typename FT = typename C3T3::Triangulation::Geom_traits::FT
|
||||||
|
|
@ -379,7 +377,7 @@ public: // Types
|
||||||
|
|
||||||
private: // Types
|
private: // Types
|
||||||
|
|
||||||
typedef Slivers_exuder<C3T3, MeshDomain, SliverCriteria, Visitor_, FT> Self;
|
typedef Slivers_exuder<C3T3, SliverCriteria, Visitor_, FT> Self;
|
||||||
|
|
||||||
typedef typename C3T3::Triangulation Tr;
|
typedef typename C3T3::Triangulation Tr;
|
||||||
typedef typename Tr::Weighted_point Weighted_point;
|
typedef typename Tr::Weighted_point Weighted_point;
|
||||||
|
|
@ -426,10 +424,7 @@ private: // Types
|
||||||
// Should define
|
// Should define
|
||||||
// - after_cell_pumped(std::size_t cells_left_number)
|
// - after_cell_pumped(std::size_t cells_left_number)
|
||||||
typedef Visitor_ Visitor;
|
typedef Visitor_ Visitor;
|
||||||
|
|
||||||
// Helper
|
|
||||||
typedef class C3T3_helpers<C3T3,MeshDomain> C3T3_helpers;
|
|
||||||
|
|
||||||
using Base::get_lock_data_structure;
|
using Base::get_lock_data_structure;
|
||||||
|
|
||||||
public: // methods
|
public: // methods
|
||||||
|
|
@ -442,7 +437,6 @@ public: // methods
|
||||||
* max_weight(v) < d*dist(v,nearest_vertice(v))
|
* max_weight(v) < d*dist(v,nearest_vertice(v))
|
||||||
*/
|
*/
|
||||||
Slivers_exuder(C3T3& c3t3,
|
Slivers_exuder(C3T3& c3t3,
|
||||||
const MeshDomain& domain,
|
|
||||||
const SliverCriteria& criterion,
|
const SliverCriteria& criterion,
|
||||||
double d = 0.45);
|
double d = 0.45);
|
||||||
|
|
||||||
|
|
@ -458,9 +452,6 @@ public: // methods
|
||||||
WallClockTimer t;
|
WallClockTimer t;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Reset sliver value cache
|
|
||||||
helper_.reset_cache();
|
|
||||||
|
|
||||||
Mesh_optimization_return_code ret =
|
Mesh_optimization_return_code ret =
|
||||||
pump_vertices<true>(sliver_criteria_.sliver_bound(), visitor);
|
pump_vertices<true>(sliver_criteria_.sliver_bound(), visitor);
|
||||||
|
|
||||||
|
|
@ -866,7 +857,6 @@ private:
|
||||||
|
|
||||||
bool initialized_;
|
bool initialized_;
|
||||||
SliverCriteria sliver_criteria_;
|
SliverCriteria sliver_criteria_;
|
||||||
C3T3_helpers helper_;
|
|
||||||
|
|
||||||
// Timer
|
// Timer
|
||||||
double time_limit_;
|
double time_limit_;
|
||||||
|
|
@ -931,9 +921,9 @@ private:
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
template <typename C3T3, typename Md, typename SC, typename V_, typename FT>
|
template <typename C3T3, typename SC, typename V_, typename FT>
|
||||||
Slivers_exuder<C3T3,Md,SC,V_,FT>::
|
Slivers_exuder<C3T3,SC,V_,FT>::
|
||||||
Slivers_exuder(C3T3& c3t3, const Md& domain, const SC& criteria, double d)
|
Slivers_exuder(C3T3& c3t3, const SC& criteria, double d)
|
||||||
: Base(c3t3.bbox(),
|
: Base(c3t3.bbox(),
|
||||||
Concurrent_mesher_config::get().locking_grid_num_cells_per_axis)
|
Concurrent_mesher_config::get().locking_grid_num_cells_per_axis)
|
||||||
, c3t3_(c3t3)
|
, c3t3_(c3t3)
|
||||||
|
|
@ -944,7 +934,6 @@ Slivers_exuder(C3T3& c3t3, const Md& domain, const SC& criteria, double d)
|
||||||
, num_of_treated_vertices_(0)
|
, num_of_treated_vertices_(0)
|
||||||
, initialized_(false)
|
, initialized_(false)
|
||||||
, sliver_criteria_(criteria)
|
, sliver_criteria_(criteria)
|
||||||
, helper_(c3t3_,domain,get_lock_data_structure())
|
|
||||||
, time_limit_(-1)
|
, time_limit_(-1)
|
||||||
, running_time_()
|
, running_time_()
|
||||||
{
|
{
|
||||||
|
|
@ -953,10 +942,10 @@ Slivers_exuder(C3T3& c3t3, const Md& domain, const SC& criteria, double d)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template <typename C3T3, typename Md, typename SC, typename V_, typename FT>
|
template <typename C3T3, typename SC, typename V_, typename FT>
|
||||||
template <bool pump_vertices_on_surfaces>
|
template <bool pump_vertices_on_surfaces>
|
||||||
Mesh_optimization_return_code
|
Mesh_optimization_return_code
|
||||||
Slivers_exuder<C3T3,Md,SC,V_,FT>::
|
Slivers_exuder<C3T3,SC,V_,FT>::
|
||||||
pump_vertices(double sliver_criterion_limit,
|
pump_vertices(double sliver_criterion_limit,
|
||||||
Visitor& visitor)
|
Visitor& visitor)
|
||||||
{
|
{
|
||||||
|
|
@ -1103,10 +1092,10 @@ pump_vertices(double sliver_criterion_limit,
|
||||||
} // end function pump_vertices
|
} // end function pump_vertices
|
||||||
|
|
||||||
|
|
||||||
template <typename C3T3, typename Md, typename SC, typename V_, typename FT>
|
template <typename C3T3, typename SC, typename V_, typename FT>
|
||||||
template <bool pump_vertices_on_surfaces>
|
template <bool pump_vertices_on_surfaces>
|
||||||
bool
|
bool
|
||||||
Slivers_exuder<C3T3,Md,SC,V_,FT>::
|
Slivers_exuder<C3T3,SC,V_,FT>::
|
||||||
pump_vertex(const Vertex_handle& pumped_vertex,
|
pump_vertex(const Vertex_handle& pumped_vertex,
|
||||||
bool *could_lock_zone)
|
bool *could_lock_zone)
|
||||||
{
|
{
|
||||||
|
|
@ -1130,9 +1119,9 @@ pump_vertex(const Vertex_handle& pumped_vertex,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template <typename C3T3, typename Md, typename SC, typename V_, typename FT>
|
template <typename C3T3, typename SC, typename V_, typename FT>
|
||||||
void
|
void
|
||||||
Slivers_exuder<C3T3,Md,SC,V_,FT>::
|
Slivers_exuder<C3T3,SC,V_,FT>::
|
||||||
initialize_prestar_and_criterion_values(const Vertex_handle& v,
|
initialize_prestar_and_criterion_values(const Vertex_handle& v,
|
||||||
Pre_star& pre_star,
|
Pre_star& pre_star,
|
||||||
Sliver_values& criterion_values,
|
Sliver_values& criterion_values,
|
||||||
|
|
@ -1143,8 +1132,9 @@ initialize_prestar_and_criterion_values(const Vertex_handle& v,
|
||||||
// Parallel
|
// Parallel
|
||||||
if (could_lock_zone)
|
if (could_lock_zone)
|
||||||
{
|
{
|
||||||
if (!helper_.try_lock_and_get_incident_cells(v, incident_cells))
|
if (!tr_.try_lock_and_get_incident_cells(v, incident_cells))
|
||||||
{
|
{
|
||||||
|
this->unlock_all_elements();
|
||||||
*could_lock_zone = false;
|
*could_lock_zone = false;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
@ -1183,9 +1173,9 @@ initialize_prestar_and_criterion_values(const Vertex_handle& v,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template <typename C3T3, typename Md, typename SC, typename V_, typename FT>
|
template <typename C3T3, typename SC, typename V_, typename FT>
|
||||||
bool
|
bool
|
||||||
Slivers_exuder<C3T3,Md,SC,V_,FT>::
|
Slivers_exuder<C3T3,SC,V_,FT>::
|
||||||
expand_prestar(const Cell_handle& cell_to_add,
|
expand_prestar(const Cell_handle& cell_to_add,
|
||||||
const Vertex_handle& pumped_vertex,
|
const Vertex_handle& pumped_vertex,
|
||||||
Pre_star& pre_star,
|
Pre_star& pre_star,
|
||||||
|
|
@ -1279,9 +1269,9 @@ expand_prestar(const Cell_handle& cell_to_add,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template <typename C3T3, typename Md, typename SC, typename V_, typename FT>
|
template <typename C3T3, typename SC, typename V_, typename FT>
|
||||||
double
|
double
|
||||||
Slivers_exuder<C3T3,Md,SC,V_,FT>::
|
Slivers_exuder<C3T3,SC,V_,FT>::
|
||||||
get_best_weight(const Vertex_handle& v, bool *could_lock_zone) const
|
get_best_weight(const Vertex_handle& v, bool *could_lock_zone) const
|
||||||
{
|
{
|
||||||
// Get pre_star and criterion_values
|
// Get pre_star and criterion_values
|
||||||
|
|
@ -1364,9 +1354,9 @@ get_best_weight(const Vertex_handle& v, bool *could_lock_zone) const
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template <typename C3T3, typename Md, typename SC, typename V_, typename FT>
|
template <typename C3T3, typename SC, typename V_, typename FT>
|
||||||
typename Slivers_exuder<C3T3,Md,SC,V_,FT>::Umbrella
|
typename Slivers_exuder<C3T3,SC,V_,FT>::Umbrella
|
||||||
Slivers_exuder<C3T3,Md,SC,V_,FT>::
|
Slivers_exuder<C3T3,SC,V_,FT>::
|
||||||
get_umbrella(const Facet_vector& facets,
|
get_umbrella(const Facet_vector& facets,
|
||||||
const Vertex_handle& v) const
|
const Vertex_handle& v) const
|
||||||
{
|
{
|
||||||
|
|
@ -1387,10 +1377,10 @@ get_umbrella(const Facet_vector& facets,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template <typename C3T3, typename Md, typename SC, typename V_, typename FT>
|
template <typename C3T3, typename SC, typename V_, typename FT>
|
||||||
template <bool pump_vertices_on_surfaces>
|
template <bool pump_vertices_on_surfaces>
|
||||||
void
|
void
|
||||||
Slivers_exuder<C3T3,Md,SC,V_,FT>::
|
Slivers_exuder<C3T3,SC,V_,FT>::
|
||||||
restore_cells_and_boundary_facets(
|
restore_cells_and_boundary_facets(
|
||||||
const Boundary_facets_from_outside& boundary_facets_from_outside,
|
const Boundary_facets_from_outside& boundary_facets_from_outside,
|
||||||
const Vertex_handle& new_vertex)
|
const Vertex_handle& new_vertex)
|
||||||
|
|
@ -1442,9 +1432,9 @@ restore_cells_and_boundary_facets(
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
template <typename C3T3, typename Md, typename SC, typename V_, typename FT>
|
template <typename C3T3, typename SC, typename V_, typename FT>
|
||||||
typename Slivers_exuder<C3T3,Md,SC,V_,FT>::Ordered_edge
|
typename Slivers_exuder<C3T3,SC,V_,FT>::Ordered_edge
|
||||||
Slivers_exuder<C3T3,Md,SC,V_,FT>::get_opposite_ordered_edge(
|
Slivers_exuder<C3T3,SC,V_,FT>::get_opposite_ordered_edge(
|
||||||
const Facet& facet,
|
const Facet& facet,
|
||||||
const Vertex_handle& vertex) const
|
const Vertex_handle& vertex) const
|
||||||
{
|
{
|
||||||
|
|
@ -1472,9 +1462,9 @@ Slivers_exuder<C3T3,Md,SC,V_,FT>::get_opposite_ordered_edge(
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template <typename C3T3, typename Md, typename SC, typename V_, typename FT>
|
template <typename C3T3, typename SC, typename V_, typename FT>
|
||||||
void
|
void
|
||||||
Slivers_exuder<C3T3,Md,SC,V_,FT>::
|
Slivers_exuder<C3T3,SC,V_,FT>::
|
||||||
restore_internal_facets(const Umbrella& umbrella,
|
restore_internal_facets(const Umbrella& umbrella,
|
||||||
const Vertex_handle& new_vertex)
|
const Vertex_handle& new_vertex)
|
||||||
{
|
{
|
||||||
|
|
@ -1500,10 +1490,10 @@ restore_internal_facets(const Umbrella& umbrella,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template <typename C3T3, typename Md, typename SC, typename V_, typename FT>
|
template <typename C3T3, typename SC, typename V_, typename FT>
|
||||||
template <bool pump_vertices_on_surfaces>
|
template <bool pump_vertices_on_surfaces>
|
||||||
void
|
void
|
||||||
Slivers_exuder<C3T3,Md,SC,V_,FT>::
|
Slivers_exuder<C3T3,SC,V_,FT>::
|
||||||
update_mesh(const Weighted_point& new_point,
|
update_mesh(const Weighted_point& new_point,
|
||||||
const Vertex_handle& old_vertex,
|
const Vertex_handle& old_vertex,
|
||||||
bool *could_lock_zone)
|
bool *could_lock_zone)
|
||||||
|
|
@ -1565,10 +1555,10 @@ update_mesh(const Weighted_point& new_point,
|
||||||
|
|
||||||
#ifdef CGAL_LINKED_WITH_TBB
|
#ifdef CGAL_LINKED_WITH_TBB
|
||||||
// For parallel version
|
// For parallel version
|
||||||
template <typename C3T3, typename Md, typename SC, typename V_, typename FT>
|
template <typename C3T3, typename SC, typename V_, typename FT>
|
||||||
template <bool pump_vertices_on_surfaces>
|
template <bool pump_vertices_on_surfaces>
|
||||||
void
|
void
|
||||||
Slivers_exuder<C3T3,Md,SC,V_,FT>::
|
Slivers_exuder<C3T3,SC,V_,FT>::
|
||||||
enqueue_task(Cell_handle ch, unsigned int erase_counter, double value)
|
enqueue_task(Cell_handle ch, unsigned int erase_counter, double value)
|
||||||
{
|
{
|
||||||
this->enqueue_work(
|
this->enqueue_work(
|
||||||
|
|
@ -1580,10 +1570,10 @@ enqueue_task(Cell_handle ch, unsigned int erase_counter, double value)
|
||||||
|
|
||||||
|
|
||||||
#ifdef CGAL_MESH_3_DEBUG_SLIVERS_EXUDER
|
#ifdef CGAL_MESH_3_DEBUG_SLIVERS_EXUDER
|
||||||
template <typename C3T3, typename Md, typename SC, typename V_, typename FT>
|
template <typename C3T3, typename SC, typename V_, typename FT>
|
||||||
template <class Input_facet_it>
|
template <class Input_facet_it>
|
||||||
bool
|
bool
|
||||||
Slivers_exuder<C3T3,Md,SC,V_,FT>::
|
Slivers_exuder<C3T3,SC,V_,FT>::
|
||||||
check_pre_star(const Pre_star& pre_star,
|
check_pre_star(const Pre_star& pre_star,
|
||||||
Input_facet_it begin,
|
Input_facet_it begin,
|
||||||
Input_facet_it end,
|
Input_facet_it end,
|
||||||
|
|
@ -1687,9 +1677,9 @@ check_pre_star(const Pre_star& pre_star,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
template <typename C3T3, typename Md, typename SC, typename V_, typename FT>
|
template <typename C3T3, typename SC, typename V_, typename FT>
|
||||||
bool
|
bool
|
||||||
Slivers_exuder<C3T3,Md,SC,V_,FT>::
|
Slivers_exuder<C3T3,SC,V_,FT>::
|
||||||
check_pre_star(const Pre_star& pre_star,
|
check_pre_star(const Pre_star& pre_star,
|
||||||
const Weighted_point& wp,
|
const Weighted_point& wp,
|
||||||
const Vertex_handle& vh) const
|
const Vertex_handle& vh) const
|
||||||
|
|
@ -1716,9 +1706,9 @@ check_pre_star(const Pre_star& pre_star,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template <typename C3T3, typename Md, typename SC, typename V_, typename FT>
|
template <typename C3T3, typename SC, typename V_, typename FT>
|
||||||
bool
|
bool
|
||||||
Slivers_exuder<C3T3,Md,SC,V_,FT>::
|
Slivers_exuder<C3T3,SC,V_,FT>::
|
||||||
check_ratios(const Sliver_values& criterion_values,
|
check_ratios(const Sliver_values& criterion_values,
|
||||||
const Weighted_point& wp,
|
const Weighted_point& wp,
|
||||||
const Vertex_handle& vh) const
|
const Vertex_handle& vh) const
|
||||||
|
|
|
||||||
|
|
@ -38,34 +38,32 @@ BOOST_PARAMETER_FUNCTION(
|
||||||
(Mesh_optimization_return_code),
|
(Mesh_optimization_return_code),
|
||||||
exude_mesh_3,
|
exude_mesh_3,
|
||||||
parameters::tag,
|
parameters::tag,
|
||||||
(required (in_out(c3t3),*) (domain,*) )
|
(required (in_out(c3t3),*) )
|
||||||
(optional
|
(optional
|
||||||
(time_limit_, *, 0 )
|
(time_limit_, *, 0 )
|
||||||
(sliver_bound_, *, parameters::default_values::exude_sliver_bound )
|
(sliver_bound_, *, parameters::default_values::exude_sliver_bound )
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
return exude_mesh_3_impl(c3t3, domain, time_limit_, sliver_bound_);
|
return exude_mesh_3_impl(c3t3, time_limit_, sliver_bound_);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
template <typename C3T3, typename MeshDomain>
|
template <typename C3T3>
|
||||||
Mesh_optimization_return_code
|
Mesh_optimization_return_code
|
||||||
exude_mesh_3_impl(C3T3& c3t3,
|
exude_mesh_3_impl(C3T3& c3t3,
|
||||||
const MeshDomain& domain,
|
|
||||||
const double time_limit,
|
const double time_limit,
|
||||||
const double sliver_bound)
|
const double sliver_bound)
|
||||||
{
|
{
|
||||||
typedef MeshDomain Md;
|
|
||||||
typedef typename C3T3::Triangulation Tr;
|
typedef typename C3T3::Triangulation Tr;
|
||||||
typedef Mesh_3::Min_dihedral_angle_criterion<Tr> Sc;
|
typedef Mesh_3::Min_dihedral_angle_criterion<Tr> Sc;
|
||||||
//typedef Mesh_3::Radius_radio_criterion<Tr> Sc;
|
//typedef Mesh_3::Radius_radio_criterion<Tr> Sc;
|
||||||
typedef typename Mesh_3::Slivers_exuder<C3T3, Md, Sc> Exuder;
|
typedef typename Mesh_3::Slivers_exuder<C3T3, Sc> Exuder;
|
||||||
|
|
||||||
// Create exuder
|
// Create exuder
|
||||||
Sc criterion(sliver_bound, c3t3.triangulation());
|
Sc criterion(sliver_bound, c3t3.triangulation());
|
||||||
Exuder exuder(c3t3, domain, criterion);
|
Exuder exuder(c3t3, criterion);
|
||||||
|
|
||||||
// Set time_limit
|
// Set time_limit
|
||||||
exuder.set_time_limit(time_limit);
|
exuder.set_time_limit(time_limit);
|
||||||
|
|
|
||||||
|
|
@ -463,7 +463,6 @@ void refine_mesh_3_impl(C3T3& c3t3,
|
||||||
exude_time_limit = exude.time_limit();
|
exude_time_limit = exude.time_limit();
|
||||||
|
|
||||||
exude_mesh_3(c3t3,
|
exude_mesh_3(c3t3,
|
||||||
domain,
|
|
||||||
parameters::time_limit = exude_time_limit,
|
parameters::time_limit = exude_time_limit,
|
||||||
parameters::sliver_bound = exude.bound());
|
parameters::sliver_bound = exude.bound());
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -129,7 +129,7 @@ struct Tester
|
||||||
// Quality should increase
|
// Quality should increase
|
||||||
C3t3 exude_c3t3(c3t3);
|
C3t3 exude_c3t3(c3t3);
|
||||||
std::cerr << "Exude...\n";
|
std::cerr << "Exude...\n";
|
||||||
CGAL::exude_mesh_3(exude_c3t3, domain);
|
CGAL::exude_mesh_3(exude_c3t3);
|
||||||
verify_c3t3(exude_c3t3,domain,domain_type,v,v,f,f);
|
verify_c3t3(exude_c3t3,domain,domain_type,v,v,f,f);
|
||||||
verify_c3t3_quality(c3t3,exude_c3t3);
|
verify_c3t3_quality(c3t3,exude_c3t3);
|
||||||
verify_c3t3_volume(exude_c3t3, volume*0.95, volume*1.05);
|
verify_c3t3_volume(exude_c3t3, volume*0.95, volume*1.05);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue