geo_locate.cc
Go to the documentation of this file.
//
// given x, search K in mesh such that x in K
//
// author: Pierre.Saramito@imag.fr
//
// date: 12 march 2012
//
// implementation note:
// use CGAL::Segment_tree for element location
//
#include "rheolef/geo_locate.h"
#include "rheolef/geo.h"
#include "rheolef/geo_element_contains.h"
#include "rheolef/point_util.h"
// internal includes:
#ifdef _RHEOLEF_HAVE_CGAL
#include "rheolef/cgal_traits.h"
#include <CGAL/Segment_tree_k.h>
#include <CGAL/Range_segment_tree_traits.h>
#endif // _RHEOLEF_HAVE_CGAL
namespace rheolef {
// ---------------------------------------------------------------------
// 1) utility: bbox of a geo_element
// ---------------------------------------------------------------------
template <class T, class M>
void
compute_bbox (const geo_base_rep<T,M>& omega, const geo_element& K, point_basic<T>& xmin, point_basic<T>& xmax)
{
// TODO: omega.order == 1 only: K.size == K.n_node
typedef typename geo_base_rep<T,M>::size_type size_type;
size_type d = omega.dimension();
for (size_type j = 0; j < d; j++) {
xmin[j] = std::numeric_limits<T>::max();
xmax[j] = -std::numeric_limits<T>::max();
}
for (size_type iloc = 0, nloc = K.size(); iloc < nloc; iloc++) {
size_type dis_inod = K[iloc];
const point_basic<T>& x = omega.dis_node(dis_inod);
for (size_type j = 0; j < d; j++) {
xmin[j] = std::min(x[j], xmin[j]);
xmax[j] = std::max(x[j], xmax[j]);
}
}
}
#ifdef _RHEOLEF_HAVE_CGAL
// -----------------------------------------------------------------------------------
// 2) missing in cgal: inspirated from "examples/RangeSegmentTrees/include/Tree_Traits.h"
// -----------------------------------------------------------------------------------
template <class Kernel, class Val>
class Segment_tree_map_traits_1 {
public:
typedef Val Value;
typedef typename Kernel::FT Point_1 ;
typedef Point_1 Key;
typedef Point_1 Key_1;
typedef std::pair<Key,Key> Pure_interval;
typedef std::pair<Pure_interval, Val> Interval;
class C_Low_1{
public:
Key_1 operator()(const Interval& i)
{ return i.first.first;}
};
class C_High_1{
public:
Key_1 operator()(const Interval& i)
{ return i.first.second;}
};
class C_Key_1{
public:
Key_1 operator()(const Key& k)
{ return k;}
};
class C_Compare_1{
public:
bool operator()(Key_1 k1, Key_1 k2)
{
return std::less<Float>()(k1,k2);
}
};
typedef C_Compare_1 compare_1;
typedef C_Low_1 low_1;
typedef C_High_1 high_1;
typedef C_Key_1 key_1;
};
// -----------------------------------------------------------------------------------
// 3) helper a generic dimension=D implementation with cgal
// -----------------------------------------------------------------------------------
template <class T, size_t D> struct cgal_locate_traits {};
template <class T>
struct cgal_locate_traits<T,1> {
// typedef:
typedef typename geo_base_rep<T,sequential>::size_type size_type;
typedef typename geo_cgal_traits<T,1>::Kernel Kernel;
typedef Segment_tree_map_traits_1<Kernel,size_type> Traits;
typedef ::CGAL::Segment_tree_1<Traits> Segment_tree_type;
typedef typename Traits::Interval Interval;
typedef typename Traits::Pure_interval Pure_interval;
typedef typename Traits::Key Key;
static Pure_interval make_cgal_bbox (const point_basic<T>& xmin, const point_basic<T>& xmax)
{
return Pure_interval(Key(xmin[0]),
Key(xmax[0]));
}
static Pure_interval make_cgal_point_window (const point_basic<T>& x, const T& eps)
{
return Pure_interval (Key(x[0]-eps),
Key(x[0]+eps));
}
static void put (std::ostream& out, const Pure_interval& b) {
out << "[" << b.first << "," << b.second << "[";
}
};
template <class T>
struct cgal_locate_traits<T,2> {
// typedef:
typedef typename geo_base_rep<T,sequential>::size_type size_type;
typedef typename geo_cgal_traits<T,2>::Kernel Kernel;
typedef ::CGAL::Segment_tree_map_traits_2<Kernel,size_type> Traits;
typedef ::CGAL::Segment_tree_2<Traits> Segment_tree_type;
typedef typename Traits::Interval Interval;
typedef typename Traits::Pure_interval Pure_interval;
typedef typename Traits::Key Key;
static Pure_interval make_cgal_bbox (const point_basic<T>& xmin, const point_basic<T>& xmax)
{
return Pure_interval(Key(xmin[0], xmin[1]),
Key(xmax[0], xmax[1]));
}
static Pure_interval make_cgal_point_window (const point_basic<T>& x, const T& eps)
{
return Pure_interval (Key(x[0]-eps, x[1]-eps),
Key(x[0]+eps, x[1]+eps));
}
static void put (std::ostream& out, const Pure_interval& b) {
out << "[" << b.first.x() << "," << b.second.x() << "[x["
<< b.first.y() << "," << b.second.y() << "[";
}
};
template <class T>
struct cgal_locate_traits<T,3> {
// typedef:
typedef typename geo_base_rep<T,sequential>::size_type size_type;
typedef typename geo_cgal_traits<T,3>::Kernel Kernel;
typedef ::CGAL::Segment_tree_map_traits_3<Kernel,size_type> Traits;
typedef ::CGAL::Segment_tree_3<Traits> Segment_tree_type;
typedef typename Traits::Interval Interval;
typedef typename Traits::Pure_interval Pure_interval;
typedef typename Traits::Key Key;
static Pure_interval make_cgal_bbox (const point_basic<T>& xmin, const point_basic<T>& xmax)
{
return Pure_interval(Key(xmin[0], xmin[1], xmin[2]),
Key(xmax[0], xmax[1], xmax[2]));
}
static Pure_interval make_cgal_point_window (const point_basic<T>& x, const T& eps)
{
return Pure_interval (Key(x[0]-eps, x[1]-eps, x[2]-eps),
Key(x[0]+eps, x[1]+eps, x[2]+eps));
}
static void put (std::ostream& out, const Pure_interval& b) {
out << "[" << b.first.x() << "," << b.second.x() << "[x["
<< b.first.y() << "," << b.second.y() << "[x["
<< b.first.z() << "," << b.second.z() << "[";
}
};
// ---------------------------------------------------------------------
// 4) the geo_locate interface
// ---------------------------------------------------------------------
template <class T, class M>
geo_locate<T,M>::~geo_locate()
{
if (_ptr != 0) {
delete_macro(_ptr);
}
}
template <class T, class M>
typename geo_locate<T,M>::size_type
geo_locate<T,M>::seq_locate (
const geo_base_rep<T,M>& omega,
const point_basic<T>& x,
size_type dis_ie_guest) const
{
if (_ptr == 0) { _ptr = make_ptr(omega); }
return _ptr->seq_locate (omega, x, dis_ie_guest);
}
template <class T, class M>
typename geo_locate<T,M>::size_type
geo_locate<T,M>::dis_locate (
const geo_base_rep<T,M>& omega,
const point_basic<T>& x,
size_type dis_ie_guest) const
{
if (_ptr == 0) { _ptr = make_ptr(omega); }
return _ptr->dis_locate (omega, x, dis_ie_guest);
}
// ---------------------------------------------------------------------
// 5) the tree box abstract data structure
// ---------------------------------------------------------------------
template <class T, class M>
class geo_locate_abstract_rep {
public:
typedef typename disarray<T,M>::size_type size_type;
virtual ~geo_locate_abstract_rep() {}
virtual void initialize (const geo_base_rep<T,M>& omega) const = 0;
virtual 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 = 0;
virtual 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 = 0;
};
// ---------------------------------------------------------------------
// 5) the tree box concrete, and dimension dependent, data structure
// = cgal "segment" tree
// ---------------------------------------------------------------------
template <class T, class M, size_t D>
class geo_locate_rep : public geo_locate_abstract_rep<T,M> {
public:
// typedef:
typedef typename geo_base_rep<T,M>::size_type size_type;
typedef typename cgal_locate_traits<T,D>::Segment_tree_type Segment_tree_type;
typedef typename cgal_locate_traits<T,D>::Interval Interval;
// allocators:
geo_locate_rep() : _tree() {}
geo_locate_rep(const geo_base_rep<T,M>& omega) : _tree() { initialize(omega); }
~geo_locate_rep() {}
void initialize (const geo_base_rep<T,M>& omega) const;
// accessors:
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;
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;
// data:
protected:
mutable Segment_tree_type _tree; // cgal window query requires a mutable _tree (why?)
};
// ---------------------------------------------------------------------
// 5a) allocator
// ---------------------------------------------------------------------
template <class T, class M>
geo_locate_abstract_rep<T,M>*
geo_locate<T,M>::make_ptr (const geo_base_rep<T,M>& omega)
{
check_macro (omega.dimension() == omega.map_dimension(), "geo_locate: map_dim < dim: not supported");
switch (omega.dimension()) {
case 1: return new_macro((geo_locate_rep<T,M,1>)(omega));
case 2: return new_macro((geo_locate_rep<T,M,2>)(omega));
case 3: return new_macro((geo_locate_rep<T,M,3>)(omega));
default: error_macro ("unsupported dimension d=" << omega.dimension()); return 0;
}
}
// ---------------------------------------------------------------------
// 5b) initialize
// ---------------------------------------------------------------------
template <class T, class M, size_t D>
void
geo_locate_rep<T,M,D>::initialize (const geo_base_rep<T,M>& omega) const
{
// create the corresponding vector of bounding boxes
trace_macro ("geo::locate initialize...");
std::list<Interval> boxes;
point_basic<T> xmin, xmax;
for (size_type ie = 0, ne = omega.size(); ie < ne; ie++) {
const geo_element& K = omega[ie];
compute_bbox (omega, K, xmin, xmax);
boxes.push_back (Interval(cgal_locate_traits<T,D>::make_cgal_bbox (xmin,xmax),ie));
}
// create tree:
// _tree.clear(); // TODO : when e.g. nodes update, rebuild boxes & tree
_tree.make_tree (boxes.begin(), boxes.end());
trace_macro ("geo::locate initialize done");
}
// ---------------------------------------------------------------------
// 5c) locate
// ---------------------------------------------------------------------
template <class T, class M, size_t D>
typename geo_locate_rep<T,M,D>::size_type
geo_locate_rep<T,M,D>::seq_locate (
const geo_base_rep<T,M>& omega,
const point_basic<T>& x,
size_type dis_ie_guest) const
{
if (dis_ie_guest != std::numeric_limits<size_type>::max()) {
// have a guest:
const distributor& ownership = omega.ownership();
if (ownership.is_owned (dis_ie_guest)) {
size_type first_dis_ie = ownership.first_index();
size_type ie_guest = dis_ie_guest - first_dis_ie;
const geo_element& K_guest = omega[ie_guest];
bool intersect = details::contains (K_guest, omega.get_nodes(), x);
if (intersect) {
return K_guest.dis_ie();
}
}
}
typedef typename geo_base_rep<T,M>::size_type size_type;
size_type dis_ie = std::numeric_limits<size_type>::max();
// epsilon is only for bbox: then, predicate on element K is exact
// TODO: compute epsilon with omega.hmin scale ?
// static const T eps = 1e5*std::numeric_limits<T>::epsilon();
// static const T eps = 1000*std::numeric_limits<T>::epsilon();
static const T eps = sqrt(std::numeric_limits<T>::epsilon());
Interval xe = Interval (cgal_locate_traits<T,D>::make_cgal_point_window (x, eps), 0);
std::list<Interval> intersected_boxes;
// point query = inverse range query ; from ::CGAL documentation:
// "In order to perform an inverse range query, a range query of epsilon width has to be performed.
// We preferred not to offer an extra function for this sort of query, since the inverse range
// query is a special case of the range query (window_query)"
_tree.window_query (xe, std::back_inserter(intersected_boxes));
for (typename std::list<Interval>::iterator j = intersected_boxes.begin(); j != intersected_boxes.end(); j++) {
size_type ie = (*j).second;
const geo_element& K = omega[ie];
bool intersect = details::contains (K, omega.get_nodes(), x);
if (intersect) {
dis_ie = K.dis_ie();
break;
}
}
return dis_ie;
}
// ---------------------------------------------------------------------
// 5c) dis_locate = one distributed computation
// ---------------------------------------------------------------------
template <class T, class M, size_t D>
typename geo_locate_rep<T,M,D>::size_type
geo_locate_rep<T,M,D>::dis_locate (
const geo_base_rep<T,M>& omega,
const point_basic<T>& x,
size_type dis_ie_guest) const
{
size_type dis_ie = seq_locate (omega, x, dis_ie_guest);
#ifdef _RHEOLEF_HAVE_MPI
if (omega.comm().size() > 1 && is_distributed<M>::value) {
dis_ie = mpi::all_reduce (omega.comm(), dis_ie, mpi::minimum<size_type>());
}
#endif // _RHEOLEF_HAVE_MPI
return dis_ie;
}
// ---------------------------------------------------------------------
// 6) geo::locate()
// ---------------------------------------------------------------------
// 6a) scalar case:
// ----------------
template <class T, class M>
typename geo_base_rep<T,M>::size_type
geo_base_rep<T,M>::seq_locate (
const point_basic<T>& x,
size_type dis_ie_guest) const
{
return _locator.seq_locate (*this, x, dis_ie_guest);
}
template <class T, class M>
typename geo_base_rep<T,M>::size_type
geo_base_rep<T,M>::dis_locate (
const point_basic<T>& x,
size_type dis_ie_guest) const
{
return _locator.dis_locate (*this, x, dis_ie_guest);
}
// ----------------
// 6b) disarray case:
// ----------------
template <class T>
void
geo_rep<T,sequential>::locate (
const disarray<point_basic<T>, sequential>& x,
disarray<size_type, sequential>& dis_ie,
bool do_check) const
{
dis_ie.resize (x.ownership());
for (size_type i = 0, n = x.size(); i < n; i++) {
dis_ie[i] = base::_locator.seq_locate (*this, x[i], dis_ie[i]);
if (do_check) {
check_macro (dis_ie[i] != std::numeric_limits<size_type>::max(),
"locate: failed at x="<<ptos(x[i],base::_dimension));
}
}
}
#ifdef _RHEOLEF_HAVE_MPI
template <class T>
void
geo_rep<T,distributed>::locate (
const disarray<point_basic<T>, distributed>& x,
disarray<size_type, distributed>& dis_ie,
// dis_ie(ix) can contains a guest for x in K=omega[dis_ie(ix)]
bool do_check) const
{
trace_macro ("locate...");
const size_type large = std::numeric_limits<size_type>::max();
const T infty = std::numeric_limits<T>::max();
// 1) scan x and locate into the local mesh partition ; list when failed
distributor ownership = x.ownership();
if (dis_ie.ownership() != ownership) dis_ie.resize (ownership);
size_type first_dis_i = ownership.first_index();
std::list<id_pt_t<T> > failed;
for (size_type i = 0, n = x.size(); i < n; i++) {
dis_ie[i] = base::_locator.seq_locate (*this, x[i], dis_ie[i]);
if (dis_ie[i] == large) {
size_type dis_i = first_dis_i + i;
failed.push_back (id_pt_t<T>(dis_i, x[i]));
}
}
// 2) merge the failed list into a massive disarray, then distributed to all
communicator comm = ownership.comm();
distributor fld_ownership (distributor::decide, comm, failed.size());
size_type fld_dis_size = fld_ownership.dis_size();
if (comm.size() == 1 || fld_dis_size == 0) {
// no unsolved, on any procs: nothing to do !
trace_macro ("locate done(1)");
return;
}
size_type first_fld_dis_i = fld_ownership.first_index();
size_type last_fld_dis_i = fld_ownership. last_index();
id_pt_t<T> unset (large, point_basic<T>(infty,infty,infty));
std::vector<id_pt_t<T> > massive_failed (fld_dis_size, unset);
typename std::list<id_pt_t<T> >::iterator iter = failed.begin();
for (size_type fld_dis_i = first_fld_dis_i; fld_dis_i < last_fld_dis_i; ++fld_dis_i, ++iter) {
massive_failed [fld_dis_i] = *iter;
}
std::vector<id_pt_t<T> > massive_query (fld_dis_size, unset);
mpi::all_reduce (
comm,
massive_failed.begin().operator->(),
massive_failed.size(),
massive_query.begin().operator->(),
id_pt_minimum<T>());
// 3) run the locator on all failed points ON ALL PROCS, skipping local queries (already failed)
std::vector<size_type> massive_result (fld_dis_size, large);
// 3a) range [0:first[
for (size_type fld_dis_i = 0; fld_dis_i < first_fld_dis_i; ++fld_dis_i) {
massive_result [fld_dis_i] = base::_locator.seq_locate (*this, massive_query[fld_dis_i].second);
}
// 3b) range [last,dis_size[
for (size_type fld_dis_i = last_fld_dis_i; fld_dis_i < fld_dis_size; ++fld_dis_i) {
massive_result [fld_dis_i] = base::_locator.seq_locate (*this, massive_query[fld_dis_i].second);
}
// 4) send & merge the results to all
std::vector<size_type> massive_merged (fld_dis_size, large);
mpi::all_reduce (
comm,
massive_result.begin().operator->(),
massive_result.size(),
massive_merged.begin().operator->(),
mpi::minimum<size_type>());
// 5) store the local range into the distributed disarray dis_ie:
for (size_type fld_dis_i = first_fld_dis_i; fld_dis_i < last_fld_dis_i; ++fld_dis_i, ++iter) {
size_type dis_i = massive_query [fld_dis_i].first;
check_macro (dis_i >= first_dis_i, "invalid index");
size_type i = dis_i - first_dis_i;
dis_ie[i] = massive_merged [fld_dis_i];
if (do_check) {
check_macro (dis_ie[i] != large,
"dis_locate: failed at x="<<ptos(x[i],base::_dimension));
}
}
trace_macro ("locate done(2)");
}
#endif // _RHEOLEF_HAVE_MPI
// ----------------------------------------------------------------------------
// no CGAL: no locators
// ----------------------------------------------------------------------------
#else // _RHEOLEF_HAVE_CGAL
template <class T, class M>
geo_locate<T,M>::~geo_locate()
{
}
template <class T, class M>
typename geo_locate<T,M>::size_type
geo_locate<T,M>::seq_locate (
const geo_base_rep<T,M>& omega,
const point_basic<T>& x,
size_type dis_ie_guest) const
{
fatal_macro ("geo: locator not available (HINT: recompile Rheolef with the CGAL library)");
return 0;
}
template <class T, class M>
typename geo_locate<T,M>::size_type
geo_locate<T,M>::dis_locate (
const geo_base_rep<T,M>& omega,
const point_basic<T>& x,
size_type dis_ie_guest) const
{
fatal_macro ("geo: locator not available (HINT: recompile Rheolef with the CGAL library)");
return 0;
}
template <class T, class M>
typename geo_base_rep<T,M>::size_type
geo_base_rep<T,M>::seq_locate (
const point_basic<T>& x,
size_type dis_ie_guest) const
{
fatal_macro ("geo: locator not available (HINT: recompile Rheolef with the CGAL library)");
return 0;
}
template <class T, class M>
typename geo_base_rep<T,M>::size_type
geo_base_rep<T,M>::dis_locate (
const point_basic<T>& x,
size_type dis_ie_guest) const
{
fatal_macro ("geo: locator not available (HINT: recompile Rheolef with the CGAL library)");
return 0;
}
template <class T>
void
geo_rep<T,sequential>::locate (
const disarray<point_basic<T>, sequential>& x,
disarray<size_type, sequential>& dis_ie,
bool do_check) const
{
fatal_macro ("geo: locator not available (HINT: recompile Rheolef with the CGAL library)");
}
#ifdef _RHEOLEF_HAVE_MPI
template <class T>
void
geo_rep<T,distributed>::locate (
const disarray<point_basic<T>, distributed>& x,
disarray<size_type, distributed>& dis_ie,
// dis_ie(ix) can contains a guest for x in K=omega[dis_ie(ix)]
bool do_check) const
{
fatal_macro ("geo: locator not available (HINT: recompile Rheolef with the CGAL library)");
}
#endif // _RHEOLEF_HAVE_MPI
#endif // _RHEOLEF_HAVE_CGAL
// ----------------------------------------------------------------------------
// instanciation in library
// ----------------------------------------------------------------------------
#define _RHEOLEF_instanciation(T,M) \
template class geo_locate<Float,M>; \
template class geo_base_rep<Float,M>; \
template class geo_rep<Float,M>;
_RHEOLEF_instanciation(Float,sequential)
#ifdef _RHEOLEF_HAVE_MPI
_RHEOLEF_instanciation(Float,distributed)
#endif // _RHEOLEF_HAVE_MPI
} // 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
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
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
rheolef::geo_element
see the geo_element page for the full documentation
Definition: geo_element.h:102
rheolef::geo_rep
sequential mesh representation
Definition: domain_indirect.h:63
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::size_type
disarray< T, M >::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
mkgeo_ball.d
d
Definition: mkgeo_ball.sh:154
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
mkgeo_ball.b
b
Definition: mkgeo_ball.sh:152
mkgeo_ball.n
n
Definition: mkgeo_ball.sh:150
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:218
trace_macro
#define trace_macro(message)
Definition: dis_macros.h:111
rheolef::geo_base_rep::dimension
size_type dimension() const
Definition: geo.h:563