Rheolef  7.2
an efficient C++ finite element environment
 
Loading...
Searching...
No Matches
geo_nearest.h
Go to the documentation of this file.
1#ifndef _RHEOLEF_GEO_NEAREST_H
2#define _RHEOLEF_GEO_NEAREST_H
23//
24// given x, search x* the closest point in the boundary of omega
25// gives also K* in mesh such that x* in K*
26//
27// author: Pierre.Saramito@imag.fr
28//
29// date: 12 march 2012
30//
31#include "rheolef/point.h"
32#include "rheolef/disarray.h"
33
34namespace rheolef {
35
36// forward declarations:
37template <class T, class M> class geo_base_rep;
38template <class T, class M> class geo_nearest_abstract_rep;
39
40template <class T, class M>
42public:
44 geo_nearest() : _ptr(0) {}
46 geo_nearest<T,M>& operator= (const geo_nearest<T,M>&) { _ptr = 0; return *this; }
48 static geo_nearest_abstract_rep<T,M>* make_ptr (const geo_base_rep<T,M>& omega);
50 const geo_base_rep<T,M>& omega,
51 const point_basic<T>& x,
52 point_basic<T>& x_nearest) const;
54 const geo_base_rep<T,M>& omega,
55 const point_basic<T>& x,
56 point_basic<T>& x_nearest) const;
57// data:
58protected:
59 mutable geo_nearest_abstract_rep<T,M>* _ptr;
60};
61
62} // namespace rheolef
63#endif // _RHEOLEF_GEO_NEAREST_H
field::size_type size_type
Definition branch.cc:430
rep::base::size_type size_type
Definition disarray.h:501
base class for M=sequential or distributed meshes representations
Definition geo.h:528
size_type seq_nearest(const geo_base_rep< T, M > &omega, const point_basic< T > &x, point_basic< T > &x_nearest) const
geo_nearest(const geo_nearest< T, M > &)
Definition geo_nearest.h:45
geo_nearest< T, M > & operator=(const geo_nearest< T, M > &)
Definition geo_nearest.h:46
size_type dis_nearest(const geo_base_rep< T, M > &omega, const point_basic< T > &x, point_basic< T > &x_nearest) const
static geo_nearest_abstract_rep< T, M > * make_ptr(const geo_base_rep< T, M > &omega)
geo_nearest_abstract_rep< T, M > * _ptr
Definition geo_nearest.h:59
disarray< T, M >::size_type size_type
Definition geo_nearest.h:43
This file is part of Rheolef.