Rheolef  7.1
an efficient C++ finite element environment
geo_locate.cc
Go to the documentation of this file.
1 //
22 // given x, search K in mesh such that x in K
23 //
24 // author: Pierre.Saramito@imag.fr
25 //
26 // date: 12 march 2012
27 //
28 // implementation note:
29 // use CGAL::Segment_tree for element location
30 //
31 #include "rheolef/geo_locate.h"
32 #include "rheolef/geo.h"
33 #include "rheolef/geo_element_contains.h"
34 #include "rheolef/point_util.h"
35 
36 // internal includes:
37 #ifdef _RHEOLEF_HAVE_CGAL
38 #include "rheolef/cgal_traits.h"
39 #include <CGAL/Segment_tree_k.h>
40 #include <CGAL/Range_segment_tree_traits.h>
41 #endif // _RHEOLEF_HAVE_CGAL
42 
43 namespace rheolef {
44 
45 // ---------------------------------------------------------------------
46 // 1) utility: bbox of a geo_element
47 // ---------------------------------------------------------------------
48 template <class T, class M>
49 void
51 {
52  // TODO: omega.order == 1 only: K.size == K.n_node
53  typedef typename geo_base_rep<T,M>::size_type size_type;
54  size_type d = omega.dimension();
55  for (size_type j = 0; j < d; j++) {
56  xmin[j] = std::numeric_limits<T>::max();
57  xmax[j] = -std::numeric_limits<T>::max();
58  }
59  for (size_type iloc = 0, nloc = K.size(); iloc < nloc; iloc++) {
60  size_type dis_inod = K[iloc];
61  const point_basic<T>& x = omega.dis_node(dis_inod);
62  for (size_type j = 0; j < d; j++) {
63  xmin[j] = std::min(x[j], xmin[j]);
64  xmax[j] = std::max(x[j], xmax[j]);
65  }
66  }
67 }
68 #ifdef _RHEOLEF_HAVE_CGAL
69 // -----------------------------------------------------------------------------------
70 // 2) missing in cgal: inspirated from "examples/RangeSegmentTrees/include/Tree_Traits.h"
71 // -----------------------------------------------------------------------------------
72 template <class Kernel, class Val>
73 class Segment_tree_map_traits_1 {
74  public:
75  typedef Val Value;
76  typedef typename Kernel::FT Point_1 ;
77  typedef Point_1 Key;
78  typedef Point_1 Key_1;
79  typedef std::pair<Key,Key> Pure_interval;
80  typedef std::pair<Pure_interval, Val> Interval;
81 
82  class C_Low_1{
83  public:
84  Key_1 operator()(const Interval& i)
85  { return i.first.first;}
86  };
87 
88  class C_High_1{
89  public:
90  Key_1 operator()(const Interval& i)
91  { return i.first.second;}
92  };
93 
94  class C_Key_1{
95  public:
96  Key_1 operator()(const Key& k)
97  { return k;}
98  };
99 
100  class C_Compare_1{
101  public:
102  bool operator()(Key_1 k1, Key_1 k2)
103  {
104  return std::less<Float>()(k1,k2);
105  }
106  };
107 
108  typedef C_Compare_1 compare_1;
109  typedef C_Low_1 low_1;
110  typedef C_High_1 high_1;
111  typedef C_Key_1 key_1;
112 };
113 // -----------------------------------------------------------------------------------
114 // 3) helper a generic dimension=D implementation with cgal
115 // -----------------------------------------------------------------------------------
116 
117 template <class T, size_t D> struct cgal_locate_traits {};
118 
119 template <class T>
120 struct cgal_locate_traits<T,1> {
121 
122 // typedef:
123 
125 
126  typedef typename geo_cgal_traits<T,1>::Kernel Kernel;
127  typedef Segment_tree_map_traits_1<Kernel,size_type> Traits;
128  typedef ::CGAL::Segment_tree_1<Traits> Segment_tree_type;
129  typedef typename Traits::Interval Interval;
130  typedef typename Traits::Pure_interval Pure_interval;
131  typedef typename Traits::Key Key;
132 
133  static Pure_interval make_cgal_bbox (const point_basic<T>& xmin, const point_basic<T>& xmax)
134  {
135  return Pure_interval(Key(xmin[0]),
136  Key(xmax[0]));
137  }
138  static Pure_interval make_cgal_point_window (const point_basic<T>& x, const T& eps)
139  {
140  return Pure_interval (Key(x[0]-eps),
141  Key(x[0]+eps));
142  }
143  static void put (std::ostream& out, const Pure_interval& b) {
144  out << "[" << b.first << "," << b.second << "[";
145  }
146 };
147 template <class T>
148 struct cgal_locate_traits<T,2> {
149 
150 // typedef:
151 
153 
154  typedef typename geo_cgal_traits<T,2>::Kernel Kernel;
155  typedef ::CGAL::Segment_tree_map_traits_2<Kernel,size_type> Traits;
156  typedef ::CGAL::Segment_tree_2<Traits> Segment_tree_type;
157  typedef typename Traits::Interval Interval;
158  typedef typename Traits::Pure_interval Pure_interval;
159  typedef typename Traits::Key Key;
160 
161  static Pure_interval make_cgal_bbox (const point_basic<T>& xmin, const point_basic<T>& xmax)
162  {
163  return Pure_interval(Key(xmin[0], xmin[1]),
164  Key(xmax[0], xmax[1]));
165  }
166  static Pure_interval make_cgal_point_window (const point_basic<T>& x, const T& eps)
167  {
168  return Pure_interval (Key(x[0]-eps, x[1]-eps),
169  Key(x[0]+eps, x[1]+eps));
170  }
171  static void put (std::ostream& out, const Pure_interval& b) {
172  out << "[" << b.first.x() << "," << b.second.x() << "[x["
173  << b.first.y() << "," << b.second.y() << "[";
174  }
175 };
176 template <class T>
177 struct cgal_locate_traits<T,3> {
178 
179 // typedef:
180 
182 
183  typedef typename geo_cgal_traits<T,3>::Kernel Kernel;
184  typedef ::CGAL::Segment_tree_map_traits_3<Kernel,size_type> Traits;
185  typedef ::CGAL::Segment_tree_3<Traits> Segment_tree_type;
186  typedef typename Traits::Interval Interval;
187  typedef typename Traits::Pure_interval Pure_interval;
188  typedef typename Traits::Key Key;
189 
190  static Pure_interval make_cgal_bbox (const point_basic<T>& xmin, const point_basic<T>& xmax)
191  {
192  return Pure_interval(Key(xmin[0], xmin[1], xmin[2]),
193  Key(xmax[0], xmax[1], xmax[2]));
194  }
195  static Pure_interval make_cgal_point_window (const point_basic<T>& x, const T& eps)
196  {
197  return Pure_interval (Key(x[0]-eps, x[1]-eps, x[2]-eps),
198  Key(x[0]+eps, x[1]+eps, x[2]+eps));
199  }
200  static void put (std::ostream& out, const Pure_interval& b) {
201  out << "[" << b.first.x() << "," << b.second.x() << "[x["
202  << b.first.y() << "," << b.second.y() << "[x["
203  << b.first.z() << "," << b.second.z() << "[";
204  }
205 };
206 // ---------------------------------------------------------------------
207 // 4) the geo_locate interface
208 // ---------------------------------------------------------------------
209 template <class T, class M>
211 {
212  if (_ptr != 0) {
213  delete_macro(_ptr);
214  }
215 }
216 template <class T, class M>
219  const geo_base_rep<T,M>& omega,
220  const point_basic<T>& x,
221  size_type dis_ie_guest) const
222 {
223  if (_ptr == 0) { _ptr = make_ptr(omega); }
224  return _ptr->seq_locate (omega, x, dis_ie_guest);
225 }
226 template <class T, class M>
229  const geo_base_rep<T,M>& omega,
230  const point_basic<T>& x,
231  size_type dis_ie_guest) const
232 {
233  if (_ptr == 0) { _ptr = make_ptr(omega); }
234  return _ptr->dis_locate (omega, x, dis_ie_guest);
235 }
236 // ---------------------------------------------------------------------
237 // 5) the tree box abstract data structure
238 // ---------------------------------------------------------------------
239 template <class T, class M>
240 class geo_locate_abstract_rep {
241 public:
242  typedef typename disarray<T,M>::size_type size_type;
243  virtual ~geo_locate_abstract_rep() {}
244  virtual void initialize (const geo_base_rep<T,M>& omega) const = 0;
245  virtual size_type seq_locate (
246  const geo_base_rep<T,M>& omega,
247  const point_basic<T>& x,
248  size_type dis_ie_guest = std::numeric_limits<size_type>::max()) const = 0;
249  virtual size_type dis_locate (
250  const geo_base_rep<T,M>& omega,
251  const point_basic<T>& x,
252  size_type dis_ie_guest = std::numeric_limits<size_type>::max()) const = 0;
253 };
254 // ---------------------------------------------------------------------
255 // 5) the tree box concrete, and dimension dependent, data structure
256 // = cgal "segment" tree
257 // ---------------------------------------------------------------------
258 template <class T, class M, size_t D>
259 class geo_locate_rep : public geo_locate_abstract_rep<T,M> {
260 public:
261 
262 // typedef:
263 
264  typedef typename geo_base_rep<T,M>::size_type size_type;
265 
266  typedef typename cgal_locate_traits<T,D>::Segment_tree_type Segment_tree_type;
267  typedef typename cgal_locate_traits<T,D>::Interval Interval;
268 
269 // allocators:
270 
271  geo_locate_rep() : _tree() {}
272  geo_locate_rep(const geo_base_rep<T,M>& omega) : _tree() { initialize(omega); }
273  ~geo_locate_rep() {}
274  void initialize (const geo_base_rep<T,M>& omega) const;
275 
276 // accessors:
277 
278  size_type seq_locate (
279  const geo_base_rep<T,M>& omega,
280  const point_basic<T>& x,
281  size_type dis_ie_guest = std::numeric_limits<size_type>::max()) const;
282  size_type dis_locate (
283  const geo_base_rep<T,M>& omega,
284  const point_basic<T>& x,
285  size_type dis_ie_guest = std::numeric_limits<size_type>::max()) const;
286 
287 // data:
288 protected:
289  mutable Segment_tree_type _tree; // cgal window query requires a mutable _tree (why?)
290 };
291 // ---------------------------------------------------------------------
292 // 5a) allocator
293 // ---------------------------------------------------------------------
294 template <class T, class M>
295 geo_locate_abstract_rep<T,M>*
297 {
298  check_macro (omega.dimension() == omega.map_dimension(), "geo_locate: map_dim < dim: not supported");
299  switch (omega.dimension()) {
300  case 1: return new_macro((geo_locate_rep<T,M,1>)(omega));
301  case 2: return new_macro((geo_locate_rep<T,M,2>)(omega));
302  case 3: return new_macro((geo_locate_rep<T,M,3>)(omega));
303  default: error_macro ("unsupported dimension d=" << omega.dimension()); return 0;
304  }
305 }
306 // ---------------------------------------------------------------------
307 // 5b) initialize
308 // ---------------------------------------------------------------------
309 template <class T, class M, size_t D>
310 void
312 {
313  // create the corresponding vector of bounding boxes
314  trace_macro ("geo::locate initialize...");
315  std::list<Interval> boxes;
316  point_basic<T> xmin, xmax;
317  for (size_type ie = 0, ne = omega.size(); ie < ne; ie++) {
318  const geo_element& K = omega[ie];
319  compute_bbox (omega, K, xmin, xmax);
320  boxes.push_back (Interval(cgal_locate_traits<T,D>::make_cgal_bbox (xmin,xmax),ie));
321  }
322  // create tree:
323  // _tree.clear(); // TODO : when e.g. nodes update, rebuild boxes & tree
324  _tree.make_tree (boxes.begin(), boxes.end());
325  trace_macro ("geo::locate initialize done");
326 }
327 // ---------------------------------------------------------------------
328 // 5c) locate
329 // ---------------------------------------------------------------------
330 template <class T, class M, size_t D>
332 geo_locate_rep<T,M,D>::seq_locate (
333  const geo_base_rep<T,M>& omega,
334  const point_basic<T>& x,
335  size_type dis_ie_guest) const
336 {
337  if (dis_ie_guest != std::numeric_limits<size_type>::max()) {
338  // have a guest:
339  const distributor& ownership = omega.ownership();
340  if (ownership.is_owned (dis_ie_guest)) {
341  size_type first_dis_ie = ownership.first_index();
342  size_type ie_guest = dis_ie_guest - first_dis_ie;
343  const geo_element& K_guest = omega[ie_guest];
344  bool intersect = details::contains (K_guest, omega.get_nodes(), x);
345  if (intersect) {
346  return K_guest.dis_ie();
347  }
348  }
349  }
350  typedef typename geo_base_rep<T,M>::size_type size_type;
351  size_type dis_ie = std::numeric_limits<size_type>::max();
352  // epsilon is only for bbox: then, predicate on element K is exact
353  // TODO: compute epsilon with omega.hmin scale ?
354  // static const T eps = 1e5*std::numeric_limits<T>::epsilon();
355  // static const T eps = 1000*std::numeric_limits<T>::epsilon();
356  static const T eps = sqrt(std::numeric_limits<T>::epsilon());
357  Interval xe = Interval (cgal_locate_traits<T,D>::make_cgal_point_window (x, eps), 0);
358  std::list<Interval> intersected_boxes;
359  // point query = inverse range query ; from ::CGAL documentation:
360  // "In order to perform an inverse range query, a range query of epsilon width has to be performed.
361  // We preferred not to offer an extra function for this sort of query, since the inverse range
362  // query is a special case of the range query (window_query)"
363  _tree.window_query (xe, std::back_inserter(intersected_boxes));
364  for (typename std::list<Interval>::iterator j = intersected_boxes.begin(); j != intersected_boxes.end(); j++) {
365  size_type ie = (*j).second;
366  const geo_element& K = omega[ie];
367  bool intersect = details::contains (K, omega.get_nodes(), x);
368  if (intersect) {
369  dis_ie = K.dis_ie();
370  break;
371  }
372  }
373  return dis_ie;
374 }
375 // ---------------------------------------------------------------------
376 // 5c) dis_locate = one distributed computation
377 // ---------------------------------------------------------------------
378 template <class T, class M, size_t D>
380 geo_locate_rep<T,M,D>::dis_locate (
381  const geo_base_rep<T,M>& omega,
382  const point_basic<T>& x,
383  size_type dis_ie_guest) const
384 {
385  size_type dis_ie = seq_locate (omega, x, dis_ie_guest);
386 #ifdef _RHEOLEF_HAVE_MPI
387  if (omega.comm().size() > 1 && is_distributed<M>::value) {
388  dis_ie = mpi::all_reduce (omega.comm(), dis_ie, mpi::minimum<size_type>());
389  }
390 #endif // _RHEOLEF_HAVE_MPI
391  return dis_ie;
392 }
393 // ---------------------------------------------------------------------
394 // 6) geo::locate()
395 // ---------------------------------------------------------------------
396 // 6a) scalar case:
397 // ----------------
398 template <class T, class M>
401  const point_basic<T>& x,
402  size_type dis_ie_guest) const
403 {
404  return _locator.seq_locate (*this, x, dis_ie_guest);
405 }
406 template <class T, class M>
409  const point_basic<T>& x,
410  size_type dis_ie_guest) const
411 {
412  return _locator.dis_locate (*this, x, dis_ie_guest);
413 }
414 // ----------------
415 // 6b) disarray case:
416 // ----------------
417 template <class T>
418 void
422  bool do_check) const
423 {
424  dis_ie.resize (x.ownership());
425  for (size_type i = 0, n = x.size(); i < n; i++) {
426  dis_ie[i] = base::_locator.seq_locate (*this, x[i], dis_ie[i]);
427  if (do_check) {
428  check_macro (dis_ie[i] != std::numeric_limits<size_type>::max(),
429  "locate: failed at x="<<ptos(x[i],base::_dimension));
430  }
431  }
432 }
433 #ifdef _RHEOLEF_HAVE_MPI
434 template <class T>
435 void
439  // dis_ie(ix) can contains a guest for x in K=omega[dis_ie(ix)]
440  bool do_check) const
441 {
442 trace_macro ("locate...");
443  const size_type large = std::numeric_limits<size_type>::max();
444  const T infty = std::numeric_limits<T>::max();
445  // 1) scan x and locate into the local mesh partition ; list when failed
446  distributor ownership = x.ownership();
447  if (dis_ie.ownership() != ownership) dis_ie.resize (ownership);
448  size_type first_dis_i = ownership.first_index();
449  std::list<id_pt_t<T> > failed;
450  for (size_type i = 0, n = x.size(); i < n; i++) {
451  dis_ie[i] = base::_locator.seq_locate (*this, x[i], dis_ie[i]);
452  if (dis_ie[i] == large) {
453  size_type dis_i = first_dis_i + i;
454  failed.push_back (id_pt_t<T>(dis_i, x[i]));
455  }
456  }
457  // 2) merge the failed list into a massive disarray, then distributed to all
458  communicator comm = ownership.comm();
459  distributor fld_ownership (distributor::decide, comm, failed.size());
460  size_type fld_dis_size = fld_ownership.dis_size();
461  if (comm.size() == 1 || fld_dis_size == 0) {
462  // no unsolved, on any procs: nothing to do !
463 trace_macro ("locate done(1)");
464  return;
465  }
466  size_type first_fld_dis_i = fld_ownership.first_index();
467  size_type last_fld_dis_i = fld_ownership. last_index();
468  id_pt_t<T> unset (large, point_basic<T>(infty,infty,infty));
469  std::vector<id_pt_t<T> > massive_failed (fld_dis_size, unset);
470  typename std::list<id_pt_t<T> >::iterator iter = failed.begin();
471  for (size_type fld_dis_i = first_fld_dis_i; fld_dis_i < last_fld_dis_i; ++fld_dis_i, ++iter) {
472  massive_failed [fld_dis_i] = *iter;
473  }
474  std::vector<id_pt_t<T> > massive_query (fld_dis_size, unset);
475  mpi::all_reduce (
476  comm,
477  massive_failed.begin().operator->(),
478  massive_failed.size(),
479  massive_query.begin().operator->(),
480  id_pt_minimum<T>());
481 
482  // 3) run the locator on all failed points ON ALL PROCS, skipping local queries (already failed)
483  std::vector<size_type> massive_result (fld_dis_size, large);
484  // 3a) range [0:first[
485  for (size_type fld_dis_i = 0; fld_dis_i < first_fld_dis_i; ++fld_dis_i) {
486  massive_result [fld_dis_i] = base::_locator.seq_locate (*this, massive_query[fld_dis_i].second);
487  }
488  // 3b) range [last,dis_size[
489  for (size_type fld_dis_i = last_fld_dis_i; fld_dis_i < fld_dis_size; ++fld_dis_i) {
490  massive_result [fld_dis_i] = base::_locator.seq_locate (*this, massive_query[fld_dis_i].second);
491  }
492  // 4) send & merge the results to all
493  std::vector<size_type> massive_merged (fld_dis_size, large);
494  mpi::all_reduce (
495  comm,
496  massive_result.begin().operator->(),
497  massive_result.size(),
498  massive_merged.begin().operator->(),
499  mpi::minimum<size_type>());
500 
501  // 5) store the local range into the distributed disarray dis_ie:
502  for (size_type fld_dis_i = first_fld_dis_i; fld_dis_i < last_fld_dis_i; ++fld_dis_i, ++iter) {
503  size_type dis_i = massive_query [fld_dis_i].first;
504  check_macro (dis_i >= first_dis_i, "invalid index");
505  size_type i = dis_i - first_dis_i;
506  dis_ie[i] = massive_merged [fld_dis_i];
507  if (do_check) {
508  check_macro (dis_ie[i] != large,
509  "dis_locate: failed at x="<<ptos(x[i],base::_dimension));
510  }
511  }
512 trace_macro ("locate done(2)");
513 }
514 #endif // _RHEOLEF_HAVE_MPI
515 // ----------------------------------------------------------------------------
516 // no CGAL: no locators
517 // ----------------------------------------------------------------------------
518 #else // _RHEOLEF_HAVE_CGAL
519 template <class T, class M>
521 {
522 }
523 template <class T, class M>
526  const geo_base_rep<T,M>& omega,
527  const point_basic<T>& x,
528  size_type dis_ie_guest) const
529 {
530  fatal_macro ("geo: locator not available (HINT: recompile Rheolef with the CGAL library)");
531  return 0;
532 }
533 template <class T, class M>
536  const geo_base_rep<T,M>& omega,
537  const point_basic<T>& x,
538  size_type dis_ie_guest) const
539 {
540  fatal_macro ("geo: locator not available (HINT: recompile Rheolef with the CGAL library)");
541  return 0;
542 }
543 template <class T, class M>
546  const point_basic<T>& x,
547  size_type dis_ie_guest) const
548 {
549  fatal_macro ("geo: locator not available (HINT: recompile Rheolef with the CGAL library)");
550  return 0;
551 }
552 template <class T, class M>
555  const point_basic<T>& x,
556  size_type dis_ie_guest) const
557 {
558  fatal_macro ("geo: locator not available (HINT: recompile Rheolef with the CGAL library)");
559  return 0;
560 }
561 template <class T>
562 void
564  const disarray<point_basic<T>, sequential>& x,
565  disarray<size_type, sequential>& dis_ie,
566  bool do_check) const
567 {
568  fatal_macro ("geo: locator not available (HINT: recompile Rheolef with the CGAL library)");
569 }
570 #ifdef _RHEOLEF_HAVE_MPI
571 template <class T>
572 void
574  const disarray<point_basic<T>, distributed>& x,
575  disarray<size_type, distributed>& dis_ie,
576  // dis_ie(ix) can contains a guest for x in K=omega[dis_ie(ix)]
577  bool do_check) const
578 {
579  fatal_macro ("geo: locator not available (HINT: recompile Rheolef with the CGAL library)");
580 }
581 #endif // _RHEOLEF_HAVE_MPI
582 #endif // _RHEOLEF_HAVE_CGAL
583 // ----------------------------------------------------------------------------
584 // instanciation in library
585 // ----------------------------------------------------------------------------
586 #define _RHEOLEF_instanciation(T,M) \
587 template class geo_locate<Float,M>; \
588 template class geo_base_rep<Float,M>; \
589 template class geo_rep<Float,M>;
590 
591 _RHEOLEF_instanciation(Float,sequential)
592 #ifdef _RHEOLEF_HAVE_MPI
594 #endif // _RHEOLEF_HAVE_MPI
595 
596 } // namespace rheolef
rheolef::geo_base_rep::size_type
base::size_type size_type
Definition: geo.h:533
rheolef::compute_bbox
void compute_bbox(const geo_base_rep< T, M > &omega, const geo_element &K, point_basic< T > &xmin, point_basic< T > &xmax)
Definition: geo_locate.cc:50
mkgeo_ball.n
int n
Definition: mkgeo_ball.sh:150
rheolef::geo_locate::~geo_locate
~geo_locate()
Definition: geo_locate.cc:210
rheolef::geo_rep< T, distributed >::locate
void locate(const disarray< point_basic< T >, distributed > &x, disarray< size_type, distributed > &dis_ie, bool do_check=false) const
Definition: geo_locate.cc:436
rheolef::io::out
@ out
Definition: rheostream.h:167
rheolef::point_basic
Definition: point.h:87
check_macro
check_macro(expr1.have_homogeneous_space(Xh1), "dual(expr1,expr2); expr1 should have homogeneous space. HINT: use dual(interpolate(Xh, expr1),expr2)")
rheolef::distributor::comm
const communicator_type & comm() const
Definition: distributor.h:145
rheolef::put
void put(std::ostream &out, std::string name, const tiny_matrix< T > &a)
Definition: tiny_lu.h:155
mkgeo_ball.b
int b
Definition: mkgeo_ball.sh:152
rheolef::geo_abstract_base_rep::size_type
geo_element_hack::size_type size_type
Definition: geo.h:260
rheolef::id_pt_t
Definition: point_util.h:39
rheolef::_RHEOLEF_instanciation
_RHEOLEF_instanciation(Float, sequential, std::allocator< Float >) _RHEOLEF_instanciation(Float
rheolef::geo_locate::seq_locate
size_type seq_locate(const geo_base_rep< T, M > &omega, const point_basic< T > &x, size_type dis_ie_guest=std::numeric_limits< size_type >::max()) const
Definition: geo_locate.cc:218
rheolef::sequential
Definition: distributed.h:28
rheolef::geo_base_rep
base class for M=sequential or distributed meshes representations
Definition: geo.h:528
rheolef::geo_base_rep::dis_locate
size_type dis_locate(const point_basic< T > &x, size_type dis_ie_guest=std::numeric_limits< size_type >::max()) const
Definition: geo_locate.cc:408
rheolef::details::contains
bool contains(const geo_element &K, const disarray< point_basic< T >, M > &node, const point_basic< T > &x)
Definition: geo_element_contains.cc:144
rheolef::distributor
see the distributor page for the full documentation
Definition: distributor.h:62
rheolef::geo_element::size
size_type size() const
Definition: geo_element.h:168
mkgeo_ball.d
int d
Definition: mkgeo_ball.sh:154
rheolef::geo_element
see the geo_element page for the full documentation
Definition: geo_element.h:102
rheolef::geo_rep
sequential mesh representation
Definition: geo.h:778
rheolef::distributor::decide
static const size_type decide
Definition: distributor.h:76
rheolef::size_type
size_t size_type
Definition: basis_get.cc:76
rheolef::geo_base_rep::seq_locate
size_type seq_locate(const point_basic< T > &x, size_type dis_ie_guest=std::numeric_limits< size_type >::max()) const
Definition: geo_locate.cc:400
rheolef::geo_base_rep::size
size_type size(size_type dim) const
Definition: geo.cc:456
rheolef::id_pt_minimum
Definition: point_util.h:67
rheolef::distributed
Definition: distributed.h:88
fatal_macro
#define fatal_macro(message)
Definition: dis_macros.h:33
rheolef::geo_iterator
geo iterator
Definition: geo.h:193
rheolef::geo_locate< T, distributed >::size_type
disarray< T, distributed >::size_type size_type
Definition: geo_locate.h:42
rheolef::geo_cgal_traits< T, 1 >::Kernel
CGAL::Filtered_kernel_adaptor< custom_cgal::kernel_2d< T > > Kernel
Definition: cgal_traits.h:42
rheolef
This file is part of Rheolef.
Definition: compiler_eigen.h:37
rheolef::distributor::dis_size
size_type dis_size() const
global and local sizes
Definition: distributor.h:207
error_macro
#define error_macro(message)
Definition: dis_macros.h:49
rheolef::geo_base_rep::dis_node
const node_type & dis_node(size_type dis_inod) const
Definition: geo.h:589
rheolef::space_numbering::dis_inod
void dis_inod(const basis_basic< T > &b, const geo_size &gs, const geo_element &K, typename std::vector< size_type >::iterator dis_inod_tab)
Definition: space_numbering.cc:177
Float
see the Float page for the full documentation
rheolef::geo_base_rep::map_dimension
size_type map_dimension() const
Definition: geo.h:564
rheolef::geo_locate::make_ptr
static geo_locate_abstract_rep< T, M > * make_ptr(const geo_base_rep< T, M > &omega)
Definition: geo_locate.cc:296
rheolef::geo_cgal_traits< T, 2 >::Kernel
CGAL::Filtered_kernel_adaptor< custom_cgal::kernel_2d< T > > Kernel
Definition: cgal_traits.h:46
rheolef::disarray
see the disarray page for the full documentation
Definition: disarray.h:459
rheolef::ptos
std::string ptos(const point_basic< T > &x, int d=3)
Definition: point.h:414
rheolef::initialize
void initialize(const piola_on_pointset< float_type > &pops, const integrate_option &iopt) const
Definition: field_expr_recursive.h:585
rheolef::point_basic< T >
point_basic< T >
Definition: piola_fem.h:135
size_type
field::size_type size_type
Definition: branch.cc:425
rheolef::geo_rep< T, distributed >::size_type
base::size_type size_type
Definition: geo.h:934
rheolef::distributor::first_index
size_type first_index(size_type iproc) const
global index range and local size owned by ip-th process
Definition: distributor.h:151
epsilon
Float epsilon
Definition: transmission_error.cc:25
rheolef::geo_locate::dis_locate
size_type dis_locate(const geo_base_rep< T, M > &omega, const point_basic< T > &x, size_type dis_ie_guest=std::numeric_limits< size_type >::max()) const
Definition: geo_locate.cc:228
rheolef::distributed
distributed
Definition: asr.cc:228
rheolef::geo_cgal_traits< T, 3 >::Kernel
CGAL::Filtered_kernel_adaptor< custom_cgal::kernel_3d< T > > Kernel
Definition: cgal_traits.h:50
rheolef::is_distributed::value
static const bool value
Definition: distributed.h:37
rheolef::geo_rep< T, sequential >::locate
void locate(const disarray< point_basic< T >, sequential > &x, disarray< size_type, sequential > &dis_ie, bool do_check=false) const
Definition: geo_locate.cc:419
T
Expr1::float_type T
Definition: field_expr.h:261
trace_macro
#define trace_macro(message)
Definition: dis_macros.h:111
rheolef::geo_base_rep::dimension
size_type dimension() const
Definition: geo.h:563