1 #ifndef _RHEOLEF_POINT_UTIL_H
2 #define _RHEOLEF_POINT_UTIL_H
30 #include "rheolef/distributor.h"
31 #include "rheolef/point.h"
39 struct id_pt_t : std::pair<size_t,point_basic<T> > {
40 typedef std::pair<size_t,point_basic<T> >
base;
43 template<
class Archive>
51 #ifdef _RHEOLEF_HAVE_MPI
59 struct is_mpi_datatype<
rheolef::id_pt_t<double> > : mpl::true_ { };
62 #endif // _RHEOLEF_HAVE_MPI
67 struct id_pt_minimum :
public std::binary_function<id_pt_t<T>, id_pt_t<T>, id_pt_t<T> > {
70 size_t id = std::min(
a.first,
b.first);
72 std::min(
a.second[1],
b.second[1]),
73 std::min(
a.second[2],
b.second[2]));
85 struct pt2_t : std::pair<point_basic<T>,point_basic<T> > {
89 template<
class Archive>
97 #ifdef _RHEOLEF_HAVE_MPI
105 struct is_mpi_datatype<
rheolef::pt2_t<double> > : mpl::true_ { };
108 #endif // _RHEOLEF_HAVE_MPI
113 struct pt2_minimum :
public std::binary_function<pt2_t<T>, pt2_t<T>, pt2_t<T> > {
117 std::min(
a.first [1],
b.first [1]),
118 std::min(
a.first [2],
b.first [2]));
120 std::min(
a.second[1],
b.second[1]),
121 std::min(
a.second[2],
b.second[2]));
129 #endif // _RHEOLEF_POINT_UTIL_H