foamVtuSizing.C
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration |
5  \\ / A nd | www.openfoam.com
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8  Copyright (C) 2016-2018 OpenCFD Ltd.
9 -------------------------------------------------------------------------------
10 License
11  This file is part of OpenFOAM.
12 
13  OpenFOAM is free software: you can redistribute it and/or modify it
14  under the terms of the GNU General Public License as published by
15  the Free Software Foundation, either version 3 of the License, or
16  (at your option) any later version.
17 
18  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
19  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
20  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21  for more details.
22 
23  You should have received a copy of the GNU General Public License
24  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
25 
26 \*---------------------------------------------------------------------------*/
27 
28 #include "foamVtuSizing.H"
29 #include "foamVtkCore.H"
30 #include "polyMesh.H"
31 #include "cellShape.H"
32 
33 // Only used in this file
34 #include "foamVtuSizingTemplates.C"
35 
36 // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
37 
38 void Foam::vtk::vtuSizing::presizeMaps(foamVtkMeshMaps& maps) const
39 {
40  maps.cellMap().setSize(this->nFieldCells());
41  maps.additionalIds().setSize(this->nAddPoints());
42 }
43 
44 
45 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
46 
48 {
49  clear();
50 }
51 
52 
54 (
55  const polyMesh& mesh,
56  const bool decompose
57 )
58 {
59  clear();
60  reset(mesh, decompose);
61 }
62 
63 
64 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
65 
67 {
68  decompose_ = false;
69  nCells_ = 0;
70  nPoints_ = 0;
71  nVertLabels_ = 0;
72 
73  nFaceLabels_ = 0;
74  nCellsPoly_ = 0;
75  nVertPoly_ = 0;
76 
77  nAddCells_ = 0;
78  nAddPoints_ = 0;
79  nAddVerts_ = 0;
80 }
81 
82 
84 (
85  const polyMesh& mesh,
86  const bool decompose
87 )
88 {
93  const cellModel& tetWedge = cellModel::ref(cellModel::TETWEDGE);
95 
96  const cellShapeList& shapes = mesh.cellShapes();
97 
98  // Unique vertex labels per polyhedral
99  labelHashSet hashUniqId(2*256);
100 
101  decompose_ = decompose;
102  nCells_ = mesh.nCells();
103  nPoints_ = mesh.nPoints();
104  nAddCells_ = 0;
105  nAddVerts_ = 0;
106 
107  nCellsPoly_ = nCells_;
108  nVertLabels_ = 0;
109  nFaceLabels_ = 0;
110  nVertPoly_ = 0;
111 
112  const label len = mesh.nCells();
113 
114  for (label celli=0; celli < len; ++celli)
115  {
116  const cellShape& shape = shapes[celli];
117  const cellModel& model = shape.model();
118 
119  if
120  (
121  model == tet
122  || model == pyr
123  || model == prism
124  || model == hex
125  )
126  {
127  // Normal primitive - not a poly
128  --nCellsPoly_;
129  nVertLabels_ += shape.size();
130  }
131  else if (model == tetWedge && decompose)
132  {
133  nVertLabels_ += 6; // Treat as squeezed prism (VTK_WEDGE)
134  }
135  else if (model == wedge && decompose)
136  {
137  nVertLabels_ += 8; // Treat as squeezed hex
138  }
139  else if (decompose)
140  {
141  // Polyhedral: Decompose into tets + pyramids.
142  ++nAddPoints_;
143 
144  // Count vertices into first decomposed cell
145  bool first = true;
146 
147  const cell& cFaces = mesh.cells()[celli];
148  for (const label facei : cFaces)
149  {
150  const face& f = mesh.faces()[facei];
151 
152  // Face decomposed into triangles and quads
153  // Tri -> Tet, Quad -> Pyr
154  label nTria = 0, nQuad = 0;
155  f.nTrianglesQuads(mesh.points(), nTria, nQuad);
156 
157  nAddCells_ += nTria + nQuad;
158  nAddVerts_ += (nTria * 4) + (nQuad * 5);
159 
160  if (first)
161  {
162  first = false;
163  --nAddCells_;
164 
165  const label nvrt = (nQuad ? 5 : 4);
166  nAddVerts_ -= nvrt;
167  nVertLabels_ += nvrt;
168  }
169  }
170  }
171  else
172  {
173  // Polyhedral: Not decomposed
174 
175  const labelList& cFaces = mesh.cells()[celli];
176 
177  // Unique node ids used (XML/INTERNAL, not needed for LEGACY)
178  hashUniqId.clear();
179 
180  // Face stream sizing:
181  // number of faces, size of each face, vertices per face
182  // [nFaces, nFace0Pts, id1, id2, ..., nFace1Pts, id1, id2, ...]
183 
184  for (const label facei : cFaces)
185  {
186  const face& f = mesh.faces()[facei];
187  nFaceLabels_ += f.size();
188 
189  hashUniqId.insert(f);
190  }
191 
192  // Legacy format only uses the face-stream.
193  // - track what *NOT* to use for legacy
194  nVertLabels_ += hashUniqId.size();
195  nVertPoly_ += hashUniqId.size();
196 
197  nFaceLabels_ += 1 + cFaces.size();
198  }
199  }
200 
201  // Requested and actually required
202  decompose_ = (decompose && nCellsPoly_);
203 }
204 
205 
207 (
208  const enum contentType output,
209  const enum slotType slot
210 ) const
211 {
212  switch (output)
213  {
214  case contentType::LEGACY:
215  {
216  switch (slot)
217  {
218  case slotType::CELLS:
219  // legacy uses connectivity for primitives, but directly
220  // stores face streams into connectivity as well.
221  // size-prefix per cell
222  return
223  (
224  nVertLabels() + nAddVerts() - nVertPoly() // primitives
225  + nFaceLabels() // face-stream (poly)
226  + nFieldCells() // nFieldCells (size prefix)
227  );
228  break;
229 
230  default:
231  break;
232  }
233  break;
234  }
235  case contentType::XML:
236  {
237  switch (slot)
238  {
239  case slotType::CELLS:
240  return (nVertLabels() + nAddVerts());
241  break;
242 
243  case slotType::CELLS_OFFSETS:
244  return nFieldCells();
245  break;
246 
247  case slotType::FACES:
248  return nFaceLabels();
249  break;
250 
251  case slotType::FACES_OFFSETS:
252  return nFaceLabels() ? nFieldCells() : 0;
253  break;
254  }
255  break;
256  }
257  case contentType::INTERNAL:
258  {
259  switch (slot)
260  {
261  case slotType::CELLS:
262  // size-prefix per cell
263  return (nVertLabels() + nAddVerts() + nFieldCells());
264  break;
265 
266  case slotType::CELLS_OFFSETS:
267  return nFieldCells();
268  break;
269 
270  case slotType::FACES:
271  return nFaceLabels();
272  break;
273 
274  case slotType::FACES_OFFSETS:
275  return nFaceLabels() ? nFieldCells() : 0;
276  break;
277  }
278  break;
279  }
280  }
281 
282  return 0;
283 }
284 
285 
286 // * * * * * * * * * * * * * * Populate Lists * * * * * * * * * * * * * * * //
287 
289 (
290  const polyMesh& mesh,
292  labelUList& vertLabels,
293  foamVtkMeshMaps& maps
294 ) const
295 {
296  // Leave as zero-sized so that populateArrays doesn't fill it.
297  List<label> unused;
298 
299  presizeMaps(maps);
300 
301  populateArrays
302  (
303  mesh,
304  *this,
305  cellTypes,
306  vertLabels,
307  unused, // offsets
308  unused, // faces
309  unused, // facesOffsets
310  contentType::LEGACY,
311  maps.cellMap(),
312  maps.additionalIds()
313  );
314 }
315 
316 
318 (
319  const polyMesh& mesh,
321  labelUList& connectivity,
322  labelUList& offsets,
323  labelUList& faces,
324  labelUList& facesOffsets,
325  foamVtkMeshMaps& maps
326 ) const
327 {
328  presizeMaps(maps);
329 
330  populateArrays
331  (
332  mesh,
333  *this,
334  cellTypes,
335  connectivity,
336  offsets,
337  faces,
338  facesOffsets,
339  contentType::XML,
340  maps.cellMap(),
341  maps.additionalIds()
342  );
343 }
344 
345 
347 (
348  const polyMesh& mesh,
350  UList<int>& connectivity,
351  UList<int>& offsets,
352  UList<int>& faces,
353  UList<int>& facesOffsets,
354  foamVtkMeshMaps& maps
355 ) const
356 {
357  presizeMaps(maps);
358 
359  populateArrays
360  (
361  mesh,
362  *this,
363  cellTypes,
364  connectivity,
365  offsets,
366  faces,
367  facesOffsets,
368  contentType::INTERNAL,
369  maps.cellMap(),
370  maps.additionalIds()
371  );
372 }
373 
374 
376 (
377  const polyMesh& mesh,
379  UList<long>& connectivity,
380  UList<long>& offsets,
381  UList<long>& faces,
382  UList<long>& facesOffsets,
383  foamVtkMeshMaps& maps
384 ) const
385 {
386  presizeMaps(maps);
387 
388  populateArrays
389  (
390  mesh,
391  *this,
392  cellTypes,
393  connectivity,
394  offsets,
395  faces,
396  facesOffsets,
397  contentType::INTERNAL,
398  maps.cellMap(),
399  maps.additionalIds()
400  );
401 }
402 
403 
405 (
406  const polyMesh& mesh,
408  UList<long long>& connectivity,
409  UList<long long>& offsets,
410  UList<long long>& faces,
411  UList<long long>& facesOffsets,
412  foamVtkMeshMaps& maps
413 ) const
414 {
415  presizeMaps(maps);
416 
417  populateArrays
418  (
419  mesh,
420  *this,
421  cellTypes,
422  connectivity,
423  offsets,
424  faces,
425  facesOffsets,
426  contentType::INTERNAL,
427  maps.cellMap(),
428  maps.additionalIds()
429  );
430 }
431 
432 
434 (
435  const polyMesh& mesh,
437  UList<int>& connectivity,
438  UList<int>& offsets,
439  UList<int>& faces,
440  UList<int>& facesOffsets,
441  labelUList& cellMap,
442  labelUList& addPointsIds
443 ) const
444 {
445  populateArrays
446  (
447  mesh,
448  *this,
449  cellTypes,
450  connectivity,
451  offsets,
452  faces,
453  facesOffsets,
454  contentType::INTERNAL,
455  cellMap,
456  addPointsIds
457  );
458 }
459 
460 
462 (
463  const polyMesh& mesh,
465  UList<long>& connectivity,
466  UList<long>& offsets,
467  UList<long>& faces,
468  UList<long>& facesOffsets,
469  labelUList& cellMap,
470  labelUList& addPointsIds
471 ) const
472 {
473  populateArrays
474  (
475  mesh,
476  *this,
477  cellTypes,
478  connectivity,
479  offsets,
480  faces,
481  facesOffsets,
482  contentType::INTERNAL,
483  cellMap,
484  addPointsIds
485  );
486 }
487 
488 
490 (
491  const polyMesh& mesh,
493  UList<long long>& connectivity,
494  UList<long long>& offsets,
495  UList<long long>& faces,
496  UList<long long>& facesOffsets,
497  labelUList& cellMap,
498  labelUList& addPointsIds
499 ) const
500 {
501  populateArrays
502  (
503  mesh,
504  *this,
505  cellTypes,
506  connectivity,
507  offsets,
508  faces,
509  facesOffsets,
510  contentType::INTERNAL,
511  cellMap,
512  addPointsIds
513  );
514 }
515 
516 
517 // * * * * * * * * * * * * * * Renumber vertices * * * * * * * * * * * * * * //
518 
520 (
521  const labelUList& vertLabels,
522  const label globalPointOffset
523 )
524 {
525  if (!globalPointOffset)
526  {
527  return vertLabels;
528  }
529 
530  labelList output(vertLabels);
531  renumberVertLabelsLegacy(output, globalPointOffset);
532 
533  return output;
534 }
535 
536 
538 (
539  labelUList& vertLabels,
540  const label globalPointOffset
541 )
542 {
543  if (!globalPointOffset)
544  {
545  return;
546  }
547 
548  // LEGACY vertLabels = "cells" contains
549  // - connectivity
550  // [nLabels, vertex labels...]
551  // - face-stream
552  // [nLabels nFaces, nFace0Pts, id1,id2,..., nFace1Pts, id1,id2,...]
553 
554  // Note the simplest volume cell is a tet (4 points, 4 faces)
555  // As a poly-face stream this would have
556  // 2 for nLabels, nFaces
557  // 4 labels (size + ids) per face * 4 == 16 labels
558  //
559  // Therefore anything with 18 labels or more must be a poly
560 
561  auto iter = vertLabels.begin();
562  auto last = vertLabels.end();
563 
564  while (iter < last)
565  {
566  label nLabels = *iter; // nLabels (for this cell)
567  ++iter;
568 
569  if (nLabels < 18)
570  {
571  // Normal primitive type
572 
573  while (nLabels--)
574  {
575  *iter += globalPointOffset;
576  ++iter;
577  }
578  }
579  else
580  {
581  // Polyhedral face-stream (explained above)
582 
583  label nFaces = *iter;
584  ++iter;
585 
586  while (nFaces--)
587  {
588  nLabels = *iter; // nLabels (for this face)
589  ++iter;
590 
591  while (nLabels--)
592  {
593  *iter += globalPointOffset;
594  ++iter;
595  }
596  }
597  }
598  }
599 }
600 
601 
603 (
604  const labelUList& vertLabels,
605  const label globalPointOffset
606 )
607 {
608  if (!globalPointOffset)
609  {
610  return vertLabels;
611  }
612 
613  labelList output(vertLabels);
614  renumberVertLabelsXml(output, globalPointOffset);
615 
616  return output;
617 }
618 
619 
621 (
622  labelUList& vertLabels,
623  const label globalPointOffset
624 )
625 {
626  if (!globalPointOffset)
627  {
628  return;
629  }
630 
631  // XML vertLabels = "connectivity" contains
632  // [cell1-verts, cell2-verts, ...]
633 
634  for (label& vertId : vertLabels)
635  {
636  vertId += globalPointOffset;
637  }
638 }
639 
640 
642 (
643  const labelUList& faceLabels,
644  const label globalPointOffset
645 )
646 {
647  if (!globalPointOffset)
648  {
649  return faceLabels;
650  }
651 
652  labelList output(faceLabels);
653  renumberFaceLabelsXml(output, globalPointOffset);
654 
655  return output;
656 }
657 
658 
660 (
661  labelUList& faceLabels,
662  const label globalPointOffset
663 )
664 {
665  if (!globalPointOffset)
666  {
667  return;
668  }
669 
670  // XML face-stream
671  // [nFaces, nFace0Pts, id1,id2,..., nFace1Pts, id1,id2,...]
672 
673  auto iter = faceLabels.begin();
674  auto last = faceLabels.end();
675 
676  while (iter < last)
677  {
678  label nFaces = *iter;
679  ++iter;
680 
681  while (nFaces--)
682  {
683  label nLabels = *iter;
684  ++iter;
685 
686  while (nLabels--)
687  {
688  *iter += globalPointOffset;
689  ++iter;
690  }
691  }
692  }
693 }
694 
695 
697 (
698  const labelUList& faceOffsets,
699  const label prevOffset
700 )
701 {
702  if (!prevOffset)
703  {
704  return faceOffsets;
705  }
706 
707  labelList output(faceOffsets);
708  renumberFaceOffsetsXml(output, prevOffset);
709 
710  return output;
711 }
712 
713 
715 (
716  labelUList& faceOffsets,
717  const label prevOffset
718 )
719 {
720  if (!prevOffset)
721  {
722  return;
723  }
724 
725  // offsets
726  // [-1, off1, off2, ... -1, ..]
727 
728  for (label& val : faceOffsets)
729  {
730  if (val != -1)
731  {
732  val += prevOffset;
733  }
734  }
735 }
736 
737 
738 // * * * * * * * * * * * * * * * IOstream Operators * * * * * * * * * * * * //
739 
741 {
742  os << "nFieldCells:" << nFieldCells();
743  if (nAddCells_)
744  {
745  os << " (" << nCells_ << "+" << nAddCells_ << ")";
746  }
747  else
748  {
749  os << " (poly:" << nCellsPoly_ << ")";
750  }
751 
752  os << " nFieldPoints:" << nFieldPoints();
753  if (nAddPoints_)
754  {
755  os << " (" << nPoints_ << "+" << nAddPoints_ << ")";
756  }
757 
758  os << " nVertLabels:" << (nVertLabels_ + nAddVerts_);
759  if (nAddVerts_)
760  {
761  os << " (" << nVertLabels_ << "+" << nAddVerts_ << ")";
762  }
763  else if (nVertPoly_)
764  {
765  os << " (poly:" << nVertPoly_ << ")";
766  }
767 
768  os << " nFaceLabels:" << nFaceLabels_;
769  os << " legacy-count:" << sizeLegacy();
770 }
771 
772 
773 // * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * //
774 
776 {
777  return
778  (
779  decompose() == rhs.decompose()
780  // required? && pointOffset() == rhs.pointOffset()
781  && nCells() == rhs.nCells()
782  && nPoints() == rhs.nPoints()
783  && nVertLabels() == rhs.nVertLabels()
784  && nFaceLabels() == rhs.nFaceLabels()
785  && nCellsPoly() == rhs.nCellsPoly()
786  && nVertPoly() == rhs.nVertPoly()
787  && nAddCells() == rhs.nAddCells()
788  && nAddPoints() == rhs.nAddPoints()
789  && nAddVerts() == rhs.nAddVerts()
790  );
791 }
792 
793 
795 {
796  return !operator==(rhs);
797 }
798 
799 
800 // ************************************************************************* //
Foam::vtk::vtuSizing::nCells
label nCells() const
Number of cells for the mesh.
Definition: foamVtuSizingI.H:38
Foam::vtk::vtuSizing::renumberFaceLabelsXml
static void renumberFaceLabelsXml(labelUList &faceLabels, const label globalPointOffset)
Renumber faces stream labels by global point offset - XML format.
Definition: foamVtuSizing.C:660
Foam::HashTable::size
label size() const noexcept
The number of elements in table.
Definition: HashTableI.H:52
Foam::val
label ListType::const_reference val
Definition: ListOps.H:407
Foam::vtk::vtuSizing::decompose
bool decompose() const
Query the decompose flag (normally off)
Definition: foamVtuSizingI.H:32
Foam::vtk::vtuSizing::nCellsPoly
label nCellsPoly() const
Number of polyhedral cells for the mesh.
Definition: foamVtuSizingI.H:62
Foam::vtk::vtuSizing::vtuSizing
vtuSizing()
Construct null.
Definition: foamVtuSizing.C:47
Foam::vtk::vtuSizing::populateLegacy
void populateLegacy(const polyMesh &mesh, UList< uint8_t > &cellTypes, labelUList &connectivity, foamVtkMeshMaps &maps) const
Populate lists for Legacy output.
Definition: foamVtuSizing.C:289
Foam::foamVtkMeshMaps::cellMap
const labelList & cellMap() const
Original cell ids for all cells (regular and decomposed).
Definition: foamVtkMeshMapsI.H:51
Foam::cellModel::HEX
hex
Definition: cellModel.H:81
Foam::vtk::vtuSizing::nAddVerts
label nAddVerts() const
Number of additional (decomposed) vertices for the mesh.
Definition: foamVtuSizingI.H:86
Foam::vtk::vtuSizing::info
void info(Ostream &os) const
Report some information.
Definition: foamVtuSizing.C:740
foamVtuSizingTemplates.C
Foam::vtk::vtuSizing::clear
void clear()
Reset all sizes to zero.
Definition: foamVtuSizing.C:66
Foam::vtk::dataArrayAttr::FACES
"faces"
polyMesh.H
Foam::HashSet< label, Hash< label > >
Foam::UList::begin
iterator begin()
Return an iterator to begin traversing the UList.
Definition: UListI.H:276
Foam::cellModel::TET
tet
Definition: cellModel.H:85
Foam::polyMesh
Mesh consisting of general polyhedral cells.
Definition: polyMesh.H:77
foamVtuSizing.H
Foam::vtk::vtuSizing::copyVertLabelsLegacy
static labelList copyVertLabelsLegacy(const labelUList &connectivity, const label globalPointOffset)
Copy vertex labels with a global point offset - legacy format.
Definition: foamVtuSizing.C:520
Foam::vtk::vtuSizing::operator!=
bool operator!=(const vtuSizing &rhs) const
Test inequality.
Definition: foamVtuSizing.C:794
nPoints
label nPoints
Definition: gmvOutputHeader.H:2
Foam::vtk::fileTag::CELLS
"Cells"
Foam::vtk::vtuSizing::nFieldCells
label nFieldCells() const
Number of field cells = nCells + nAddCells.
Definition: foamVtuSizingI.H:92
Foam::vtk::vtuSizing::nVertPoly
label nVertPoly() const
Number of vertex labels for polyhedral cells of the mesh.
Definition: foamVtuSizingI.H:68
Foam::vtk::vtuSizing::populateXml
void populateXml(const polyMesh &mesh, UList< uint8_t > &cellTypes, labelUList &connectivity, labelUList &offsets, labelUList &faces, labelUList &facesOffsets, foamVtkMeshMaps &maps) const
Populate lists for XML output.
Definition: foamVtuSizing.C:318
Foam::label
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Definition: label.H:62
Foam::operator==
tmp< faMatrix< Type > > operator==(const faMatrix< Type > &, const faMatrix< Type > &)
Foam::vtk::vtuSizing::nFaceLabels
label nFaceLabels() const
Number of polyhedral face labels for the mesh.
Definition: foamVtuSizingI.H:56
Foam::cellModel::PRISM
prism
Definition: cellModel.H:83
Foam::cellModel::ref
static const cellModel & ref(const modelType model)
Look up reference to cellModel by enumeration. Fatal on failure.
Definition: cellModels.C:157
Foam::vtk::vtuSizing::renumberVertLabelsLegacy
static void renumberVertLabelsLegacy(labelUList &connectivity, const label globalPointOffset)
Renumber vertex labels by global point offset - legacy format.
Definition: foamVtuSizing.C:538
Foam::vtk::vtuSizing::populateInternal
void populateInternal(const polyMesh &mesh, UList< uint8_t > &cellTypes, UList< int > &connectivity, UList< int > &offsets, UList< int > &faces, UList< int > &facesOffsets, foamVtkMeshMaps &maps) const
Populate lists for Internal VTK format.
Definition: foamVtuSizing.C:347
mesh
dynamicFvMesh & mesh
Definition: createDynamicFvMesh.H:6
Foam::vtk::vtuSizing::nPoints
label nPoints() const
Number of points for the mesh.
Definition: foamVtuSizingI.H:44
Foam::cellShape
An analytical geometric cellShape.
Definition: cellShape.H:71
Foam::vtk::vtuSizing::nVertLabels
label nVertLabels() const
Number of vertex labels for the mesh.
Definition: foamVtuSizingI.H:50
Foam::vtk::vtuSizing::contentType
contentType
Types of content that the storage may represent.
Definition: foamVtuSizing.H:173
Foam::vtk::vtuSizing
Sizing descriptions and routines for transcribing an OpenFOAM volume mesh into a VTK unstructured gri...
Definition: foamVtuSizing.H:166
Foam::vtk::vtuSizing::renumberFaceOffsetsXml
static void renumberFaceOffsetsXml(labelUList &faceOffsets, const label prevOffset)
Renumber face offsets with an offset from previous - XML format.
Definition: foamVtuSizing.C:715
Foam::hex
IOstream & hex(IOstream &io)
Definition: IOstream.H:429
Foam::cellModel::WEDGE
wedge
Definition: cellModel.H:82
Foam::vtk::vtuSizing::copyVertLabelsXml
static labelList copyVertLabelsXml(const labelUList &connectivity, const label globalPointOffset)
Copy vertex labels with a global point offset - XML format.
Definition: foamVtuSizing.C:603
Foam::cellModel::PYR
pyr
Definition: cellModel.H:84
cellTypes
const labelList & cellTypes
Definition: setCellMask.H:33
clear
patchWriters clear()
Foam::HashTable::clear
void clear()
Clear all entries from table.
Definition: HashTable.C:630
Foam::vtk::vtuSizing::copyFaceOffsetsXml
static labelList copyFaceOffsetsXml(const labelUList &faceOffsets, const label prevOffset)
Copy face offsets with an offset from previous - XML format.
Definition: foamVtuSizing.C:697
f
labelList f(nPoints)
Foam::List< cellShape >
Foam::vtk::vtuSizing::renumberVertLabelsXml
static void renumberVertLabelsXml(labelUList &connectivity, const label globalPointOffset)
Renumber vertex labels by global point offset - XML format.
Definition: foamVtuSizing.C:621
Foam::vtk::vtuSizing::copyFaceLabelsXml
static labelList copyFaceLabelsXml(const labelUList &faceLabels, const label globalPointOffset)
Copy faces stream labels with a global point offset - XML format.
Definition: foamVtuSizing.C:642
Foam::UList
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
Definition: HashTable.H:103
foamVtkCore.H
Foam::HashSet::insert
bool insert(const Key &key)
Insert a new entry, not overwriting existing entries.
Definition: HashSet.H:182
Foam::foamVtkMeshMaps::additionalIds
const labelList & additionalIds() const
Any additional (user) labels.
Definition: foamVtkMeshMapsI.H:79
cellShape.H
Foam::vtk::vtuSizing::slotType
slotType
The possible storage 'slots' that can be used.
Definition: foamVtuSizing.H:181
Foam::cellModel::TETWEDGE
tetWedge
Definition: cellModel.H:87
Foam::vtk::vtuSizing::nAddPoints
label nAddPoints() const
Number of additional (decomposed) points for the mesh.
Definition: foamVtuSizingI.H:80
Foam::face
A face is a list of labels corresponding to mesh vertices.
Definition: face.H:74
Foam::cellModel
Maps a geometry to a set of cell primitives.
Definition: cellModel.H:72
Foam::Ostream
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition: Ostream.H:56
Foam::UList::end
iterator end()
Return an iterator to end traversing the UList.
Definition: UListI.H:297
Foam::vtk::vtuSizing::nAddCells
label nAddCells() const
Number of additional (decomposed) cells for the mesh.
Definition: foamVtuSizingI.H:74
Foam::cell
A cell is defined as a list of faces with extra functionality.
Definition: cell.H:54
Foam::vtk::vtuSizing::operator==
bool operator==(const vtuSizing &rhs) const
Test equality.
Definition: foamVtuSizing.C:775
Foam::vtk::vtuSizing::reset
void reset(const polyMesh &mesh, const bool decompose=false)
Reset sizing by analyzing the mesh.
Definition: foamVtuSizing.C:84
Foam::foamVtkMeshMaps
Bookkeeping for mesh subsetting and/or polyhedral cell decomposition. Although the main use case is f...
Definition: foamVtkMeshMaps.H:57
Foam::vtk::vtuSizing::sizeOf
label sizeOf(const enum contentType output, const enum slotType slot) const
Return the required size for the storage slot.
Definition: foamVtuSizing.C:207
Foam::cellShape::model
const cellModel & model() const
Model reference.
Definition: cellShapeI.H:125