4 #include <boost/fusion/sequence/intrinsic/at_c.hpp>
5 #include <boost/fusion/include/at_c.hpp>
6 #include <boost/fusion/container/vector.hpp>
7 #include <boost/fusion/include/vector.hpp>
8 #include <boost/fusion/container/vector/vector_fwd.hpp>
9 #include <boost/fusion/include/vector_fwd.hpp>
10 #include "boost/multi_array.hpp"
11 #include "Point_orig.hpp"
12 #include "Grid/Encap.hpp"
38 typedef boost::fusion::vector<T,T,T,T,T[2],T[2][2]> type;
40 static constexpr
bool stag_mask[]={
false,
false,
false,
true,
true,
true};
44 static const unsigned int x = 0;
45 static const unsigned int y = 1;
46 static const unsigned int z = 2;
47 static const unsigned int s = 3;
48 static const unsigned int v = 4;
49 static const unsigned int t = 5;
50 static const unsigned int max_prop = 6;
76 typedef boost::fusion::vector<T,T,T,T,T[3],T[3][3]> type;
78 static constexpr
bool stag_mask[]={
false,
false,
false,
true,
true,
true};
82 static const unsigned int x = 0;
83 static const unsigned int y = 1;
84 static const unsigned int z = 2;
85 static const unsigned int s = 3;
86 static const unsigned int v = 4;
87 static const unsigned int t = 5;
88 static const unsigned int max_prop = 6;
92 inline void setx(T x_) {boost::fusion::at_c<0>(data) = x_;};
93 inline void sety(T y_) {boost::fusion::at_c<1>(data) = y_;};
94 inline void setz(T z_) {boost::fusion::at_c<2>(data) = z_;};
95 inline void sets(T s_) {boost::fusion::at_c<3>(data) = s_;};
97 inline void setv(
size_t i,T v_) {boost::fusion::at_c<4>(data)[i] = v_;}
98 inline void sett(
size_t i,
size_t j,T t_) {boost::fusion::at_c<5>(data)[i][j] = t_;}
103 template<
unsigned int i>
inline typename boost::fusion::result_of::at<type, boost::mpl::int_<i> >::type
get() {
return boost::fusion::at_c<i>(data);};
112 if (boost::fusion::at_c<0>(data) != boost::fusion::at_c<0>(p.data))
return false;
113 if (boost::fusion::at_c<1>(data) != boost::fusion::at_c<1>(p.data))
return false;
114 if (boost::fusion::at_c<2>(data) != boost::fusion::at_c<2>(p.data))
return false;
115 if (boost::fusion::at_c<3>(data) != boost::fusion::at_c<3>(p.data))
return false;
117 for (
size_t i = 0 ; i < 3 ; i++)
118 if (boost::fusion::at_c<4>(data)[i] != boost::fusion::at_c<4>(p.data)[i])
return false;
120 for (
size_t i = 0 ; i < 3 ; i++)
122 for (
size_t j = 0 ; j < 3 ; j++)
124 if (boost::fusion::at_c<5>(data)[i][j] != boost::fusion::at_c<5>(p.data)[i][j])
return false;
134 boost::fusion::at_c<0>(data) = p.template get<0>();
135 boost::fusion::at_c<1>(data) = p.template get<1>();
136 boost::fusion::at_c<2>(data) = p.template get<2>();
137 boost::fusion::at_c<3>(data) = p.template get<3>();
139 for (
size_t i = 0 ; i < 3 ; i++)
140 boost::fusion::at_c<4>(data)[i] = p.template get<4>()[i];
142 for (
size_t i = 0 ; i < 3 ; i++)
144 for (
size_t j = 0 ; j < 3 ; j++)
146 boost::fusion::at_c<5>(data)[i][j] = p.template get<5>()[i][j];
154 boost::fusion::at_c<0>(data) = p.template get<0>();
155 boost::fusion::at_c<1>(data) = p.template get<1>();
156 boost::fusion::at_c<2>(data) = p.template get<2>();
157 boost::fusion::at_c<3>(data) = p.template get<3>();
159 for (
size_t i = 0 ; i < 3 ; i++)
160 boost::fusion::at_c<4>(data)[i] = p.template get<4>()[i];
162 for (
size_t i = 0 ; i < 3 ; i++)
164 for (
size_t j = 0 ; j < 3 ; j++)
166 boost::fusion::at_c<5>(data)[i][j] = p.template get<5>()[i][j];
174 boost::fusion::at_c<0>(data) = boost::fusion::at_c<0>(p.data);
175 boost::fusion::at_c<1>(data) = boost::fusion::at_c<1>(p.data);
176 boost::fusion::at_c<2>(data) = boost::fusion::at_c<2>(p.data);
177 boost::fusion::at_c<3>(data) = boost::fusion::at_c<3>(p.data);
179 for (
size_t i = 0 ; i < 3 ; i++)
180 boost::fusion::at_c<4>(data)[i] = boost::fusion::at_c<4>(p.data)[i];
182 for (
size_t i = 0 ; i < 3 ; i++)
184 for (
size_t j = 0 ; j < 3 ; j++)
186 boost::fusion::at_c<5>(data)[i][j] = boost::fusion::at_c<5>(p.data)[i][j];
194 boost::fusion::at_c<0>(data) = boost::fusion::at_c<0>(p.data);
195 boost::fusion::at_c<1>(data) = boost::fusion::at_c<1>(p.data);
196 boost::fusion::at_c<2>(data) = boost::fusion::at_c<2>(p.data);
197 boost::fusion::at_c<3>(data) = boost::fusion::at_c<3>(p.data);
199 for (
size_t i = 0 ; i < 3 ; i++)
200 boost::fusion::at_c<4>(data)[i] = boost::fusion::at_c<4>(p.data)[i];
202 for (
size_t i = 0 ; i < 3 ; i++)
204 for (
size_t j = 0 ; j < 3 ; j++)
206 boost::fusion::at_c<5>(data)[i][j] = boost::fusion::at_c<5>(p.data)[i][j];
229 boost::fusion::at_c<0>(data) = 1;
230 boost::fusion::at_c<1>(data) = 2;
231 boost::fusion::at_c<2>(data) = 3;
232 boost::fusion::at_c<3>(data) = 4;
234 for (
size_t i = 0 ; i < 3 ; i++)
235 boost::fusion::at_c<4>(data)[i] = 5;
237 for (
size_t i = 0 ; i < 3 ; i++)
239 for (
size_t j = 0 ; j < 3 ; j++)
241 boost::fusion::at_c<5>(data)[i][j] = 6;
273 typedef boost::fusion::vector<T,T,T,T,T[3],T[3][3]> type;
277 static const unsigned int x = 0;
278 static const unsigned int y = 1;
279 static const unsigned int z = 2;
280 static const unsigned int s = 3;
281 static const unsigned int v = 4;
282 static const unsigned int t = 5;
283 static const unsigned int max_prop = 6;
287 inline void setx(T x_) {boost::fusion::at_c<0>(data) = x_;};
288 inline void sety(T y_) {boost::fusion::at_c<1>(data) = y_;};
289 inline void setz(T z_) {boost::fusion::at_c<2>(data) = z_;};
290 inline void sets(T s_) {boost::fusion::at_c<3>(data) = s_;};
295 static const std::string name[];
300 template<
unsigned int i>
inline typename boost::fusion::result_of::at<type, boost::mpl::int_<i> >::type
get() {
return boost::fusion::at_c<i>(data);};
309 boost::fusion::at_c<0>(data) = p.template get<0>();
310 boost::fusion::at_c<1>(data) = p.template get<1>();
311 boost::fusion::at_c<2>(data) = p.template get<2>();
312 boost::fusion::at_c<3>(data) = p.template get<3>();
314 for (
size_t i = 0 ; i < 3 ; i++)
315 boost::fusion::at_c<4>(data)[i] = p.template get<4>()[i];
317 for (
size_t i = 0 ; i < 3 ; i++)
319 for (
size_t j = 0 ; j < 3 ; j++)
321 boost::fusion::at_c<5>(data)[i][j] = p.template get<5>()[i][j];
329 boost::fusion::at_c<0>(data) = boost::fusion::at_c<0>(p.data);
330 boost::fusion::at_c<1>(data) = boost::fusion::at_c<1>(p.data);
331 boost::fusion::at_c<2>(data) = boost::fusion::at_c<2>(p.data);
332 boost::fusion::at_c<3>(data) = boost::fusion::at_c<3>(p.data);
334 for (
size_t i = 0 ; i < 3 ; i++)
335 boost::fusion::at_c<4>(data)[i] = boost::fusion::at_c<4>(p.data)[i];
337 for (
size_t i = 0 ; i < 3 ; i++)
339 for (
size_t j = 0 ; j < 3 ; j++)
341 boost::fusion::at_c<5>(data)[i][j] = boost::fusion::at_c<5>(p.data)[i][j];
349 boost::fusion::at_c<0>(data) = boost::fusion::at_c<0>(p.data);
350 boost::fusion::at_c<1>(data) = boost::fusion::at_c<1>(p.data);
351 boost::fusion::at_c<2>(data) = boost::fusion::at_c<2>(p.data);
352 boost::fusion::at_c<3>(data) = boost::fusion::at_c<3>(p.data);
354 for (
size_t i = 0 ; i < 3 ; i++)
355 boost::fusion::at_c<4>(data)[i] = boost::fusion::at_c<4>(p.data)[i];
357 for (
size_t i = 0 ; i < 3 ; i++)
359 for (
size_t j = 0 ; j < 3 ; j++)
361 boost::fusion::at_c<5>(data)[i][j] = boost::fusion::at_c<5>(p.data)[i][j];
375 typedef boost::fusion::vector<T,T,T,T> type;
379 static const unsigned int x = 0;
380 static const unsigned int y = 1;
381 static const unsigned int z = 2;
382 static const unsigned int s = 3;
383 static const unsigned int max_prop = 4;
387 inline void setx(T x_) {boost::fusion::at_c<0>(data) = x_;};
388 inline void sety(T y_) {boost::fusion::at_c<1>(data) = y_;};
389 inline void setz(T z_) {boost::fusion::at_c<2>(data) = z_;};
390 inline void sets(T s_) {boost::fusion::at_c<3>(data) = s_;};
395 static const std::string name[];
400 template<
unsigned int i>
inline typename boost::fusion::result_of::at<type, boost::mpl::int_<i> >::type
get() {
return boost::fusion::at_c<i>(data);};
409 boost::fusion::at_c<0>(data) = p.template get<0>();
410 boost::fusion::at_c<1>(data) = p.template get<1>();
411 boost::fusion::at_c<2>(data) = p.template get<2>();
412 boost::fusion::at_c<3>(data) = p.template get<3>();
418 boost::fusion::at_c<0>(data) = boost::fusion::at_c<0>(p.data);
419 boost::fusion::at_c<1>(data) = boost::fusion::at_c<1>(p.data);
420 boost::fusion::at_c<2>(data) = boost::fusion::at_c<2>(p.data);
421 boost::fusion::at_c<3>(data) = boost::fusion::at_c<3>(p.data);
427 boost::fusion::at_c<0>(data) = boost::fusion::at_c<0>(p.data);
428 boost::fusion::at_c<1>(data) = boost::fusion::at_c<1>(p.data);
429 boost::fusion::at_c<2>(data) = boost::fusion::at_c<2>(p.data);
430 boost::fusion::at_c<3>(data) = boost::fusion::at_c<3>(p.data);
Point_test_scal(const Point_test_scal< T > &p)
constructor from another point
Point_test(const encapc< dim, Point_test< T >, Mem > &p)
constructor from encapc
Test structure used for several test.
Point_test_scal()
Default constructor.
Point_test_prp(const Point_test_prp< T > &p)
constructor from another point
Point_test(const Point_test< T > &p)
constructor from another point
bool operator==(const Point_test< float > &p) const
check if two point match
Point_test< T > operator=(const Point_test< T > &p)
constructor from another point
Point_test_scal< T > operator=(const Point_test_scal< T > &p)
constructor from another point
Point_test_prp< T > operator=(const Point_test< T > &p)
constructor from another point
Point_test()
Default constructor.
this structure encapsulate an object of the grid
static bool noPointers()
noPointers function
Test structure used for several test.
this structure encapsulate an object of the grid
Point_test_prp()
Default constructor.
Point_test_scal(const encapc< 1, Point_test_scal< T >, Mem > &p)
constructor from encapc
Test structure used for several test.
Point_test(const encapg< dim, Point_test< T >, Mem > &p)
constructor from encapg
Point_test_prp(const encapc< 1, Point_test_prp< T >, Mem > &p)
constructor from encapc