Fix : Periodic_mesh didn't manage concurrency parameters.

This commit is contained in:
Aymeric PELLE 2015-03-23 12:13:53 +01:00
parent f262c9f72c
commit afc1cc7dc5
3 changed files with 31 additions and 9 deletions

View File

@ -23,8 +23,8 @@ if ( CGAL_FOUND )
include_directories (BEFORE "../../include")
create_single_source_cgal_program( "mesh_triply_periodic_minimal_surfaces.cpp" )
create_single_source_cgal_program( "mesh_implicit_multi_domain.cpp" )
# create_single_source_cgal_program( "mesh_triply_periodic_minimal_surfaces.cpp" )
# create_single_source_cgal_program( "mesh_implicit_multi_domain.cpp" )
create_single_source_cgal_program( "mesh_implicit_shape.cpp" )
# create_single_source_cgal_program( "mesh_implicit_shapes_bunch.cpp" )
# create_single_source_cgal_program( "mesh_implicit_shape_with_subdomains.cpp" )

View File

@ -25,7 +25,7 @@
#ifndef CGAL_MESH_3_REFINE_FACETS_3_H
#define CGAL_MESH_3_REFINE_FACETS_3_H
#include <CGAL/Mesher_level.h>
#include <CGAL/Mesh_3/Mesher_level.h>
#include <CGAL/Mesher_level_default_implementations.h>
#include <CGAL/Meshes/Double_map_container.h>
#include <CGAL/Meshes/Triangulation_mesher_level_traits_3.h>
@ -34,6 +34,7 @@
#include <boost/optional.hpp>
#include <boost/mpl/has_xxx.hpp>
#include <CGAL/tuple.h>
#include <CGAL/tags.h>
#include <sstream>
namespace CGAL {
@ -97,7 +98,8 @@ class Refine_facets_3
Previous_level_>,
typename Tr::Facet,
Previous_level_,
Triangulation_mesher_level_traits_3<Tr> >
Triangulation_mesher_level_traits_3<Tr>,
Sequential_tag >
, public Container_
, public No_after_no_insertion
, public No_before_conflicts
@ -162,7 +164,7 @@ public:
}
/// Returns the conflicts zone
Zone conflicts_zone_impl(const Point& point, const Facet& facet) const;
Zone conflicts_zone_impl(const Point& point, const Facet& facet, bool &facet_is_in_its_cz) const;
/// Job to do before insertion
void before_insertion_impl(const Facet& facet,
@ -404,7 +406,7 @@ Refine_facets_3(Tr& triangulation,
P_& previous,
C3T3& c3t3)
: Mesher_level<Tr, Self, Facet, P_,
Triangulation_mesher_level_traits_3<Tr> >(previous)
Triangulation_mesher_level_traits_3<Tr>, Sequential_tag >(previous)
, C_()
, No_after_no_insertion()
, No_before_conflicts()
@ -489,9 +491,10 @@ template<class Tr, class Cr, class MD, class C3T3_, class P_, class C_>
typename Refine_facets_3<Tr,Cr,MD,C3T3_,P_,C_>::Zone
Refine_facets_3<Tr,Cr,MD,C3T3_,P_,C_>::
conflicts_zone_impl(const Point& point,
const Facet& facet) const
const Facet& facet, bool &facet_is_in_its_cz) const
{
Zone zone;
facet_is_in_its_cz = false;
// TODO may be avoid the locate here
zone.cell = r_tr_.locate(point,

View File

@ -42,6 +42,7 @@
#include <CGAL/IO/Complex_2_in_triangulation_3_file_writer.h>
#include <CGAL/Periodic_mesh_3/config.h>
#include <CGAL/tags.h>
namespace CGAL {
@ -50,6 +51,18 @@ class Periodic_3_Delaunay_triangulation_3_Mesher_3 :
public Periodic_3_Delaunay_triangulation_3<Gt, Tds> {
public:
typedef Sequential_tag Concurrency_tag;
typedef void Lock_data_structure;
void *get_lock_data_structure() const
{
return 0;
}
void set_lock_data_structure(void *) const
{
}
typedef Periodic_3_Delaunay_triangulation_3<Gt, Tds> Base;
typedef typename Base::Base Base_Base;
@ -247,7 +260,7 @@ public:
std::pair<OutputIteratorBoundaryFacets, OutputIteratorCells>
find_conflicts(const Point &p, Cell_handle c,
OutputIteratorBoundaryFacets bfit,
OutputIteratorCells cit) const
OutputIteratorCells cit, bool*) const
{
Triple<OutputIteratorBoundaryFacets,
OutputIteratorCells,
@ -350,10 +363,16 @@ public:
}
using Base::locate;
Cell_handle locate(const Point& p, Locate_type& l, int& i, int& j, Cell_handle start = Cell_handle(), bool* could_lock_zone = NULL)
{
assert(could_lock_zone == NULL);
return Base::locate(p,l,i,j,start);
}
Cell_handle locate(const Point & p, Vertex_handle hint) const
{
return locate(p, hint == Vertex_handle() ? infinite_cell() : hint->cell());
return Base::locate(p, hint == Vertex_handle() ? infinite_cell() : hint->cell());
assert(false); // not yet supported
}