OpenFPM_pdata  1.1.0
Project that contain the implementation of distributed structures
 All Data Structures Namespaces Functions Variables Typedefs Enumerations Friends Pages
VTKWriter_unit_tests.hpp
1 /*
2  * VTKWriter_unit_tests.hpp
3  *
4  * Created on: May 6, 2015
5  * Author: Pietro Incardona
6  */
7 
8 #ifndef VTKWRITER_UNIT_TESTS_HPP_
9 #define VTKWRITER_UNIT_TESTS_HPP_
10 
11 #include "data_type/aggregate.hpp"
12 #include <random>
13 #include "VTKWriter.hpp"
14 #include "util/SimpleRNG.hpp"
15 
16 BOOST_AUTO_TEST_SUITE( vtk_writer_test )
17 
18 
21 struct vertex
22 {
24  typedef boost::fusion::vector<float,float,float,float,size_t,double,unsigned char,long int> type;
25 
27  typedef float s_type;
28 
30  struct attributes
31  {
32  static const std::string name[];
33  };
34 
36  type data;
37 
39  static const unsigned int x = 0;
41  static const unsigned int y = 1;
43  static const unsigned int z = 2;
45  static const unsigned int prp1 = 3;
47  static const unsigned int prp2 = 4;
49  static const unsigned int prp3 = 5;
51  static const unsigned int prp4 = 6;
53  static const unsigned int prp5 = 7;
54 
56  static const unsigned int max_prop = 8;
57 
63  {
64 
65  }
66 
67  static inline bool noPointers()
68  {
69  return true;
70  }
71 
79  vertex(float x, float y, float z)
80  {
81  boost::fusion::at_c<vertex::x>(data) = x;
82  boost::fusion::at_c<vertex::y>(data) = y;
83  boost::fusion::at_c<vertex::z>(data) = z;
84  }
85 };
86 
87 const std::string vertex::attributes::name[] = {"x","y","z","prp1","prp2","prp3","prp4","prp5"};
88 
89 struct vertex2
90 {
92  typedef boost::fusion::vector<float[3],size_t,double> type;
93 
95  typedef float s_type;
96 
98  struct attributes
99  {
100  static const std::string name[];
101  };
102 
105 
107  static const unsigned int x = 0;
108  static const unsigned int prp1 = 1;
109  static const unsigned int prp2 = 2;
110 
112  static const unsigned int max_prop = 3;
113 
119  {
120 
121  }
122 
123  static inline bool noPointers()
124  {
125  return true;
126  }
127 
135  vertex2(float x, float y, float z)
136  {
137  boost::fusion::at_c<vertex::x>(data)[0] = x;
138  boost::fusion::at_c<vertex::x>(data)[1] = y;
139  boost::fusion::at_c<vertex::x>(data)[2] = z;
140  }
141 };
142 
143 // use the vertex like the edge
144 typedef vertex edge;
145 
146 const std::string vertex2::attributes::name[] = {"x","prp1","prp2"};
147 
148 
149 
150 BOOST_AUTO_TEST_CASE( vtk_writer_use_graph3D )
151 {
152  Vcluster & v_cl = create_vcluster();
153 
154  if (v_cl.getProcessUnitID() != 0)
155  return;
156 
157  // Create some graphs and output them
158 
159  // Graph
160 
162 
163  // Create a cube graph
164 
165  gr.addVertex(vertex2(0.0,0.0,0.0));
166  gr.addVertex(vertex2(0.0,0.0,1.0));
167  gr.addVertex(vertex2(0.0,1.0,0.0));
168  gr.addVertex(vertex2(0.0,1.0,1.0));
169  gr.addVertex(vertex2(1.0,0.0,0.0));
170  gr.addVertex(vertex2(1.0,0.0,1.0));
171  gr.addVertex(vertex2(1.0,1.0,0.0));
172  gr.addVertex(vertex2(1.0,1.0,1.0));
173 
174  gr.addEdge(0,6);
175  gr.addEdge(6,4);
176  gr.addEdge(4,0);
177 
178  gr.addEdge(0,2);
179  gr.addEdge(2,6);
180  gr.addEdge(6,0);
181 
182  gr.addEdge(0,3);
183  gr.addEdge(3,2);
184  gr.addEdge(2,0);
185 
186  gr.addEdge(0,1);
187  gr.addEdge(1,3);
188  gr.addEdge(3,0);
189 
190  gr.addEdge(2,7);
191  gr.addEdge(7,6);
192  gr.addEdge(6,2);
193 
194  gr.addEdge(2,3);
195  gr.addEdge(3,7);
196  gr.addEdge(7,2);
197 
198  gr.addEdge(4,6);
199  gr.addEdge(6,7);
200  gr.addEdge(7,4);
201 
202  gr.addEdge(4,7);
203  gr.addEdge(7,5);
204  gr.addEdge(5,4);
205 
206  gr.addEdge(0,4);
207  gr.addEdge(4,5);
208  gr.addEdge(5,0);
209 
210  gr.addEdge(0,5);
211  gr.addEdge(5,1);
212  gr.addEdge(1,0);
213 
214  gr.addEdge(1,5);
215  gr.addEdge(5,7);
216  gr.addEdge(7,1);
217 
218  gr.addEdge(1,7);
219  gr.addEdge(7,3);
220  gr.addEdge(3,1);
221 
222  // Write the VTK file
223 
224  VTKWriter<Graph_CSR<vertex2,edge>,VTK_GRAPH> vtk(gr);
225  vtk.write("vtk_graph_v2.vtk");
226 
227  // check that match
228 
229  bool test = compare("vtk_graph_v2.vtk","test_data/vtk_graph_v2_test.vtk");
230  BOOST_REQUIRE_EQUAL(true,test);
231 }
232 
233 BOOST_AUTO_TEST_CASE( vtk_writer_use_graph3D_edge )
234 {
235  Vcluster & v_cl = create_vcluster();
236 
237  if (v_cl.getProcessUnitID() != 0)
238  return;
239 
240  // Create some graphs and output them
241 
242  // Graph
243 
245 
246  // Create a cube graph
247 
248  gr.addVertex(vertex2(0.0,0.0,0.0));
249  gr.addVertex(vertex2(0.0,0.0,1.0));
250  gr.addVertex(vertex2(0.0,1.0,0.0));
251  gr.addVertex(vertex2(0.0,1.0,1.0));
252  gr.addVertex(vertex2(1.0,0.0,0.0));
253  gr.addVertex(vertex2(1.0,0.0,1.0));
254  gr.addVertex(vertex2(1.0,1.0,0.0));
255  gr.addVertex(vertex2(1.0,1.0,1.0));
256 
257  gr.addEdge(0,6,vertex2(0.0,0.0,1.0));
258  gr.addEdge(6,4,vertex2(0.0,0.0,1.0));
259  gr.addEdge(4,0,vertex2(0.0,0.0,1.0));
260 
261  gr.addEdge(0,2,vertex2(0.0,0.0,1.0));
262  gr.addEdge(2,6,vertex2(0.0,0.0,1.0));
263  gr.addEdge(6,0,vertex2(0.0,0.0,1.0));
264 
265  gr.addEdge(0,3,vertex2(0.0,0.0,1.0));
266  gr.addEdge(3,2,vertex2(0.0,0.0,1.0));
267  gr.addEdge(2,0,vertex2(0.0,0.0,1.0));
268 
269  gr.addEdge(0,1,vertex2(0.0,0.0,1.0));
270  gr.addEdge(1,3,vertex2(0.0,0.0,1.0));
271  gr.addEdge(3,0,vertex2(0.0,0.0,1.0));
272 
273  gr.addEdge(2,7,vertex2(0.0,0.0,1.0));
274  gr.addEdge(7,6,vertex2(0.0,0.0,1.0));
275  gr.addEdge(6,2,vertex2(0.0,0.0,1.0));
276 
277  gr.addEdge(2,3,vertex2(0.0,0.0,1.0));
278  gr.addEdge(3,7,vertex2(0.0,0.0,1.0));
279  gr.addEdge(7,2,vertex2(0.0,0.0,1.0));
280 
281  gr.addEdge(4,6,vertex2(0.0,0.0,1.0));
282  gr.addEdge(6,7,vertex2(0.0,0.0,1.0));
283  gr.addEdge(7,4,vertex2(0.0,0.0,1.0));
284 
285  gr.addEdge(4,7,vertex2(0.0,0.0,1.0));
286  gr.addEdge(7,5,vertex2(0.0,0.0,1.0));
287  gr.addEdge(5,4,vertex2(0.0,0.0,1.0));
288 
289  gr.addEdge(0,4,vertex2(0.0,0.0,1.0));
290  gr.addEdge(4,5,vertex2(0.0,0.0,1.0));
291  gr.addEdge(5,0,vertex2(0.0,0.0,1.0));
292 
293  gr.addEdge(0,5,vertex2(0.0,0.0,1.0));
294  gr.addEdge(5,1,vertex2(0.0,0.0,1.0));
295  gr.addEdge(1,0,vertex2(0.0,0.0,1.0));
296 
297  gr.addEdge(1,5,vertex2(0.0,0.0,1.0));
298  gr.addEdge(5,7,vertex2(0.0,0.0,1.0));
299  gr.addEdge(7,1,vertex2(0.0,0.0,1.0));
300 
301  gr.addEdge(1,7,vertex2(0.0,0.0,1.0));
302  gr.addEdge(7,3,vertex2(0.0,0.0,1.0));
303  gr.addEdge(3,1,vertex2(0.0,0.0,1.0));
304 
305  // Write the VTK file
306 
307  VTKWriter<Graph_CSR<vertex2,vertex2>,VTK_GRAPH> vtk(gr);
308  vtk.write("vtk_graph_v4.vtk");
309 
310  // check that match
311 
312  bool test = compare("vtk_graph_v4.vtk","test_data/vtk_graph_v4_test.vtk");
313  BOOST_REQUIRE_EQUAL(true,test);
314 }
315 
316 struct vertex3
317 {
319  typedef boost::fusion::vector<float[2],size_t,double> type;
320 
322  typedef float s_type;
323 
325  struct attributes
326  {
327  static const std::string name[];
328  };
329 
332 
334  static const unsigned int x = 0;
335  static const unsigned int prp1 = 1;
336  static const unsigned int prp2 = 2;
337 
339  static const unsigned int max_prop = 3;
340 
346  {
347 
348  }
349 
350  static inline bool noPointers()
351  {
352  return true;
353  }
354 
360  vertex3(float x, float y)
361  {
362  boost::fusion::at_c<vertex::x>(data)[0] = x;
363  boost::fusion::at_c<vertex::x>(data)[1] = y;
364  }
365 };
366 
367 // use the vertex like the edge
368 typedef vertex edge;
369 
370 const std::string vertex3::attributes::name[] = {"x","prp1","prp2"};
371 
372 BOOST_AUTO_TEST_CASE( vtk_writer_use_graph2D )
373 {
374  Vcluster & v_cl = create_vcluster();
375 
376  if (v_cl.getProcessUnitID() != 0)
377  return;
378 
379  // Create some graphs and output them
380 
381  // Graph
382 
384 
385  // Create a cube graph
386 
387  gr.addVertex(vertex3(0.0,0.0));
388  gr.addVertex(vertex3(0.0,1.0));
389  gr.addVertex(vertex3(1.0,0.0));
390  gr.addVertex(vertex3(1.0,1.0));
391 
392  gr.addEdge(0,1);
393  gr.addEdge(1,3);
394  gr.addEdge(3,2);
395  gr.addEdge(2,0);
396 
397  // Write the VTK file
398 
399  VTKWriter<Graph_CSR<vertex3,edge>,VTK_GRAPH> vtk(gr);
400  vtk.write("vtk_graph_v3.vtk");
401 
402  // check that match
403 
404  bool test = compare("vtk_graph_v3.vtk","test_data/vtk_graph_v3_test.vtk");
405  BOOST_REQUIRE_EQUAL(true,test);
406 }
407 
408 BOOST_AUTO_TEST_CASE( vtk_writer_use_graph)
409 {
410  Vcluster & v_cl = create_vcluster();
411 
412  if (v_cl.getProcessUnitID() != 0)
413  return;
414 
415  // Create some graphs and output them
416 
417  std::cout << "Graph unit test start" << "\n";
418 
419  // Graph
420 
422 
423  // Create a cube graph
424 
425  gr.addVertex(vertex(0.0,0.0,0.0));
426  gr.addVertex(vertex(0.0,0.0,1.0));
427  gr.addVertex(vertex(0.0,1.0,0.0));
428  gr.addVertex(vertex(0.0,1.0,1.0));
429  gr.addVertex(vertex(1.0,0.0,0.0));
430  gr.addVertex(vertex(1.0,0.0,1.0));
431  gr.addVertex(vertex(1.0,1.0,0.0));
432  gr.addVertex(vertex(1.0,1.0,1.0));
433 
434  gr.addEdge(0,6);
435  gr.addEdge(6,4);
436  gr.addEdge(4,0);
437 
438  gr.addEdge(0,2);
439  gr.addEdge(2,6);
440  gr.addEdge(6,0);
441 
442  gr.addEdge(0,3);
443  gr.addEdge(3,2);
444  gr.addEdge(2,0);
445 
446  gr.addEdge(0,1);
447  gr.addEdge(1,3);
448  gr.addEdge(3,0);
449 
450  gr.addEdge(2,7);
451  gr.addEdge(7,6);
452  gr.addEdge(6,2);
453 
454  gr.addEdge(2,3);
455  gr.addEdge(3,7);
456  gr.addEdge(7,2);
457 
458  gr.addEdge(4,6);
459  gr.addEdge(6,7);
460  gr.addEdge(7,4);
461 
462  gr.addEdge(4,7);
463  gr.addEdge(7,5);
464  gr.addEdge(5,4);
465 
466  gr.addEdge(0,4);
467  gr.addEdge(4,5);
468  gr.addEdge(5,0);
469 
470  gr.addEdge(0,5);
471  gr.addEdge(5,1);
472  gr.addEdge(1,0);
473 
474  gr.addEdge(1,5);
475  gr.addEdge(5,7);
476  gr.addEdge(7,1);
477 
478  gr.addEdge(1,7);
479  gr.addEdge(7,3);
480  gr.addEdge(3,1);
481 
482  // Write the VTK file
483 
484  VTKWriter<Graph_CSR<vertex,edge>,VTK_GRAPH> vtk(gr);
485  vtk.write("vtk_graph.vtk");
486 
487  // check that match
488 
489  bool test = compare("vtk_graph.vtk","test_data/vtk_graph_test.vtk");
490  BOOST_REQUIRE_EQUAL(true,test);
491 }
492 
493 BOOST_AUTO_TEST_CASE( vtk_writer_use_vector_box)
494 {
495  Vcluster & v_cl = create_vcluster();
496 
497  if (v_cl.getProcessUnitID() != 0)
498  return;
499 
500  // Create a vector of boxes
502 
503  vb.add(Box<2,float>({0.2,0.2},{1.0,0.5}));
504  vb.add(Box<2,float>({0.0,0.0},{0.2,0.2}));
505  vb.add(Box<2,float>({0.2,0.0},{0.5,0.2}));
506  vb.add(Box<2,float>({0.5,0.0},{1.0,0.2}));
507  vb.add(Box<2,float>({0.0,0.2},{0.2,0.5}));
508  vb.add(Box<2,float>({0.0,0.5},{1.0,1.0}));
509 
510  // Create a writer and write
511  VTKWriter<openfpm::vector<Box<2,float>>,VECTOR_BOX> vtk_box;
512  vtk_box.add(vb);
513  vtk_box.write("vtk_box.vtk");
514 
515  // Check that match
516  bool test = compare("vtk_box.vtk","test_data/vtk_box_test.vtk");
517  BOOST_REQUIRE_EQUAL(test,true);
518 
519  // Create a vector of boxes
521 
522  vb2.add(Box<3,float>({0.2,0.2,0.0},{1.0,0.5,0.5}));
523  vb2.add(Box<3,float>({0.0,0.0,0.0},{0.2,0.2,0.5}));
524  vb2.add(Box<3,float>({0.2,0.0,0.0},{0.5,0.2,0.5}));
525  vb2.add(Box<3,float>({0.5,0.0,0.0},{1.0,0.2,0.5}));
526  vb2.add(Box<3,float>({0.0,0.2,0.0},{0.2,0.5,0.5}));
527  vb2.add(Box<3,float>({0.0,0.5,0.0},{1.0,1.0,0.5}));
528 
529  // Create a writer and write
530  VTKWriter<openfpm::vector<Box<3,float>>,VECTOR_BOX> vtk_box2;
531  vtk_box2.add(vb2);
532  vtk_box2.write("vtk_box_3D.vtk");
533 
534  // Check that match
535  test = compare("vtk_box_3D.vtk","test_data/vtk_box_3D_test.vtk");
536  BOOST_REQUIRE_EQUAL(test,true);
537 
538  // Create a vector of boxes
540  vb3.add(Box<3,float>({0.2,0.2,0.5},{1.0,0.5,1.0}));
541  vb3.add(Box<3,float>({0.0,0.0,0.5},{0.2,0.2,1.0}));
542  vb3.add(Box<3,float>({0.2,0.0,0.5},{0.5,0.2,1.0}));
543  vb3.add(Box<3,float>({0.5,0.0,0.5},{1.0,0.2,1.0}));
544  vb3.add(Box<3,float>({0.0,0.2,0.5},{0.2,0.5,1.0}));
545  vb3.add(Box<3,float>({0.0,0.5,0.5},{1.0,1.0,1.0}));
546 
547  // Create a writer and write
548  VTKWriter<openfpm::vector<Box<3,float>>,VECTOR_BOX> vtk_box3;
549  vtk_box3.add(vb2);
550  vtk_box3.add(vb3);
551  vtk_box3.write("vtk_box_3D_2.vtk");
552 
553  // Check that match
554  test = compare("vtk_box_3D_2.vtk","test_data/vtk_box_3D_2_test.vtk");
555  BOOST_REQUIRE_EQUAL(test,true);
556 }
557 
563 template<typename grid_type> void fill_grid_some_data(grid_type & g)
564 {
565  typedef Point_test<float> p;
566 
567  auto it = g.getIterator();
568 
569  while (it.isNext())
570  {
571  g.template get<p::x>(it.get()) = it.get().get(0);
572  if (grid_type::dims != 1)
573  {g.template get<p::y>(it.get()) = it.get().get(1);}
574  else
575  {g.template get<p::y>(it.get()) = 0.0;}
576  g.template get<p::z>(it.get()) = 0;
577  g.template get<p::s>(it.get()) = 1.0;
578  g.template get<p::v>(it.get())[0] = g.getGrid().LinId(it.get());
579  g.template get<p::v>(it.get())[1] = g.getGrid().LinId(it.get());
580  g.template get<p::v>(it.get())[2] = g.getGrid().LinId(it.get());
581 
582  g.template get<p::t>(it.get())[0][0] = g.getGrid().LinId(it.get());
583  g.template get<p::t>(it.get())[0][1] = g.getGrid().LinId(it.get());
584  g.template get<p::t>(it.get())[0][2] = g.getGrid().LinId(it.get());
585  g.template get<p::t>(it.get())[1][0] = g.getGrid().LinId(it.get());
586  g.template get<p::t>(it.get())[1][1] = g.getGrid().LinId(it.get());
587  g.template get<p::t>(it.get())[1][2] = g.getGrid().LinId(it.get());
588  g.template get<p::t>(it.get())[2][0] = g.getGrid().LinId(it.get());
589  g.template get<p::t>(it.get())[2][1] = g.getGrid().LinId(it.get());
590  g.template get<p::t>(it.get())[2][2] = g.getGrid().LinId(it.get());
591 
592  ++it;
593  }
594 }
595 
601 void fill_grid_some_data_prp(grid_cpu<2,Point_test_prp<float>> & g)
602 {
603  typedef Point_test<float> p;
604 
605  auto it = g.getIterator();
606 
607  while (it.isNext())
608  {
609  g.template get<p::x>(it.get()) = it.get().get(0);
610  g.template get<p::y>(it.get()) = it.get().get(1);
611  g.template get<p::z>(it.get()) = 0;
612  g.template get<p::s>(it.get()) = 1.0;
613  g.template get<p::v>(it.get())[0] = g.getGrid().LinId(it.get());
614  g.template get<p::v>(it.get())[1] = g.getGrid().LinId(it.get());
615  g.template get<p::v>(it.get())[2] = g.getGrid().LinId(it.get());
616 
617  g.template get<p::t>(it.get())[0][0] = g.getGrid().LinId(it.get());
618  g.template get<p::t>(it.get())[0][1] = g.getGrid().LinId(it.get());
619  g.template get<p::t>(it.get())[0][2] = g.getGrid().LinId(it.get());
620  g.template get<p::t>(it.get())[1][0] = g.getGrid().LinId(it.get());
621  g.template get<p::t>(it.get())[1][1] = g.getGrid().LinId(it.get());
622  g.template get<p::t>(it.get())[1][2] = g.getGrid().LinId(it.get());
623  g.template get<p::t>(it.get())[2][0] = g.getGrid().LinId(it.get());
624  g.template get<p::t>(it.get())[2][1] = g.getGrid().LinId(it.get());
625  g.template get<p::t>(it.get())[2][2] = g.getGrid().LinId(it.get());
626 
627  ++it;
628  }
629 }
630 
635 void fill_grid_some_data_scal(grid_cpu<2,Point_test_scal<float>> & g)
636 {
637  typedef Point_test<float> p;
638 
639  auto it = g.getIterator();
640 
641  while (it.isNext())
642  {
643  g.template get<p::x>(it.get()) = it.get().get(0);
644  g.template get<p::y>(it.get()) = it.get().get(1);
645  g.template get<p::z>(it.get()) = 0;
646  g.template get<p::s>(it.get()) = 1.0;
647 
648  ++it;
649  }
650 }
651 
652 BOOST_AUTO_TEST_CASE( vtk_writer_use_grids)
653 {
654  Vcluster & v_cl = create_vcluster();
655 
656  if (v_cl.getProcessUnitID() != 0)
657  {return;}
658 
659  {
660 
661  // Create box grids
662  Point<1,float> offset1({0.0});
663  Point<1,float> spacing1({0.1});
664  Box<1,size_t> d1({1},{14});
665 
666  // Create box grids
667  Point<1,float> offset2({5.0,7.0});
668  Point<1,float> spacing2({0.2,0.1});
669  Box<1,size_t> d2({2},{13});
670 
671  // Create box grids
672  Point<1,float> offset3({0.0});
673  Point<1,float> spacing3({0.05});
674  Box<1,size_t> d3({3},{11});
675 
676  // Create box grids
677  Point<1,float> offset4({5.0});
678  Point<1,float> spacing4({0.1});
679  Box<1,size_t> d4({1},{7});
680 
681  size_t sz[] = {16};
683  g1.setMemory();
684  fill_grid_some_data(g1);
686  g2.setMemory();
687  fill_grid_some_data(g2);
689  g3.setMemory();
690  fill_grid_some_data(g3);
692  g4.setMemory();
693  fill_grid_some_data(g4);
694 
695  // Create a writer and write
697  vtk_g.add(g1,offset1,spacing1,d1);
698  vtk_g.add(g2,offset2,spacing2,d2);
699  vtk_g.add(g3,offset3,spacing3,d3);
700  vtk_g.add(g4,offset4,spacing4,d4);
701 
703  vtk_g.write("vtk_grids_1d.vtk",prp_names);
704 
705  #ifndef SE_CLASS3
706 
707  // Check that match
708  bool test = compare("vtk_grids_1d.vtk","test_data/vtk_grids_test_1d.vtk");
709  BOOST_REQUIRE_EQUAL(test,true);
710 
711  #endif
712  }
713 
714  {
715 
716  // Create box grids
717  Point<2,float> offset1({0.0,0.0});
718  Point<2,float> spacing1({0.1,0.2});
719  Box<2,size_t> d1({1,2},{14,15});
720 
721  // Create box grids
722  Point<2,float> offset2({5.0,7.0});
723  Point<2,float> spacing2({0.2,0.1});
724  Box<2,size_t> d2({2,1},{13,15});
725 
726  // Create box grids
727  Point<2,float> offset3({0.0,7.0});
728  Point<2,float> spacing3({0.05,0.07});
729  Box<2,size_t> d3({3,2},{11,10});
730 
731  // Create box grids
732  Point<2,float> offset4({5.0,0.0});
733  Point<2,float> spacing4({0.1,0.1});
734  Box<2,size_t> d4({1,1},{7,7});
735 
736  size_t sz[] = {16,16};
738  g1.setMemory();
739  fill_grid_some_data(g1);
741  g2.setMemory();
742  fill_grid_some_data(g2);
744  g3.setMemory();
745  fill_grid_some_data(g3);
747  g4.setMemory();
748  fill_grid_some_data(g4);
749 
750  // Create a writer and write
752  vtk_g.add(g1,offset1,spacing1,d1);
753  vtk_g.add(g2,offset2,spacing2,d2);
754  vtk_g.add(g3,offset3,spacing3,d3);
755  vtk_g.add(g4,offset4,spacing4,d4);
756 
758  vtk_g.write("vtk_grids.vtk",prp_names);
759 
760  #ifndef SE_CLASS3
761 
762  // Check that match
763  bool test = compare("vtk_grids.vtk","test_data/vtk_grids_test.vtk");
764  BOOST_REQUIRE_EQUAL(test,true);
765 
766  #endif
767  }
768 
769  {
770  // Create box grids
771  Point<2,float> offset1({0.0,0.0});
772  Point<2,float> spacing1({0.1,0.1});
773  Box<2,size_t> d1({1,2},{14,15});
774 
775  // Create box grids
776  Point<2,float> offset2({0.0,0.0});
777  Point<2,float> spacing2({0.1,0.1});
778  Box<2,size_t> d2({2,1},{13,15});
779 
780  // Create box grids
781  Point<2,float> offset3({5.0,5.0});
782  Point<2,float> spacing3({0.1,0.1});
783  Box<2,size_t> d3({3,2},{11,10});
784 
785  // Create box grids
786  Point<2,float> offset4({5.0,5.0});
787  Point<2,float> spacing4({0.1,0.1});
788  Box<2,size_t> d4({1,1},{7,7});
789 
790  size_t sz[] = {16,16};
792  g1.setMemory();
793  fill_grid_some_data(g1);
795  g2.setMemory();
796  fill_grid_some_data(g2);
798  g3.setMemory();
799  fill_grid_some_data(g3);
801  g4.setMemory();
802  fill_grid_some_data(g4);
803 
804  comb<2> cmb;
805  cmb.zero();
806 
807  comb<2> cmb2;
808  cmb2.mone();
809 
810  // Create a writer and write
811  VTKWriter<boost::mpl::pair<grid_cpu<2,Point_test<float>>,float>,VECTOR_ST_GRIDS> vtk_g;
812  vtk_g.add(0,g1,offset1,spacing1,d1,cmb);
813  vtk_g.add(0,g2,offset2,spacing2,d2,cmb);
814  vtk_g.add(1,g3,offset3,spacing3,d3,cmb);
815  vtk_g.add(1,g4,offset4,spacing4,d4,cmb2);
816 
817  vtk_g.write("vtk_grids_st.vtk");
818 
819  // Check that match
820  bool test = compare("vtk_grids_st.vtk","test_data/vtk_grids_st_test.vtk");
821  BOOST_REQUIRE_EQUAL(test,true);
822  }
823 
824  {
825  // Create box grids
826  Point<2,float> offset1({0.0,0.0});
827  Point<2,float> spacing1({0.1,0.1});
828  Box<2,size_t> d1({1,2},{14,15});
829 
830  // Create box grids
831  Point<2,float> offset2({0.0,0.0});
832  Point<2,float> spacing2({0.1,0.1});
833  Box<2,size_t> d2({2,1},{13,15});
834 
835  // Create box grids
836  Point<2,float> offset3({5.0,5.0});
837  Point<2,float> spacing3({0.1,0.1});
838  Box<2,size_t> d3({3,2},{11,10});
839 
840  // Create box grids
841  Point<2,float> offset4({5.0,5.0});
842  Point<2,float> spacing4({0.1,0.1});
843  Box<2,size_t> d4({1,1},{7,7});
844 
845  size_t sz[] = {16,16};
847  g1.setMemory();
848  fill_grid_some_data_scal(g1);
850  g2.setMemory();
851  fill_grid_some_data_scal(g2);
853  g3.setMemory();
854  fill_grid_some_data_scal(g3);
856  g4.setMemory();
857  fill_grid_some_data_scal(g4);
858 
859  // Create a writer and write
861  vtk_g.add(g1,offset1,spacing1,d1);
862  vtk_g.add(g2,offset2,spacing2,d2);
863  vtk_g.add(g3,offset3,spacing3,d3);
864  vtk_g.add(g4,offset4,spacing4,d4);
865 
867  vtk_g.write("vtk_grids_prp.vtk",prp_names);
868 
869  // Check that match
870  bool test = compare("vtk_grids_prp.vtk","test_data/vtk_grids_prp_test.vtk");
871  BOOST_REQUIRE_EQUAL(test,true);
872  }
873 
874  {
875  // Create box grids
876  Point<2,float> offset1({0.0,0.0});
877  Point<2,float> spacing1({0.1,0.2});
878  Box<2,size_t> d1({1,2},{14,15});
879 
880  // Create box grids
881  Point<2,float> offset2({5.0,7.0});
882  Point<2,float> spacing2({0.2,0.1});
883  Box<2,size_t> d2({2,1},{13,15});
884 
885  // Create box grids
886  Point<2,float> offset3({0.0,7.0});
887  Point<2,float> spacing3({0.05,0.07});
888  Box<2,size_t> d3({3,2},{11,10});
889 
890  // Create box grids
891  Point<2,float> offset4({5.0,0.0});
892  Point<2,float> spacing4({0.1,0.1});
893  Box<2,size_t> d4({1,1},{7,7});
894 
895  size_t sz[] = {16,16};
897  g1.setMemory();
898  fill_grid_some_data(g1);
900  g2.setMemory();
901  fill_grid_some_data(g2);
903  g3.setMemory();
904  fill_grid_some_data(g3);
906  g4.setMemory();
907  fill_grid_some_data(g4);
908 
909  // Create a writer and write
911  vtk_g.add(g1,offset1,spacing1,d1);
912  vtk_g.add(g2,offset2,spacing2,d2);
913  vtk_g.add(g3,offset3,spacing3,d3);
914  vtk_g.add(g4,offset4,spacing4,d4);
915 
917  vtk_g.write("vtk_grids_unk.vtk",prp_names);
918 
919 #ifndef SE_CLASS3
920 
921  // Check that match
922  bool test = compare("vtk_grids_unk.vtk","test_data/vtk_grids_test.vtk");
923  BOOST_REQUIRE_EQUAL(test,true);
924 
925 #endif
926 
927  }
928 
929  // Try
930 
931  {
932  bool ret = is_vtk_writable<Point<3,float>>::value;
933  BOOST_REQUIRE_EQUAL(ret,true);
934  ret = is_vtk_writable<Point<3,double>>::value;
935  BOOST_REQUIRE_EQUAL(ret,true);
936 
937  int dims = vtk_dims<Point<3,float>>::value;
938  BOOST_REQUIRE_EQUAL(dims,3);
939 
941  BOOST_REQUIRE_EQUAL(dims,1);
942  }
943 
944 }
945 
946 
947 BOOST_AUTO_TEST_CASE( vtk_writer_use_point_set )
948 {
949  Vcluster & v_cl = create_vcluster();
950 
951  if (v_cl.getProcessUnitID() != 0)
952  return;
953 
954  {
955  // Create 3 vectors with random particles
963 
964  // set the seed
965  // create the random generator engine
966  SimpleRNG rng;
967 
968  // fill the vector with random data
969  v1ps.resize(100);
970  v2ps.resize(100);
971  v3ps.resize(100);
972 
973  v1pp.resize(100);
974  v2pp.resize(100);
975  v3pp.resize(100);
976  v4pp.resize(100);
977 
978  for (size_t i = 0 ; i < v1ps.size(); i++)
979  {
980  v1ps.template get<0>(i)[0] = rng.GetUniform();
981  v1ps.template get<0>(i)[1] = rng.GetUniform();
982  v1ps.template get<0>(i)[2] = rng.GetUniform();
983 
984  v2ps.template get<0>(i)[0] = rng.GetUniform()*0.5;
985  v2ps.template get<0>(i)[1] = rng.GetUniform()*0.5;
986  v2ps.template get<0>(i)[2] = rng.GetUniform()*0.5;
987 
988  v3ps.template get<0>(i)[0] = rng.GetUniform()*0.3;
989  v3ps.template get<0>(i)[1] = rng.GetUniform()*0.3;
990  v3ps.template get<0>(i)[2] = rng.GetUniform()*0.3;
991 
992  v1pp.template get<0>(i) = rng.GetUniform();
993  v1pp.template get<1>(i)[0] = rng.GetUniform();
994  v1pp.template get<1>(i)[1] = rng.GetUniform();
995  v1pp.template get<1>(i)[2] = rng.GetUniform();
996 
997  v2pp.template get<0>(i) = rng.GetUniform();
998  v2pp.template get<1>(i)[0] = rng.GetUniform();
999  v2pp.template get<1>(i)[1] = rng.GetUniform();
1000  v2pp.template get<1>(i)[2] = rng.GetUniform();
1001 
1002  v3pp.template get<0>(i) = rng.GetUniform();
1003  v3pp.template get<1>(i)[0] = rng.GetUniform();
1004  v3pp.template get<1>(i)[1] = rng.GetUniform();
1005  v3pp.template get<1>(i)[2] = rng.GetUniform();
1006 
1007  v4pp.template get<0>(i) = rng.GetUniform();
1008  v4pp.template get<1>(i).get(0) = rng.GetUniform();
1009  v4pp.template get<1>(i).get(1) = rng.GetUniform();
1010  v4pp.template get<1>(i).get(2) = rng.GetUniform();
1011  }
1012 
1013  // Create a writer and write
1015  vtk_v.add(v1ps,v1pp,75);
1016  vtk_v.add(v2ps,v2pp,88);
1017  vtk_v.add(v3ps,v3pp,90);
1018 
1019  openfpm::vector<std::string> prp_names;
1020  vtk_v.write("vtk_points.vtk",prp_names);
1021 
1022 #ifndef SE_CLASS3
1023 
1024  bool test = true;
1025 
1026  // Check that match
1027  test = compare("vtk_points.vtk","test_data/vtk_points_test.vtk");
1028  BOOST_REQUIRE_EQUAL(test,true);
1029 
1030 #endif
1031 
1032  // Create a writer and write
1034  vtk_v2.add(v1ps,v4pp,75);
1035 
1036  vtk_v2.write("vtk_points_pp.vtk",prp_names);
1037 
1038 #ifndef SE_CLASS3
1039 
1040  // Check that match
1041  test = compare("vtk_points_pp.vtk","test_data/vtk_points_pp_test.vtk");
1042  BOOST_REQUIRE_EQUAL(test,true);
1043 
1044 #endif
1045 
1046  }
1047 }
1048 
1049 BOOST_AUTO_TEST_CASE( vtk_writer_use_point_set_properties )
1050 {
1051  Vcluster & v_cl = create_vcluster();
1052 
1053  if (v_cl.getProcessUnitID() != 0)
1054  return;
1055 
1056  {
1057  // Create 3 vectors with random particles
1059  openfpm::vector<aggregate<float,float[3]>> v1pp;
1060 
1061  // set the seed
1062  // create the random generator engine
1063  SimpleRNG rng;
1064 
1065  // fill the vector with random data
1066  v1ps.resize(100);
1067  v1pp.resize(100);
1068 
1069  for (size_t i = 0 ; i < v1ps.size(); i++)
1070  {
1071  v1ps.template get<0>(i)[0] = rng.GetUniform();
1072  v1ps.template get<0>(i)[1] = rng.GetUniform();
1073  v1ps.template get<0>(i)[2] = rng.GetUniform();
1074 
1075 
1076  v1pp.template get<0>(i) = rng.GetUniform();
1077  v1pp.template get<1>(i)[0] = rng.GetUniform();
1078  v1pp.template get<1>(i)[1] = rng.GetUniform();
1079  v1pp.template get<1>(i)[2] = rng.GetUniform();
1080  }
1081 
1082  openfpm::vector<std::string> prop_names;
1083 
1084  // Create a writer and write adding names to the properties
1085  VTKWriter<boost::mpl::pair<openfpm::vector<Point<3,double>>,openfpm::vector<aggregate<float,float[3]>>>,VECTOR_POINTS> vtk_v;
1086  vtk_v.add(v1ps,v1pp,75);
1087  openfpm::vector<std::string> prp_names({"scalar","vector"});
1088  vtk_v.write("vtk_points_with_prp_names.vtk",prp_names);
1089 
1090 #ifndef SE_CLASS3
1091 
1092  // Check that match
1093  bool test = compare("vtk_points_with_prp_names.vtk","test_data/vtk_points_with_prp_names_test.vtk");
1094  BOOST_REQUIRE_EQUAL(test,true);
1095 
1096 #endif
1097 
1098  }
1099 }
1100 
1101 BOOST_AUTO_TEST_CASE( vtk_writer_use_point_set_binary )
1102 {
1103  Vcluster & v_cl = create_vcluster();
1104 
1105  if (v_cl.getProcessUnitID() != 0)
1106  return;
1107 
1108  {
1109  // Create 3 vectors with random particles
1113  openfpm::vector<aggregate<float,float[3]>> v1pp;
1114  openfpm::vector<aggregate<float,float[3]>> v2pp;
1115  openfpm::vector<aggregate<float,float[3]>> v3pp;
1116  openfpm::vector<aggregate<float,Point<3,float>>> v4pp;
1117 
1118  // set the seed
1119  // create the random generator engine
1120  SimpleRNG rng;
1121 
1122  // fill the vector with random data
1123  v1ps.resize(100);
1124  v2ps.resize(100);
1125  v3ps.resize(100);
1126 
1127  v1pp.resize(100);
1128  v2pp.resize(100);
1129  v3pp.resize(100);
1130  v4pp.resize(100);
1131 
1132  for (size_t i = 0 ; i < v1ps.size(); i++)
1133  {
1134  v1ps.template get<0>(i)[0] = rng.GetUniform();
1135  v1ps.template get<0>(i)[1] = rng.GetUniform();
1136  v1ps.template get<0>(i)[2] = rng.GetUniform();
1137 
1138  v2ps.template get<0>(i)[0] = rng.GetUniform()*0.5;
1139  v2ps.template get<0>(i)[1] = rng.GetUniform()*0.5;
1140  v2ps.template get<0>(i)[2] = rng.GetUniform()*0.5;
1141 
1142  v3ps.template get<0>(i)[0] = rng.GetUniform()*0.3;
1143  v3ps.template get<0>(i)[1] = rng.GetUniform()*0.3;
1144  v3ps.template get<0>(i)[2] = rng.GetUniform()*0.3;
1145 
1146  v1pp.template get<0>(i) = rng.GetUniform();
1147  v1pp.template get<1>(i)[0] = rng.GetUniform();
1148  v1pp.template get<1>(i)[1] = rng.GetUniform();
1149  v1pp.template get<1>(i)[2] = rng.GetUniform();
1150 
1151  v2pp.template get<0>(i) = rng.GetUniform();
1152  v2pp.template get<1>(i)[0] = rng.GetUniform();
1153  v2pp.template get<1>(i)[1] = rng.GetUniform();
1154  v2pp.template get<1>(i)[2] = rng.GetUniform();
1155 
1156  v3pp.template get<0>(i) = rng.GetUniform();
1157  v3pp.template get<1>(i)[0] = rng.GetUniform();
1158  v3pp.template get<1>(i)[1] = rng.GetUniform();
1159  v3pp.template get<1>(i)[2] = rng.GetUniform();
1160 
1161  v4pp.template get<0>(i) = rng.GetUniform();
1162  v4pp.template get<1>(i).get(0) = rng.GetUniform();
1163  v4pp.template get<1>(i).get(1) = rng.GetUniform();
1164  v4pp.template get<1>(i).get(2) = rng.GetUniform();
1165  }
1166 
1167  // Create a writer and write
1168  VTKWriter<boost::mpl::pair<openfpm::vector<Point<3,double>>,openfpm::vector<aggregate<float,float[3]>>>,VECTOR_POINTS> vtk_v;
1169  vtk_v.add(v1ps,v1pp,75);
1170  vtk_v.add(v2ps,v2pp,88);
1171  vtk_v.add(v3ps,v3pp,90);
1172 
1173  openfpm::vector<std::string> prp_names;
1174  vtk_v.write("vtk_points_bin.vtk",prp_names,"vtk output",file_type::BINARY);
1175  vtk_v.write("vtk_points_bin2.vtk",prp_names,"vtk output",file_type::BINARY);
1176 
1177 #ifndef SE_CLASS3
1178 
1179  bool test = true;
1180 
1181  // Check that match
1182  test = compare("vtk_points_bin.vtk","test_data/vtk_points_bin_test.vtk");
1183  BOOST_REQUIRE_EQUAL(test,true);
1184  test = compare("vtk_points_bin2.vtk","test_data/vtk_points_bin_test.vtk");
1185  BOOST_REQUIRE_EQUAL(test,true);
1186 
1187 #endif
1188 
1189  // Create a writer and write
1190  VTKWriter<boost::mpl::pair<openfpm::vector<Point<3,double>>,openfpm::vector<aggregate<float,Point<3,float>>>>,VECTOR_POINTS> vtk_v2;
1191  vtk_v2.add(v1ps,v4pp,75);
1192 
1193  vtk_v2.write("vtk_points_pp_bin.vtk",prp_names,"vtk output",file_type::BINARY);
1194 
1195 #ifndef SE_CLASS3
1196 
1197  // Check that match
1198  test = compare("vtk_points_pp_bin.vtk","test_data/vtk_points_pp_bin_test.vtk");
1199  BOOST_REQUIRE_EQUAL(test,true);
1200 
1201 #endif
1202 
1203  }
1204 
1205 
1206  {
1207  // Create 3 vectors with random particles
1215 
1216  // set the seed
1217  // create the random generator engine
1218  SimpleRNG rng;
1219 
1220  // fill the vector with random data
1221  v1ps.resize(100);
1222  v2ps.resize(100);
1223  v3ps.resize(100);
1224 
1225  v1pp.resize(100);
1226  v2pp.resize(100);
1227  v3pp.resize(100);
1228  v4pp.resize(100);
1229 
1230  for (size_t i = 0 ; i < v1ps.size(); i++)
1231  {
1232  v1ps.template get<0>(i)[0] = rng.GetUniform();
1233  v1ps.template get<0>(i)[1] = rng.GetUniform();
1234  v1ps.template get<0>(i)[2] = rng.GetUniform();
1235 
1236  v2ps.template get<0>(i)[0] = rng.GetUniform()*0.5;
1237  v2ps.template get<0>(i)[1] = rng.GetUniform()*0.5;
1238  v2ps.template get<0>(i)[2] = rng.GetUniform()*0.5;
1239 
1240  v3ps.template get<0>(i)[0] = rng.GetUniform()*0.3;
1241  v3ps.template get<0>(i)[1] = rng.GetUniform()*0.3;
1242 
1243  v1pp.template get<0>(i) = rng.GetUniform();
1244  v1pp.template get<1>(i)[0][0] = rng.GetUniform();
1245  v1pp.template get<1>(i)[0][1] = rng.GetUniform();
1246  v1pp.template get<1>(i)[0][2] = rng.GetUniform();
1247  v1pp.template get<1>(i)[1][0] = rng.GetUniform();
1248  v1pp.template get<1>(i)[1][1] = rng.GetUniform();
1249  v1pp.template get<1>(i)[1][2] = rng.GetUniform();
1250  v1pp.template get<1>(i)[2][0] = rng.GetUniform();
1251  v1pp.template get<1>(i)[2][1] = rng.GetUniform();
1252  v1pp.template get<1>(i)[2][2] = rng.GetUniform();
1253 
1254  v2pp.template get<0>(i) = rng.GetUniform();
1255  v2pp.template get<1>(i)[0][0] = rng.GetUniform();
1256  v2pp.template get<1>(i)[0][1] = rng.GetUniform();
1257  v2pp.template get<1>(i)[0][2] = rng.GetUniform();
1258  v2pp.template get<1>(i)[1][0] = rng.GetUniform();
1259  v2pp.template get<1>(i)[1][1] = rng.GetUniform();
1260  v2pp.template get<1>(i)[1][2] = rng.GetUniform();
1261  v2pp.template get<1>(i)[2][0] = rng.GetUniform();
1262  v2pp.template get<1>(i)[2][1] = rng.GetUniform();
1263  v2pp.template get<1>(i)[2][2] = rng.GetUniform();
1264 
1265  v3pp.template get<0>(i) = rng.GetUniform();
1266  v3pp.template get<1>(i)[0][0] = rng.GetUniform();
1267  v3pp.template get<1>(i)[0][1] = rng.GetUniform();
1268  v3pp.template get<1>(i)[0][2] = rng.GetUniform();
1269  v3pp.template get<1>(i)[1][0] = rng.GetUniform();
1270  v3pp.template get<1>(i)[1][1] = rng.GetUniform();
1271  v3pp.template get<1>(i)[1][2] = rng.GetUniform();
1272  v3pp.template get<1>(i)[2][0] = rng.GetUniform();
1273  v3pp.template get<1>(i)[2][1] = rng.GetUniform();
1274  v3pp.template get<1>(i)[2][2] = rng.GetUniform();
1275 
1276  v4pp.template get<0>(i)[0] = rng.GetUniform();
1277  v4pp.template get<0>(i)[1] = rng.GetUniform();
1278  v4pp.template get<0>(i)[2] = rng.GetUniform();
1279  v4pp.template get<1>(i)[0] = rng.GetUniform();
1280  v4pp.template get<1>(i)[1] = rng.GetUniform();
1281  }
1282 
1283  // Create a writer and write
1285  vtk_v.add(v1ps,v1pp,75);
1286  vtk_v.add(v2ps,v2pp,88);
1287  vtk_v.add(v3ps,v3pp,90);
1288 
1290 
1291  vtk_v.write("vtk_points_2d_bin.vtk",stub,"vtk output",file_type::BINARY);
1292 
1293 #ifndef SE_CLASS3
1294 
1295  bool test = true;
1296 
1297  // Check that match
1298  test = compare("vtk_points_2d_bin.vtk","test_data/vtk_points_2d_bin_test.vtk");
1299  BOOST_REQUIRE_EQUAL(test,true);
1300 
1301 #endif
1302 
1303  // Create a writer and write
1305  vtk_v2.add(v1ps,v4pp,75);
1306 
1307  vtk_v2.write("vtk_points_2d_pp_bin.vtk",stub,"vtk output",file_type::BINARY);
1308 
1309 #ifndef SE_CLASS3
1310 
1311  // Check that match
1312  test = compare("vtk_points_2d_pp_bin.vtk","test_data/vtk_points_2d_pp_bin_test.vtk");
1313  BOOST_REQUIRE_EQUAL(test,true);
1314 
1315 #endif
1316  }
1317 }
1318 
1319 BOOST_AUTO_TEST_SUITE_END()
1320 
1321 #endif /* VTKWRITER_UNIT_TESTS_HPP_ */
auto get(const grid_dist_key_dx< dim > &v1) const -> typename std::add_lvalue_reference< decltype(loc_grid.get(v1.getSub()).template get< p >(v1.getKey()))>::type
Get the reference of the selected element.
Sub-domain vertex graph node.
void addVertex(const V &vrt)
add vertex
Definition: map_graph.hpp:844
static const unsigned int dims
Number of dimensions.
Position of the element of dimension d in the hyper-cube of dimension dim.
Definition: comb.hpp:34
size_t getProcessUnitID()
Get the process unit id.
static const unsigned int x
computation property id in boost::fusion::vector
float s_type
type of the positional field
type data
The data.
point test with only scalar properties
Definition: Point_test.hpp:560
type data
The data.
size_t size()
Stub size.
Definition: map_vector.hpp:70
This class implement the point shape in an N-dimensional space.
Definition: Point.hpp:22
Implementation of VCluster class.
Definition: VCluster.hpp:36
SimpleRNG is a simple random number generator based on George Marsaglia's MWC (multiply with carry) g...
Definition: SimpleRNG.hpp:18
boost::fusion::vector< float[2], size_t, double > type
The node contain 3 unsigned long integer for communication computation memory and id...
This is a distributed grid.
If it has not dims property defined the object is considered scalar.
vertex3(float x, float y)
Initialize the VTKVertex.
boost::fusion::vector< float[3], size_t, double > type
The node contain 3 unsigned long integer for communication computation memory and id...
void mone()
Set all the elements to -1.
Definition: comb.hpp:95
Structure that store a graph in CSR format or basically in compressed adjacency matrix format...
Definition: map_graph.hpp:83
boost::fusion::vector< float, float, float, float, size_t, double, unsigned char, long int > type
The node contain 3 unsigned long integer for communication computation memory and id...
void zero()
Set all the elements to zero.
Definition: comb.hpp:83
This class represent an N-dimensional box.
Definition: Box.hpp:56
auto addEdge(size_t v1, size_t v2, const E &ed) -> decltype(e.get(0))
add edge on the graph
Definition: map_graph.hpp:884
Test structure used for several test.
Definition: Point_test.hpp:407
float s_type
type of the positional field
static const unsigned int x
computation property id in boost::fusion::vector
vertex2(float x, float y, float z)
Initialize the VTKVertex.
static const unsigned int max_prop
total number of properties boost::fusion::vector
Test structure used for several test.
Definition: Point_test.hpp:105
Implementation of 1-D std::vector like structure.
Definition: map_vector.hpp:61
static const unsigned int max_prop
total number of properties boost::fusion::vector
vertex(float x, float y, float z)
Initialize the VTKVertex.
type data
The data.
check for T to be writable
float s_type
type of the positional field