Rheolef  7.2
an efficient C++ finite element environment
 
Loading...
Searching...
No Matches
geo_seq_put_vtk.cc
Go to the documentation of this file.
1
21//
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
39namespace rheolef {
40using 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// ----------------------------------------------------------------------------
49template <class T>
50static
51void
52put_edge (ostream& vtk, const geo_element& K, const basis_basic<T>& my_numb, const geo_basic<T,sequential>& omega)
53{
54 typedef typename geo_basic<T,sequential>::size_type size_type;
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}
65template <class T>
66static
67void
68put_triangle (ostream& vtk, const geo_element& K, const basis_basic<T>& my_numb, const geo_basic<T,sequential>& omega)
69{
70 typedef typename geo_basic<T,sequential>::size_type size_type;
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}
91template <class T>
92static
93void
94put_quadrangle (ostream& vtk, const geo_element& K, const basis_basic<T>& my_numb, const geo_basic<T,sequential>& omega)
95{
96 typedef typename geo_basic<T,sequential>::size_type size_type;
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}
114template <class T>
115static
116void
117put_tetrahedron (ostream& vtk, const geo_element& K, const basis_basic<T>& my_numb, const geo_basic<T,sequential>& omega)
118{
119 typedef typename geo_basic<T,sequential>::size_type size_type;
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}
167static
168void
169raw_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}
181template <class T>
182static
183void
184put_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{
186 typedef typename geo_basic<T,sequential>::size_type size_type;
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}
221template <class T>
222static
223void
224put_hexahedron (ostream& vtk, const geo_element& K, const basis_basic<T>& my_numb, const geo_basic<T,sequential>& omega)
225{
226 typedef typename geo_basic<T,sequential>::size_type size_type;
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}
254template <class T>
255static
256void
257put (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// ----------------------------------------------------------------------------
273template <class T>
274odiststream&
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;
321 variant < reference_element:: last_variant_by_dimension(map_dim); variant++) {
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;
347 cell_type [reference_element::q] = VTK_QUAD;
348 cell_type [reference_element::T] = VTK_TETRA;
349 cell_type [reference_element::P] = VTK_WEDGE;
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
381template <class T>
382static
383void
384put_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}
399template <class T>
400static
401void
402put_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;
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}
419template <class T>
420odiststream&
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;
468 variant < reference_element:: last_variant_by_dimension(subgeo_dim); variant++) {
470 size_type n = reference_element::n_node (variant, my_order);
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;
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;
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()) {
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// =========================================================================
555template <class T>
556odiststream&
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) \
576template 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
#define _RHEOLEF_instanciation(T, M, A)
Definition asr.cc:223
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
generic mesh with rerefence counting
Definition geo.h:1089
see the geo_element page for the full documentation
reference_element::size_type size_type
variant_type variant() const
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
#define trace_macro(message)
Definition dis_macros.h:111
#define error_macro(message)
Definition dis_macros.h:49
check_macro(expr1.have_homogeneous_space(Xh1), "dual(expr1,expr2); expr1 should have homogeneous space. HINT: use dual(interpolate(Xh, expr1),expr2)")
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)
This file is part of Rheolef.
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())
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)
space_mult_list< T, M > pow(const space_basic< T, M > &X, size_t n)
Definition space_mult.h:120
void put(std::ostream &out, std::string name, const tiny_matrix< T > &a)
Definition tiny_lu.h:155
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)
STL namespace.
#define VTK_BIQUADRATIC_QUADRATIC_WEDGE
#define VTK_HEXAHEDRON
#define VTK_CUBIC_LINE
#define VTK_LAGRANGE_QUADRILATERAL
#define VTK_LINE
#define VTK_QUADRATIC_EDGE
#define VTK_LAGRANGE_TETRAHEDRON
#define VTK_QUADRATIC_TRIANGLE
#define VTK_LAGRANGE_WEDGE
#define VTK_QUAD
#define VTK_VERTEX
#define VTK_TRIANGLE
#define VTK_LAGRANGE_CURVE
#define VTK_QUADRATIC_TETRA
#define VTK_WEDGE
#define VTK_LAGRANGE_TRIANGLE
#define VTK_LAGRANGE_HEXAHEDRON
#define VTK_TRIQUADRATIC_HEXAHEDRON
#define VTK_TETRA
#define VTK_BIQUADRATIC_QUAD