1#ifndef _RHEOLEF_POINT_UTIL_H
2#define _RHEOLEF_POINT_UTIL_H
30#include "rheolef/distributor.h"
31#include "rheolef/point.h"
39struct id_pt_t : std::pair<size_t,point_basic<T> > {
40 typedef std::pair<size_t,point_basic<T> >
base;
43 template<
class Archive>
44 void serialize (Archive& ar,
const unsigned int version) {
51#ifdef _RHEOLEF_HAVE_MPI
59 struct is_mpi_datatype<
rheolef::id_pt_t<double> > : mpl::true_ { };
67struct 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]));
85struct pt2_t : std::pair<point_basic<T>,point_basic<T> > {
89 template<
class Archive>
90 void serialize (Archive& ar,
const unsigned int version) {
97#ifdef _RHEOLEF_HAVE_MPI
105 struct is_mpi_datatype<
rheolef::pt2_t<double> > : mpl::true_ { };
113struct 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]));
This file is part of Rheolef.
id_pt_t< T > operator()(const id_pt_t< T > &a, const id_pt_t< T > &b)
void serialize(Archive &ar, const unsigned int version)
std::pair< size_t, point_basic< T > > base
id_pt_t(size_t dis_i, const point_basic< T > &x)
pt2_t< T > operator()(const pt2_t< T > &a, const pt2_t< T > &b)
pt2_t(const point_basic< T > &x, const point_basic< T > &y)
void serialize(Archive &ar, const unsigned int version)
std::pair< point_basic< T >, point_basic< T > > base