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-2020 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().resize(this->nFieldCells());
41  maps.additionalIds().resize(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 
236  case contentType::XML:
237  {
238  switch (slot)
239  {
240  case slotType::CELLS:
241  return (nVertLabels() + nAddVerts());
242  break;
243 
244  case slotType::CELLS_OFFSETS:
245  return nFieldCells();
246  break;
247 
248  case slotType::FACES:
249  return nFaceLabels();
250  break;
251 
252  case slotType::FACES_OFFSETS:
253  return nFaceLabels() ? nFieldCells() : 0;
254  break;
255  }
256  break;
257  }
258 
259  case contentType::INTERNAL1:
260  {
261  switch (slot)
262  {
263  case slotType::CELLS:
264  // size-prefix per cell
265  return (nVertLabels() + nAddVerts() + nFieldCells());
266  break;
267 
268  case slotType::CELLS_OFFSETS:
269  return nFieldCells();
270  break;
271 
272  case slotType::FACES:
273  return nFaceLabels();
274  break;
275 
276  case slotType::FACES_OFFSETS:
277  return nFaceLabels() ? nFieldCells() : 0;
278  break;
279  }
280  break;
281  }
282 
283  case contentType::INTERNAL2:
284  {
285  switch (slot)
286  {
287  case slotType::CELLS:
288  return (nVertLabels() + nAddVerts());
289  break;
290 
291  case slotType::CELLS_OFFSETS:
292  return (nFieldCells() + 1);
293  break;
294 
295  case slotType::FACES:
296  return nFaceLabels();
297  break;
298 
299  case slotType::FACES_OFFSETS:
300  return nFaceLabels() ? nFieldCells() : 0;
301  break;
302  }
303  break;
304  }
305  }
306 
307  return 0;
308 }
309 
310 
311 // * * * * * * * * * * * * * * Populate Lists * * * * * * * * * * * * * * * //
312 
314 (
315  const polyMesh& mesh,
317  labelUList& vertLabels,
318  foamVtkMeshMaps& maps
319 ) const
320 {
321  // Leave as zero-sized so that populateArrays doesn't fill it.
322  List<label> unused;
323 
324  presizeMaps(maps);
325 
326  populateArrays
327  (
328  mesh,
329  *this,
330  cellTypes,
331  vertLabels,
332  unused, // offsets
333  unused, // faces
334  unused, // facesOffsets
335  contentType::LEGACY,
336  maps.cellMap(),
337  maps.additionalIds()
338  );
339 }
340 
341 
343 (
344  const polyMesh& mesh,
346  labelUList& connectivity,
347  labelUList& offsets,
348  labelUList& faces,
349  labelUList& facesOffsets,
350  foamVtkMeshMaps& maps
351 ) const
352 {
353  presizeMaps(maps);
354 
355  populateArrays
356  (
357  mesh,
358  *this,
359  cellTypes,
360  connectivity,
361  offsets,
362  faces,
363  facesOffsets,
364  contentType::XML,
365  maps.cellMap(),
366  maps.additionalIds()
367  );
368 }
369 
370 
371 #undef definePopulateInternalMethod
372 #define definePopulateInternalMethod(Type) \
373  \
374  void Foam::vtk::vtuSizing::populateInternal \
375  ( \
376  const polyMesh& mesh, \
377  UList<uint8_t>& cellTypes, \
378  UList<Type>& connectivity, \
379  UList<Type>& offsets, \
380  UList<Type>& faces, \
381  UList<Type>& facesOffsets, \
382  foamVtkMeshMaps& maps, \
383  const enum contentType output \
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  output, \
398  maps.cellMap(), \
399  maps.additionalIds() \
400  ); \
401  } \
402  \
403  void Foam::vtk::vtuSizing::populateInternal \
404  ( \
405  const polyMesh& mesh, \
406  UList<uint8_t>& cellTypes, \
407  UList<Type>& connectivity, \
408  UList<Type>& offsets, \
409  UList<Type>& faces, \
410  UList<Type>& facesOffsets, \
411  labelUList& cellMap, \
412  labelUList& addPointsIds, \
413  const enum contentType output \
414  ) const \
415  { \
416  populateArrays \
417  ( \
418  mesh, \
419  *this, \
420  cellTypes, \
421  connectivity, \
422  offsets, \
423  faces, \
424  facesOffsets, \
425  output, \
426  cellMap, \
427  addPointsIds \
428  ); \
429  }
430 
431 
435 
436 
437 #undef definePopulateInternalMethod
438 
439 
440 // * * * * * * * * * * * * * * Renumber vertices * * * * * * * * * * * * * * //
441 
443 (
444  const labelUList& vertLabels,
445  const label globalPointOffset
446 )
447 {
448  if (!globalPointOffset)
449  {
450  return vertLabels;
451  }
452 
453  labelList output(vertLabels);
454  renumberVertLabelsLegacy(output, globalPointOffset);
455 
456  return output;
457 }
458 
459 
461 (
462  labelUList& vertLabels,
463  const label globalPointOffset
464 )
465 {
466  if (!globalPointOffset)
467  {
468  return;
469  }
470 
471  // LEGACY vertLabels = "cells" contains
472  // - connectivity
473  // [nLabels, vertex labels...]
474  // - face-stream
475  // [nLabels nFaces, nFace0Pts, id1,id2,..., nFace1Pts, id1,id2,...]
476 
477  // Note the simplest volume cell is a tet (4 points, 4 faces)
478  // As a poly-face stream this would have
479  // 2 for nLabels, nFaces
480  // 4 labels (size + ids) per face * 4 == 16 labels
481  //
482  // Therefore anything with 18 labels or more must be a poly
483 
484  auto iter = vertLabels.begin();
485  const auto last = vertLabels.end();
486 
487  while (iter < last)
488  {
489  label nLabels = *iter; // nLabels (for this cell)
490  ++iter;
491 
492  if (nLabels < 18)
493  {
494  // Normal primitive type
495 
496  while (nLabels--)
497  {
498  *iter += globalPointOffset;
499  ++iter;
500  }
501  }
502  else
503  {
504  // Polyhedral face-stream (explained above)
505 
506  label nFaces = *iter;
507  ++iter;
508 
509  while (nFaces--)
510  {
511  nLabels = *iter; // nLabels (for this face)
512  ++iter;
513 
514  while (nLabels--)
515  {
516  *iter += globalPointOffset;
517  ++iter;
518  }
519  }
520  }
521  }
522 }
523 
524 
526 (
527  const labelUList& vertLabels,
528  const label globalPointOffset
529 )
530 {
531  if (!globalPointOffset)
532  {
533  return vertLabels;
534  }
535 
536  labelList output(vertLabels);
537  renumberVertLabelsXml(output, globalPointOffset);
538 
539  return output;
540 }
541 
542 
544 (
545  labelUList& vertLabels,
546  const label globalPointOffset
547 )
548 {
549  if (!globalPointOffset)
550  {
551  return;
552  }
553 
554  // XML vertLabels = "connectivity" contains
555  // [cell1-verts, cell2-verts, ...]
556 
557  for (label& vertId : vertLabels)
558  {
559  vertId += globalPointOffset;
560  }
561 }
562 
563 
565 (
566  const labelUList& faceLabels,
567  const label globalPointOffset
568 )
569 {
570  if (!globalPointOffset)
571  {
572  return faceLabels;
573  }
574 
575  labelList output(faceLabels);
576  renumberFaceLabelsXml(output, globalPointOffset);
577 
578  return output;
579 }
580 
581 
583 (
584  labelUList& faceLabels,
585  const label globalPointOffset
586 )
587 {
588  if (!globalPointOffset)
589  {
590  return;
591  }
592 
593  // XML face-stream
594  // [nFaces, nFace0Pts, id1,id2,..., nFace1Pts, id1,id2,...]
595 
596  auto iter = faceLabels.begin();
597  const auto last = faceLabels.end();
598 
599  while (iter < last)
600  {
601  label nFaces = *iter;
602  ++iter;
603 
604  while (nFaces--)
605  {
606  label nLabels = *iter;
607  ++iter;
608 
609  while (nLabels--)
610  {
611  *iter += globalPointOffset;
612  ++iter;
613  }
614  }
615  }
616 }
617 
618 
620 (
621  const labelUList& faceOffsets,
622  const label prevOffset
623 )
624 {
625  if (!prevOffset)
626  {
627  return faceOffsets;
628  }
629 
630  labelList output(faceOffsets);
631  renumberFaceOffsetsXml(output, prevOffset);
632 
633  return output;
634 }
635 
636 
638 (
639  labelUList& faceOffsets,
640  const label prevOffset
641 )
642 {
643  if (!prevOffset)
644  {
645  return;
646  }
647 
648  // offsets
649  // [-1, off1, off2, ... -1, ..]
650 
651  for (label& val : faceOffsets)
652  {
653  if (val != -1)
654  {
655  val += prevOffset;
656  }
657  }
658 }
659 
660 
661 // * * * * * * * * * * * * * * * IOstream Operators * * * * * * * * * * * * //
662 
664 {
665  os << "nFieldCells:" << nFieldCells();
666  if (nAddCells_)
667  {
668  os << " (" << nCells_ << "+" << nAddCells_ << ")";
669  }
670  else
671  {
672  os << " (poly:" << nCellsPoly_ << ")";
673  }
674 
675  os << " nFieldPoints:" << nFieldPoints();
676  if (nAddPoints_)
677  {
678  os << " (" << nPoints_ << "+" << nAddPoints_ << ")";
679  }
680 
681  os << " nVertLabels:" << (nVertLabels_ + nAddVerts_);
682  if (nAddVerts_)
683  {
684  os << " (" << nVertLabels_ << "+" << nAddVerts_ << ")";
685  }
686  else if (nVertPoly_)
687  {
688  os << " (poly:" << nVertPoly_ << ")";
689  }
690 
691  os << " nFaceLabels:" << nFaceLabels_;
692  os << " legacy-count:" << sizeLegacy();
693 }
694 
695 
696 // * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * //
697 
699 {
700  return
701  (
702  decompose() == rhs.decompose()
703  // required? && pointOffset() == rhs.pointOffset()
704  && nCells() == rhs.nCells()
705  && nPoints() == rhs.nPoints()
706  && nVertLabels() == rhs.nVertLabels()
707  && nFaceLabels() == rhs.nFaceLabels()
708  && nCellsPoly() == rhs.nCellsPoly()
709  && nVertPoly() == rhs.nVertPoly()
710  && nAddCells() == rhs.nAddCells()
711  && nAddPoints() == rhs.nAddPoints()
712  && nAddVerts() == rhs.nAddVerts()
713  );
714 }
715 
716 
718 {
719  return !operator==(rhs);
720 }
721 
722 
723 // ************************************************************************* //
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:583
Foam::HashTable::size
label size() const noexcept
The number of elements in table.
Definition: HashTableI.H:52
Foam::output
static Ostream & output(Ostream &os, const IntRange< T > &range)
Definition: IntRanges.C:66
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::populateLegacy
void populateLegacy(const polyMesh &mesh, UList< uint8_t > &cellTypes, labelUList &connectivity, foamVtkMeshMaps &maps) const
Populate lists for Legacy output.
Definition: foamVtuSizing.C:314
Foam::foamVtkMeshMaps::cellMap
const labelList & cellMap() const
Original cell ids for all cells (regular and decomposed).
Definition: foamVtkMeshMapsI.H:59
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:663
foamVtuSizingTemplates.C
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:443
Foam::vtk::vtuSizing::operator!=
bool operator!=(const vtuSizing &rhs) const
Test inequality.
Definition: foamVtuSizing.C:717
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:343
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:461
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:69
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:207
Foam::vtk::vtuSizing
Sizing descriptions and routines for transcribing an OpenFOAM volume mesh into a VTK unstructured gri...
Definition: foamVtuSizing.H:200
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:638
Foam::hex
IOstream & hex(IOstream &io)
Definition: IOstream.H:437
Foam::cellModel::WEDGE
wedge
Definition: cellModel.H:82
Foam::vtk::vtuSizing::clear
void clear() noexcept
Reset all sizes to zero.
Definition: foamVtuSizing.C:66
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:526
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:620
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:544
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:565
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:181
Foam::foamVtkMeshMaps::additionalIds
const labelList & additionalIds() const
Any additional (user) labels.
Definition: foamVtkMeshMapsI.H:87
definePopulateInternalMethod
#define definePopulateInternalMethod(Type)
Definition: foamVtuSizing.C:372
cellShape.H
Foam::vtk::vtuSizing::vtuSizing
vtuSizing() noexcept
Default construct.
Definition: foamVtuSizing.C:47
Foam::vtk::vtuSizing::slotType
slotType
The possible storage 'slots' that can be used.
Definition: foamVtuSizing.H:216
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:72
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:698
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:58
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:126