~ubuntu-branches/ubuntu/wily/rheolef/wily

« back to all changes in this revision

Viewing changes to nfem/plib/geo_locate.cc

  • Committer: Package Import Robot
  • Author(s): Pierre Saramito
  • Date: 2013-09-16 17:11:03 UTC
  • mfrom: (1.2.2)
  • Revision ID: package-import@ubuntu.com-20130916171103-3osrjwzjx20bstow
Tags: 6.5-1
* New upstream release 6.5 (major changes):
   - new discontinuous Galerkin FEM methods
   - source code compile now with g++-4.8 and boost-1.54 (closes: #701347)
     thanks to Matthias Klose <doko@debian.org>
   - minor bug fixes (closes: #716110, #715672, #716547)
     thanks to Alexandre Rebert <alexandre@cmu.edu>
   - minor changes for automake-1.14
* control:
  - add break and replaces rules (closes: #709155)
    thanks to a patch from Andreas Beckmann <anbe@debian.org>
  - fix lintian warning "vcs-fields-not-canonical" (closes: #714185)
    thanks to Sebastian Ramacher <sramacher@debian.org>
  - remove texi2html from "build-depends" (was a lintian error)
* rules: add "make distclean" to the rules/clean target (closes: #714204)
  thanks to explanations from Sebastian Ramacher <sramacher@debian.org>

Show diffs side-by-side

added added

removed removed

Lines of Context:
348
348
  // epsilon is only for bbox: then, predicate on element K is exact
349
349
  // TODO: compute epsilon with omega.hmin scale ?
350
350
  // static const T eps = 1e5*std::numeric_limits<T>::epsilon();
351
 
  static const T eps = 1000*std::numeric_limits<T>::epsilon();
 
351
  // static const T eps = 1000*std::numeric_limits<T>::epsilon();
 
352
  static const T eps = sqrt(std::numeric_limits<T>::epsilon());
352
353
  Interval xe = Interval (cgal_locate_traits<T,D>::make_cgal_point_window (x, eps), 0);
353
354
  std::list<Interval> intersected_boxes;
354
355
  // point query = inverse range query ; from ::CGAL documentation:
355
 
  // "In order to perform an inverse range query, a range query of ε width has to be performed.
 
356
  // "In order to perform an inverse range query, a range query of epsilon width has to be performed.
356
357
  // We prefered not to offer an extra function for this sort of query, since the inverse range
357
358
  // query is a special case of the range query (window_query)"
358
359
  _tree.window_query (xe, std::back_inserter(intersected_boxes));
361
362
    const geo_element& K = omega[ie];
362
363
    bool intersect = K.contains (omega.get_nodes(), x); 
363
364
    if (intersect) {
364
 
      dis_ie = K.dis_ie(); // global 'ie' index of the element
 
365
      dis_ie = K.dis_ie();
365
366
      break;
366
367
    }
367
368
  }