108 #ifndef Foam_vtk_vtuSizing_H 109 #define Foam_vtk_vtuSizing_H 218 static void checkSizes
222 const label cellTypes_size,
223 const label vertLabels_size,
224 const label vertOffset_size,
225 const label faceLabels_size,
226 const label faceOffset_size,
230 const label cellMap_size,
231 const label addPointsIds_size
235 template<
class LabelType>
236 static void adjustOffsets
241 const bool hasFaceStream
245 template<
class LabelType>
246 static void populateArrays
261 template<
class LabelType>
262 static void populateArrays
452 #undef declarePopulateInternalMethod 453 #define declarePopulateInternalMethod(Type) \ 456 void populateInternal \ 458 const polyMesh& mesh, \ 459 UList<uint8_t>& cellTypes, \ 460 UList<Type>& connectivity, \ 461 UList<Type>& offsets, \ 462 UList<Type>& faces, \ 463 UList<Type>& facesOffsets, \ 464 foamVtkMeshMaps& maps, \ 465 const enum contentType output \ 469 void populateInternal \ 471 const polyMesh& mesh, \ 472 UList<uint8_t>& cellTypes, \ 473 UList<Type>& connectivity, \ 474 UList<Type>& offsets, \ 475 UList<Type>& faces, \ 476 UList<Type>& facesOffsets, \ 477 labelUList& cellMap, \ 478 labelUList& addPointsIds, \ 479 const enum contentType output \ 487 #undef declarePopulateInternalMethod 497 const label globalPointOffset
504 const label globalPointOffset
511 const label globalPointOffset
518 const label prevOffset
525 const label globalPointOffset
532 const label globalPointOffset
539 const label globalPointOffset
546 const label prevOffset
vtuSizing() noexcept
Default construct.
void populateShapesLegacy(const UList< cellShape > &shapes, UList< uint8_t > &cellTypes, labelUList &connectivity, foamVtkMeshMaps &maps) const
Reset list for primitive shapes only (ADVANCED USAGE)
selectionModeType
How the mesh cells have been selected or defined.
label nVertLabels() const noexcept
Number of vertex labels for the mesh.
contentType
Types of content that the storage may represent.
static void renumberFaceOffsetsXml(labelUList &faceOffsets, const label prevOffset)
Renumber face offsets with an offset from previous - XML format.
bool operator==(const vtuSizing &rhs) const
Test equality.
label nAddVerts() const noexcept
Number of additional (decomposed) vertices for the mesh.
void populateLegacy(const polyMesh &mesh, UList< uint8_t > &cellTypes, labelUList &connectivity, foamVtkMeshMaps &maps) const
Populate lists for Legacy output.
An analytical geometric cellShape.
void reset(const polyMesh &mesh, const bool decompose=false)
Reset sizing by analyzing the mesh.
bool decompose() const noexcept
Query the decompose flag (normally off)
label nVertPoly() const noexcept
Number of vertex labels for polyhedral cells of the mesh.
#define declarePopulateInternalMethod(Type)
Internal vtkUnstructuredGrid content.
label nFaceLabels() const noexcept
Number of polyhedral face labels for the mesh.
Face-stream (XML, INTERNAL)
label nFieldPoints() const noexcept
Number of field points = nPoints + nAddPoints.
labelList faceLabels(nFaceLabels)
Bookkeeping for mesh subsetting and/or polyhedral cell decomposition. Although the main use case is f...
slotType
The possible storage 'slots' that can be used.
void populateShapesXml(const UList< cellShape > &shapes, UList< uint8_t > &cellTypes, labelUList &connectivity, labelUList &offsets, labelUList &faces, labelUList &facesOffsets, foamVtkMeshMaps &maps) const
Reset list for primitive shapes only (ADVANCED USAGE)
Faces end-offsets (XML) or locations (INTERNAL1)
static labelList copyFaceLabelsXml(const labelUList &faceLabels, const label globalPointOffset)
Copy faces stream labels with a global point offset - XML format.
static void renumberVertLabelsLegacy(labelUList &connectivity, const label globalPointOffset)
Renumber vertex labels by global point offset - legacy format.
bool operator!=(const vtuSizing &rhs) const
Test inequality.
void setNumPoints(label n) noexcept
Alter number of mesh points (ADVANCED USAGE)
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.
void info(Ostream &os) const
Report some information.
label nAddPoints() const noexcept
Number of additional (decomposed) points for the mesh.
static labelList copyVertLabelsLegacy(const labelUList &connectivity, const label globalPointOffset)
Copy vertex labels with a global point offset - legacy format.
label sizeInternal2(const enum slotType slot) const
The calculated size for vtk-internal storage of the specified slot.
label nCells() const noexcept
Number of cells for the mesh.
bool manifold() const noexcept
Manifold mesh cells detected? Globally consistent quantity.
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
const labelList & cellTypes
static labelList copyVertLabelsXml(const labelUList &connectivity, const label globalPointOffset)
Copy vertex labels with a global point offset - XML format.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
OBJstream os(runTime.globalPath()/outputName)
label nFieldCells() const noexcept
Number of field cells = nCells + nAddCells.
Sizing descriptions and routines for transcribing an OpenFOAM volume mesh into a VTK unstructured gri...
label sizeInternal1(const enum slotType slot) const
The calculated size for vtk-internal storage of the specified slot.
static void renumberFaceLabelsXml(labelUList &faceLabels, const label globalPointOffset)
Renumber faces stream labels by global point offset - XML format.
static labelList copyFaceOffsetsXml(const labelUList &faceOffsets, const label prevOffset)
Copy face offsets with an offset from previous - XML format.
label nPoints() const noexcept
Number of points for the mesh.
label sizeOf(const enum contentType output, const enum slotType slot) const
Return the required size for the storage slot.
label sizeLegacy() const
The calculated size for legacy storage.
static Ostream & output(Ostream &os, const IntRange< T > &range)
label nAddCells() const noexcept
Number of additional (decomposed) cells for the mesh.
label nCellsPoly() const noexcept
Number of polyhedral cells for the mesh.
selectionModeType selectionMode() const noexcept
Query how the mesh cells have been selected or defined.
Mesh consisting of general polyhedral cells.
void clear() noexcept
Reset all sizes to zero.
void resetShapes(const UList< cellShape > &shapes)
Reset sizing using primitive shapes only (ADVANCED USAGE)
void setNumAddPoints(label n) noexcept
Alter number of additional (cell-centre) points (ADVANCED USAGE)
Internal vtkUnstructuredGrid content, VTK_CELL_ARRAY_V2.
static void renumberVertLabelsXml(labelUList &connectivity, const label globalPointOffset)
Renumber vertex labels by global point offset - XML format.
label sizeXml(const enum slotType slot) const
The calculated size for xml storage of the specified slot.