Rheolef  7.2
an efficient C++ finite element environment
geo_seq_put_vtk.cc
Go to the documentation of this file.
1 //
22 // vtk visualization
23 //
24 // author: Pierre.Saramito@imag.fr
25 //
26 // date: 12 may 1997
27 // update: 23 oct 2011
28 // update: 23 jan 2020 : high order vtk Lagrange elements
29 //
30 #include "rheolef/geo.h"
31 #include "rheolef/space_numbering.h"
32 #include "rheolef/piola_util.h"
33 #include "rheolef/rheostream.h"
34 #include "rheolef/iorheo.h"
35 
36 #include "vtk_cell_type.h"
37 #include "geo_seq_put_vtk.h"
38 
39 namespace rheolef {
40 using namespace std;
41 
42 // =========================================================================
43 // low order vtk meshes : for low order rheolef meshes
44 // or for old vtk/paraview version < 5.5
45 // =========================================================================
46 // ----------------------------------------------------------------------------
47 // one element puts
48 // ----------------------------------------------------------------------------
49 template <class T>
50 static
51 void
52 put_edge (ostream& vtk, const geo_element& K, const basis_basic<T>& my_numb, const geo_basic<T,sequential>& omega)
53 {
55  typedef point_basic<size_type> ilat;
56  std::vector<size_type> inod;
57  space_numbering::dis_idof (my_numb, omega.sizes(), K, inod);
58  size_type my_order = my_numb.degree();
59  for (size_type i = 0; i < my_order; i++) {
60  size_type loc_inod0 = reference_element_e::ilat2loc_inod (my_order, ilat(i));
61  size_type loc_inod1 = reference_element_e::ilat2loc_inod (my_order, ilat(i+1));
62  vtk << "2\t" << inod[loc_inod0] << " " << inod[loc_inod1] << endl;
63  }
64 }
65 template <class T>
66 static
67 void
68 put_triangle (ostream& vtk, const geo_element& K, const basis_basic<T>& my_numb, const geo_basic<T,sequential>& omega)
69 {
71  typedef point_basic<size_type> ilat;
72  std::vector<size_type> inod;
73  space_numbering::dis_idof (my_numb, omega.sizes(), K, inod);
74  size_type my_order = my_numb.degree();
75  for (size_type i = 0; i < my_order; i++) {
76  for (size_type j = 0; i+j < my_order; j++) {
77  size_type loc_inod00 = reference_element_t::ilat2loc_inod (my_order, ilat(i, j));
78  size_type loc_inod10 = reference_element_t::ilat2loc_inod (my_order, ilat(i+1, j));
79  size_type loc_inod01 = reference_element_t::ilat2loc_inod (my_order, ilat(i, j+1));
80  vtk << "3\t" << inod[loc_inod00] << " "
81  << inod[loc_inod10] << " "
82  << inod[loc_inod01] << endl;
83  if (i+j+1 >= my_order) continue;
84  size_type loc_inod11 = reference_element_t::ilat2loc_inod (my_order, ilat(i+1, j+1));
85  vtk << "3\t" << inod[loc_inod10] << " "
86  << inod[loc_inod11] << " "
87  << inod[loc_inod01] << endl;
88  }
89  }
90 }
91 template <class T>
92 static
93 void
94 put_quadrangle (ostream& vtk, const geo_element& K, const basis_basic<T>& my_numb, const geo_basic<T,sequential>& omega)
95 {
97  typedef point_basic<size_type> ilat;
98  std::vector<size_type> inod;
99  space_numbering::dis_idof (my_numb, omega.sizes(), K, inod);
100  size_type my_order = my_numb.degree();
101  for (size_type i = 0; i < my_order; i++) {
102  for (size_type j = 0; j < my_order; j++) {
103  size_type loc_inod00 = reference_element_q::ilat2loc_inod (my_order, ilat(i, j));
104  size_type loc_inod10 = reference_element_q::ilat2loc_inod (my_order, ilat(i+1, j));
105  size_type loc_inod11 = reference_element_q::ilat2loc_inod (my_order, ilat(i+1, j+1));
106  size_type loc_inod01 = reference_element_q::ilat2loc_inod (my_order, ilat(i, j+1));
107  vtk << "4\t" << inod[loc_inod00] << " "
108  << inod[loc_inod10] << " "
109  << inod[loc_inod11] << " "
110  << inod[loc_inod01] << endl;
111  }
112  }
113 }
114 template <class T>
115 static
116 void
117 put_tetrahedron (ostream& vtk, const geo_element& K, const basis_basic<T>& my_numb, const geo_basic<T,sequential>& omega)
118 {
120  typedef point_basic<size_type> ilat;
121  std::vector<size_type> inod;
122  space_numbering::dis_idof (my_numb, omega.sizes(), K, inod);
123  size_type my_order = my_numb.degree();
124  for (size_type i = 0; i < my_order; i++) {
125  for (size_type j = 0; i+j < my_order; j++) {
126  for (size_type k = 0; i+j+k < my_order; k++) {
127  size_type loc_inod000 = reference_element_T::ilat2loc_inod (my_order, ilat(i, j, k));
128  size_type loc_inod100 = reference_element_T::ilat2loc_inod (my_order, ilat(i+1, j, k));
129  size_type loc_inod010 = reference_element_T::ilat2loc_inod (my_order, ilat(i, j+1, k));
130  size_type loc_inod001 = reference_element_T::ilat2loc_inod (my_order, ilat(i, j, k+1));
131  vtk << "4\t" << inod[loc_inod000] << " "
132  << inod[loc_inod100] << " "
133  << inod[loc_inod010] << " "
134  << inod[loc_inod001] << endl;
135  if (i+j+k+2 > my_order) continue;
136  // complete the ijk-th cube: 4 more tetras
137  size_type loc_inod110 = reference_element_T::ilat2loc_inod (my_order, ilat(i+1, j+1, k));
138  size_type loc_inod101 = reference_element_T::ilat2loc_inod (my_order, ilat(i+1, j, k+1));
139  size_type loc_inod011 = reference_element_T::ilat2loc_inod (my_order, ilat(i, j+1, k+1));
140  vtk << "4\t" << inod[loc_inod100] << " " // face in x0 & x2 direction
141  << inod[loc_inod101] << " "
142  << inod[loc_inod010] << " "
143  << inod[loc_inod001] << endl
144  << "4\t" << inod[loc_inod010] << " " // face in x1 & x2 direction
145  << inod[loc_inod011] << " "
146  << inod[loc_inod001] << " "
147  << inod[loc_inod101] << endl
148  << "4\t" << inod[loc_inod100] << " "
149  << inod[loc_inod101] << " "
150  << inod[loc_inod110] << " "
151  << inod[loc_inod010] << endl
152  << "4\t" << inod[loc_inod010] << " "
153  << inod[loc_inod110] << " "
154  << inod[loc_inod011] << " "
155  << inod[loc_inod101] << endl;
156  // the last 6th sub-tetra that fully fills the ijk-th cube
157  if (i+j+k+3 > my_order) continue;
158  size_type loc_inod111 = reference_element_T::ilat2loc_inod (my_order, ilat(i+1, j+1, k+1));
159  vtk << "4\t" << inod[loc_inod111] << " " // face in x0 & x2 direction
160  << inod[loc_inod101] << " "
161  << inod[loc_inod011] << " "
162  << inod[loc_inod110] << endl;
163  }
164  }
165  }
166 }
167 static
168 void
169 raw_put_prism (ostream& vtk,
170  size_t i000, size_t i100, size_t i010,
171  size_t i001, size_t i101, size_t i011)
172 {
173  // vtk prism has swaped x & y axis order: 00z 10z 01z replaced by 00z 01z 10z
174  vtk << "6\t" << i000 << " "
175  << i010 << " "
176  << i100 << " "
177  << i001 << " "
178  << i011 << " "
179  << i101 << endl;
180 }
181 template <class T>
182 static
183 void
184 put_prism (ostream& vtk, const geo_element& K, const basis_basic<T>& my_numb, const geo_basic<T,sequential>& omega, const disarray<point_basic<Float>,sequential>& my_node)
185 {
187  typedef point_basic<size_type> ilat;
188  std::vector<size_type> inod;
189  space_numbering::dis_idof (my_numb, omega.sizes(), K, inod);
190  size_type my_order = my_numb.degree();
191  for (size_type k = 0; k < my_order; k++) {
192  for (size_type j = 0; j < my_order; j++) {
193  for (size_type i = 0; i+j < my_order; i++) {
194  size_type loc_inod000 = reference_element_P::ilat2loc_inod (my_order, ilat(i, j, k));
195  size_type loc_inod100 = reference_element_P::ilat2loc_inod (my_order, ilat(i+1, j, k));
196  size_type loc_inod010 = reference_element_P::ilat2loc_inod (my_order, ilat(i, j+1, k));
197  size_type loc_inod001 = reference_element_P::ilat2loc_inod (my_order, ilat(i, j, k+1));
198  size_type loc_inod101 = reference_element_P::ilat2loc_inod (my_order, ilat(i+1, j, k+1));
199  size_type loc_inod011 = reference_element_P::ilat2loc_inod (my_order, ilat(i, j+1, k+1));
200  raw_put_prism (vtk,
201  inod[loc_inod000],
202  inod[loc_inod100],
203  inod[loc_inod010],
204  inod[loc_inod001],
205  inod[loc_inod101],
206  inod[loc_inod011]);
207  if (i+j+1 >= my_order) continue;
208  size_type loc_inod110 = reference_element_P::ilat2loc_inod (my_order, ilat(i+1, j+1, k));
209  size_type loc_inod111 = reference_element_P::ilat2loc_inod (my_order, ilat(i+1, j+1, k+1));
210  raw_put_prism (vtk,
211  inod[loc_inod100],
212  inod[loc_inod110],
213  inod[loc_inod010],
214  inod[loc_inod101],
215  inod[loc_inod111],
216  inod[loc_inod011]);
217  }
218  }
219  }
220 }
221 template <class T>
222 static
223 void
224 put_hexahedron (ostream& vtk, const geo_element& K, const basis_basic<T>& my_numb, const geo_basic<T,sequential>& omega)
225 {
227  typedef point_basic<size_type> ilat;
228  std::vector<size_type> inod;
229  space_numbering::dis_idof (my_numb, omega.sizes(), K, inod);
230  size_type my_order = my_numb.degree();
231  for (size_type i = 0; i < my_order; i++) {
232  for (size_type j = 0; j < my_order; j++) {
233  for (size_type k = 0; k < my_order; k++) {
234  size_type loc_inod000 = reference_element_H::ilat2loc_inod (my_order, ilat(i, j, k));
235  size_type loc_inod100 = reference_element_H::ilat2loc_inod (my_order, ilat(i+1, j, k));
236  size_type loc_inod110 = reference_element_H::ilat2loc_inod (my_order, ilat(i+1, j+1, k));
237  size_type loc_inod010 = reference_element_H::ilat2loc_inod (my_order, ilat(i, j+1, k));
238  size_type loc_inod001 = reference_element_H::ilat2loc_inod (my_order, ilat(i, j, k+1));
239  size_type loc_inod101 = reference_element_H::ilat2loc_inod (my_order, ilat(i+1, j, k+1));
240  size_type loc_inod011 = reference_element_H::ilat2loc_inod (my_order, ilat(i, j+1, k+1));
241  size_type loc_inod111 = reference_element_H::ilat2loc_inod (my_order, ilat(i+1, j+1, k+1));
242  vtk << "8\t" << inod[loc_inod000] << " "
243  << inod[loc_inod100] << " "
244  << inod[loc_inod110] << " "
245  << inod[loc_inod010] << " "
246  << inod[loc_inod001] << " "
247  << inod[loc_inod101] << " "
248  << inod[loc_inod111] << " "
249  << inod[loc_inod011] << endl;
250  }
251  }
252  }
253 }
254 template <class T>
255 static
256 void
257 put (ostream& vtk, const geo_element& K, const basis_basic<T>& my_numb, const geo_basic<T,sequential>& omega, const disarray<point_basic<Float>,sequential>& my_node)
258 {
259  switch (K.variant()) {
260  case reference_element::p: vtk << "1\t" << K[0] << endl; break;
261  case reference_element::e: put_edge (vtk, K, my_numb, omega); break;
262  case reference_element::t: put_triangle (vtk, K, my_numb, omega); break;
263  case reference_element::q: put_quadrangle (vtk, K, my_numb, omega); break;
264  case reference_element::T: put_tetrahedron (vtk, K, my_numb, omega); break;
265  case reference_element::P: put_prism (vtk, K, my_numb, omega, my_node); break;
266  case reference_element::H: put_hexahedron (vtk, K, my_numb, omega); break;
267  default: error_macro ("unsupported element variant `" << K.name() <<"'");
268  }
269 }
270 // ----------------------------------------------------------------------------
271 // geo puts
272 // ----------------------------------------------------------------------------
273 template <class T>
274 odiststream&
276  odiststream& ops,
277  const geo_basic<T,sequential>& omega,
278  const basis_basic<T>& my_numb,
279  const disarray<point_basic<T>,sequential>& my_node,
280  bool append_data)
281 {
282  trace_macro("geo_put_vtk_old: my_numb="<<my_numb.name());
283  //
284  // 0) pre-requises
285  //
287  size_type my_order = my_numb.degree();
288  ostream& vtk = ops.os();
289  check_macro (my_order >= omega.order(), "order="<<omega.order()<<" > field degree="<<my_order);
290  //
291  // 1) put header
292  //
293  vtk << setprecision(numeric_limits<T>::digits10)
294  << "# vtk DataFile Version 1.0" << endl
295  << "Unstructured Grid" << endl
296  << "ASCII" << endl
297  << "DATASET UNSTRUCTURED_GRID" << endl;
298  //
299  // 2) put nodes
300  //
301  vtk << "POINTS " << my_node.size() << " float" << endl;
302  for (size_type inod = 0, nnod = my_node.size(); inod < nnod; inod++) {
303  vtk << my_node[inod] << endl;
304  }
305  //
306  // 3) count cell data
307  //
308  size_type map_dim = omega.map_dimension();
309  // count pass, since omega.sizes is not yet valid when omega is a geo_domain_indirect...
310  std::array<size_type,reference_element::max_variant> size_by_variant;
311  size_by_variant.fill (0);
312  for (size_type ie = 0, ne = omega.size(); ie < ne; ie++) {
313  const geo_element& K = omega.get_geo_element (map_dim, ie);
314  size_by_variant [K.variant()]++;
315  }
316  size_type ncell = 0;
317  size_type ndata = 0;
318  std::array<size_type,reference_element::max_variant> loc_ncell;
319  std::array<size_type,reference_element::max_variant> loc_ndata;
324  loc_ncell [variant] = pow(my_order,d);
325  loc_ndata [variant] = (n+1)*loc_ncell [variant];
326  ncell += loc_ncell[variant]*size_by_variant [variant];
327  ndata += loc_ndata[variant]*size_by_variant [variant];
328  }
329  //
330  // 4) put cells
331  //
332  string opt_d = my_numb.is_discontinuous() ? "d" : "";
333  string cell_numb_name = "P"+std::to_string(my_numb.degree())+opt_d;
334  basis_basic<T> cell_numb (cell_numb_name); // my_numb could be vector-valued
335  vtk << "CELLS " << ncell << " " << ndata << endl;
336  for (size_type ie = 0, ne = omega.size(); ie < ne; ie++) {
337  const geo_element& K = omega.get_geo_element (map_dim, ie);
338  put (vtk, K, cell_numb, omega, my_node);
339  }
340  //
341  // 4) put cell types
342  //
343  std::array<size_type,reference_element::max_variant> cell_type;
344  cell_type [reference_element::p] = VTK_VERTEX;
345  cell_type [reference_element::e] = VTK_LINE;
346  cell_type [reference_element::t] = VTK_TRIANGLE;
347  cell_type [reference_element::q] = VTK_QUAD;
348  cell_type [reference_element::T] = VTK_TETRA;
349  cell_type [reference_element::P] = VTK_WEDGE;
350  cell_type [reference_element::H] = VTK_HEXAHEDRON;
351  vtk << "CELL_TYPES " << ncell << endl;
352  for (size_type ie = 0, ne = omega.size(); ie < ne; ie++) {
353  const geo_element& K = omega.get_geo_element (map_dim, ie);
354  for (size_type k = 0; k < loc_ncell[K.variant()]; k++) {
355  vtk << cell_type [K.variant()] << endl;
356  }
357  }
358  // 5) output some values for vtkDataSet to be happy...
359  if (! append_data) return ops;
360  std::string data_name = "mesh";
361  vtk << "POINT_DATA " << my_node.size() << endl
362  << "SCALARS " << data_name << " float" << endl
363  << "LOOKUP_TABLE default" << endl;
364  for (size_type inod = 0, nnod = my_node.size(); inod < nnod; inod++) {
365  vtk << "0" << endl;
366  }
367  vtk << endl;
368 
369  return ops;
370 }
371 // =========================================================================
372 // high order vtk meshes : for high order rheolef meshes
373 // and for recent vtk/paraview version >= 5.5
374 // =========================================================================
375 // there are very few documentation about the local numbering of nodes
376 // for the vtk high order Lagrange elements : see e.g.
377 // https://blog.kitware.com/modeling-arbitrary-order-lagrange-finite-elements-in-the-visualization-toolkit
378 //
379 // apparent my_order can differ from the official omega.order one:
380 // useful for P1 geo with P3 field: draw on the P3 lattice
381 template <class T>
382 static
383 void
384 put_high_nicely_ordered (
385  ostream& vtk,
386  const basis_basic<T>& my_numb,
387  const geo_basic<T,sequential>& omega,
388  const geo_element& K)
389 {
390  typedef typename geo_element::size_type size_type;
391  std::vector<size_type> inod;
392  space_numbering::dis_idof (my_numb, omega.sizes(), K, inod);
393  vtk << inod.size();
394  for (size_type loc_inod = 0, loc_nnod = inod.size(); loc_inod < loc_nnod; loc_inod++) {
395  vtk << " " << inod[loc_inod];
396  }
397  vtk << endl;
398 }
399 template <class T>
400 static
401 void
402 put_high (
403  ostream& vtk,
404  const basis_basic<T>& my_numb,
405  const geo_basic<T,sequential>& omega,
406  const geo_element& K)
407 {
408  switch (K.variant()) {
409  case reference_element::p: vtk << "1\t" << K[0] << endl; break;
411  case reference_element::t:
415  case reference_element::H: put_high_nicely_ordered (vtk, my_numb, omega, K); break;
416  default: error_macro ("unsupported element variant `" << K.name() <<"'");
417  }
418 }
419 template <class T>
420 odiststream&
422  odiststream& ops,
423  const geo_basic<T,sequential>& omega,
424  const basis_basic<T>& my_numb,
425  const disarray<point_basic<T>,sequential>& my_node,
426  bool append_data = true,
427  size_t subgeo_dim = std::numeric_limits<size_t>::max())
428 {
429  trace_macro("geo_put_vtk_high: my_numb="<<my_numb.name());
430  //
431  // 0) pre-requises
432  //
434  size_type my_order = my_numb.degree();
435  if (subgeo_dim == std::numeric_limits<size_type>::max()) {
436  subgeo_dim = omega.map_dimension();
437  }
438  ostream& vtk = ops.os();
439  //
440  // 1) put header
441  //
442  vtk << setprecision(numeric_limits<T>::digits10)
443  << "# vtk DataFile Version 1.0" << endl
444  << "Unstructured Grid" << endl
445  << "ASCII" << endl
446  << "DATASET UNSTRUCTURED_GRID" << endl;
447  //
448  // 2) put nodes
449  //
450  vtk << "POINTS " << my_node.size() << " float" << endl;
451  for (size_type inod = 0, nnod = my_node.size(); inod < nnod; inod++) {
452  vtk << my_node[inod] << endl;
453  }
454  //
455  // 3) count cell data
456  //
457  // count pass, since omega.sizes is not yet valid when omega is a geo_domain_indirect...
458  std::array<size_type,reference_element::max_variant> size_by_variant;
459  size_by_variant.fill (0);
460  for (size_type ie = 0, ne = omega.size(subgeo_dim); ie < ne; ie++) {
461  const geo_element& K = omega.get_geo_element (subgeo_dim, ie);
462  size_by_variant [K.variant()]++;
463  }
464  size_type ncell = 0;
465  size_type ndata = 0;
466  std::array<size_type,reference_element::max_variant> loc_ndata;
471  loc_ndata [variant] = n+1;
472  ncell += size_by_variant [variant];
473  ndata += loc_ndata[variant]*size_by_variant [variant];
474  }
475  //
476  // 4) put cells
477  //
478  string opt_d = my_numb.is_discontinuous() ? "d" : "";
479  string cell_numb_name = "P"+std::to_string(my_numb.degree())+opt_d;
480  basis_basic<T> cell_numb (cell_numb_name); // my_numb could be vector-valued
481  vtk << "CELLS " << ncell << " " << ndata << endl;
482  for (size_type ie = 0, ne = omega.size(subgeo_dim); ie < ne; ie++) {
483  const geo_element& K = omega.get_geo_element (subgeo_dim, ie);
484  put_high (vtk, cell_numb, omega, K);
485  }
486  //
487  // 4) put cell types
488  // TODO: move switch to vtk_cell_type.cc as
489  // cell_type = variant2vtk_cell_type (variant, order);
490  //
491  std::array<size_type,reference_element::max_variant> cell_type_one;
492  cell_type_one [reference_element::p] = VTK_VERTEX;
493  cell_type_one [reference_element::e] = VTK_LINE;
494  cell_type_one [reference_element::t] = VTK_TRIANGLE;
495  cell_type_one [reference_element::q] = VTK_QUAD;
496  cell_type_one [reference_element::T] = VTK_TETRA;
497  cell_type_one [reference_element::P] = VTK_WEDGE;
498  cell_type_one [reference_element::H] = VTK_HEXAHEDRON;
499  std::array<size_type,reference_element::max_variant> cell_type_two;
500  cell_type_two [reference_element::p] = VTK_VERTEX;
501  cell_type_two [reference_element::e] = VTK_QUADRATIC_EDGE;
503  cell_type_two [reference_element::q] = VTK_BIQUADRATIC_QUAD;
504  cell_type_two [reference_element::T] = VTK_QUADRATIC_TETRA;
507  std::array<size_type,reference_element::max_variant> cell_type_high;
508  cell_type_high [reference_element::p] = VTK_VERTEX;
509  cell_type_high [reference_element::e] = VTK_LAGRANGE_CURVE;
510  cell_type_high [reference_element::t] = VTK_LAGRANGE_TRIANGLE;
513  cell_type_high [reference_element::P] = VTK_LAGRANGE_WEDGE;
515  vtk << "CELL_TYPES " << ncell << endl;
516  for (size_type ie = 0, ne = omega.size(subgeo_dim); ie < ne; ie++) {
517  const geo_element& K = omega.get_geo_element (subgeo_dim, ie);
518  switch (K.variant()) {
519  case reference_element::e: {
520  switch (my_order) {
521  case 1: vtk << VTK_LINE << endl; break;
522  case 2: vtk << VTK_QUADRATIC_EDGE << endl; break;
523  case 3: vtk << VTK_CUBIC_LINE << endl; break;
524  // BUG_PARAVIEW_HIGH: https://discourse.paraview.org/t/possible-bug-with-1d-high-order-lagrange-element/3396/2
525  default: vtk << VTK_LAGRANGE_CURVE << endl; break;
526  }
527  break;
528  }
529  default: {
530  switch (my_order) {
531  case 1: vtk << cell_type_one [K.variant()] << endl; break;
532  case 2: vtk << cell_type_two [K.variant()] << endl; break;
533  default: vtk << cell_type_high [K.variant()] << endl; break;
534  }
535  break;
536  }
537  }
538  }
539  // 5) output some values for vtkDataSet to be happy...
540  if (! append_data) return ops;
541  std::string data_name = "mesh";
542  vtk << "POINT_DATA " << my_node.size() << endl
543  << "SCALARS " << data_name << " float" << endl
544  << "LOOKUP_TABLE default" << endl;
545  for (size_type inod = 0, nnod = my_node.size(); inod < nnod; inod++) {
546  vtk << "0" << endl;
547  }
548  vtk << endl;
549 
550  return ops;
551 }
552 // =========================================================================
553 // main call
554 // =========================================================================
555 template <class T>
556 odiststream&
558  odiststream& ops,
559  const geo_basic<T,sequential>& omega,
560  const basis_basic<T>& my_numb,
561  const disarray<point_basic<T>,sequential>& my_node,
562  bool append_data,
563  size_t subgeo_dim)
564 {
565 #if (_RHEOLEF_PARAVIEW_VERSION_MAJOR >= 5) && (_RHEOLEF_PARAVIEW_VERSION_MINOR >= 5)
566  // paraview version >= 5.5 has high order elements
567  return geo_put_vtk_high (ops, omega, my_numb, my_node, append_data, subgeo_dim);
568 #else
569  return geo_put_vtk_old (ops, omega, my_numb, my_node, append_data);
570 #endif
571 }
572 // ----------------------------------------------------------------------------
573 // instanciation in library
574 // ----------------------------------------------------------------------------
575 #define _RHEOLEF_instanciation(T) \
576 template odiststream& geo_put_vtk ( \
577  odiststream& ops, \
578  const geo_basic<T,sequential>& omega, \
579  const basis_basic<T>& my_numb, \
580  const disarray<point_basic<T>,sequential>& my_node, \
581  bool append_data, \
582  size_t subgeo_dim);
583 
585 
586 }// namespace rheolef
field::size_type size_type
Definition: branch.cc:430
see the Float page for the full documentation
std::string name() const
Definition: basis.h:721
bool is_discontinuous() const
Definition: basis.h:763
size_type degree() const
Definition: basis.h:728
see the disarray page for the full documentation
Definition: disarray.h:497
size_type size(size_type dim) const
Definition: geo.h:1209
size_type map_dimension() const
Definition: geo.h:1149
const_reference get_geo_element(size_type dim, size_type ige) const
Definition: geo.h:1164
size_type order() const
Definition: geo.h:1156
generic mesh with rerefence counting
Definition: geo.h:1089
see the geo_element page for the full documentation
Definition: geo_element.h:102
reference_element::size_type size_type
Definition: geo_element.h:125
variant_type variant() const
Definition: geo_element.h:161
odiststream: see the diststream page for the full documentation
Definition: diststream.h:137
std::ostream & os()
Definition: diststream.h:247
static size_type ilat2loc_inod(size_type order, const point_basic< size_type > &ilat)
static size_type ilat2loc_inod(size_type order, const point_basic< size_type > &ilat)
static size_type ilat2loc_inod(size_type order, const point_basic< size_type > &ilat)
static size_type ilat2loc_inod(size_type order, const point_basic< size_type > &ilat)
static size_type ilat2loc_inod(size_type order, const point_basic< size_type > &ilat)
static size_type ilat2loc_inod(size_type order, const point_basic< size_type > &ilat)
static const variant_type H
static const variant_type q
static const variant_type e
static variant_type last_variant_by_dimension(size_type dim)
static variant_type first_variant_by_dimension(size_type dim)
static const variant_type p
static size_type n_node(variant_type variant, size_type order)
static const variant_type T
static const variant_type P
static const variant_type t
size_t size_type
Definition: basis_get.cc:76
#define trace_macro(message)
Definition: dis_macros.h:111
#define error_macro(message)
Definition: dis_macros.h:49
verbose clean transpose logscale grid shrink ball stereo iso volume skipvtk deformation fastfieldload lattice reader_on_stdin color format format format format format format format format format format format format format format format format vtk
void dis_idof(const basis_basic< T > &b, const geo_size &gs, const geo_element &K, typename std::vector< size_type >::iterator dis_idof_tab)
size_type nnod(const basis_basic< T > &b, const geo_size &gs, size_type map_dim)
This file is part of Rheolef.
void put(std::ostream &out, std::string name, const tiny_matrix< T > &a)
Definition: tiny_lu.h:155
odiststream & geo_put_vtk(odiststream &ops, const geo_basic< T, sequential > &omega, const basis_basic< T > &my_numb, const disarray< point_basic< T >, sequential > &my_node, bool append_data, size_t subgeo_dim)
odiststream & geo_put_vtk_high(odiststream &ops, const geo_basic< T, sequential > &omega, const basis_basic< T > &my_numb, const disarray< point_basic< T >, sequential > &my_node, bool append_data=true, size_t subgeo_dim=std::numeric_limits< size_t >::max())
space_mult_list< T, M > pow(const space_basic< T, M > &X, size_t n)
Definition: space_mult.h:120
_RHEOLEF_instanciation(Float, sequential, std::allocator< Float >) _RHEOLEF_instanciation(Float
odiststream & geo_put_vtk_old(odiststream &ops, const geo_basic< T, sequential > &omega, const basis_basic< T > &my_numb, const disarray< point_basic< T >, sequential > &my_node, bool append_data)
#define VTK_BIQUADRATIC_QUADRATIC_WEDGE
Definition: vtk_cell_type.h:63
#define VTK_HEXAHEDRON
Definition: vtk_cell_type.h:46
#define VTK_CUBIC_LINE
Definition: vtk_cell_type.h:68
#define VTK_LAGRANGE_QUADRILATERAL
Definition: vtk_cell_type.h:77
#define VTK_LINE
Definition: vtk_cell_type.h:37
#define VTK_QUADRATIC_EDGE
Definition: vtk_cell_type.h:51
#define VTK_LAGRANGE_TETRAHEDRON
Definition: vtk_cell_type.h:78
#define VTK_QUADRATIC_TRIANGLE
Definition: vtk_cell_type.h:52
#define VTK_LAGRANGE_WEDGE
Definition: vtk_cell_type.h:80
#define VTK_QUAD
Definition: vtk_cell_type.h:43
#define VTK_VERTEX
Definition: vtk_cell_type.h:35
#define VTK_TRIANGLE
Definition: vtk_cell_type.h:39
#define VTK_LAGRANGE_CURVE
Definition: vtk_cell_type.h:75
#define VTK_QUADRATIC_TETRA
Definition: vtk_cell_type.h:55
#define VTK_WEDGE
Definition: vtk_cell_type.h:47
#define VTK_LAGRANGE_TRIANGLE
Definition: vtk_cell_type.h:76
#define VTK_LAGRANGE_HEXAHEDRON
Definition: vtk_cell_type.h:79
#define VTK_TRIQUADRATIC_HEXAHEDRON
Definition: vtk_cell_type.h:60
#define VTK_TETRA
Definition: vtk_cell_type.h:44
#define VTK_BIQUADRATIC_QUAD
Definition: vtk_cell_type.h:59