Go to the documentation of this file.
108 #ifndef foamVtuSizing_H
109 #define foamVtuSizing_H
203 template<
class LabelType,
class LabelType2>
204 static void populateArrays
244 void clear() noexcept;
253 inline label
nCells() const;
339 #undef declarePopulateInternalMethod
340 #define declarePopulateInternalMethod(Type) \
343 void populateInternal \
345 const polyMesh& mesh, \
346 UList<uint8_t>& cellTypes, \
347 UList<Type>& connectivity, \
348 UList<Type>& offsets, \
349 UList<Type>& faces, \
350 UList<Type>& facesOffsets, \
351 foamVtkMeshMaps& maps, \
352 const enum contentType output \
356 void populateInternal \
358 const polyMesh& mesh, \
359 UList<uint8_t>& cellTypes, \
360 UList<Type>& connectivity, \
361 UList<Type>& offsets, \
362 UList<Type>& faces, \
363 UList<Type>& facesOffsets, \
364 labelUList& cellMap, \
365 labelUList& addPointsIds, \
366 const enum contentType output \
374 #undef declarePopulateInternalMethod
384 const label globalPointOffset
391 const label globalPointOffset
398 const label globalPointOffset
405 const label prevOffset
412 const label globalPointOffset
419 const label globalPointOffset
426 const label globalPointOffset
433 const label prevOffset
440 void info(Ostream& os)
const;
label nCells() const
Number of cells for the mesh.
List< label > labelList
A List of labels.
static void renumberFaceLabelsXml(labelUList &faceLabels, const label globalPointOffset)
Renumber faces stream labels by global point offset - XML format.
static Ostream & output(Ostream &os, const IntRange< T > &range)
bool decompose() const
Query the decompose flag (normally off)
#define declarePopulateInternalMethod(Type)
label nCellsPoly() const
Number of polyhedral cells for the mesh.
void populateLegacy(const polyMesh &mesh, UList< uint8_t > &cellTypes, labelUList &connectivity, foamVtkMeshMaps &maps) const
Populate lists for Legacy output.
label nAddVerts() const
Number of additional (decomposed) vertices for the mesh.
void info(Ostream &os) const
Report some information.
Mesh consisting of general polyhedral cells.
Internal vtkUnstructuredGrid content, VTK_CELL_ARRAY_V2.
static labelList copyVertLabelsLegacy(const labelUList &connectivity, const label globalPointOffset)
Copy vertex labels with a global point offset - legacy format.
bool operator!=(const vtuSizing &rhs) const
Test inequality.
label sizeLegacy() const
The calculated size for legacy storage.
label nFieldCells() const
Number of field cells = nCells + nAddCells.
label nVertPoly() const
Number of vertex labels for polyhedral cells of the mesh.
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.
label nFaceLabels() const
Number of polyhedral face labels for the mesh.
Faces end-offsets (XML) or locations (INTERNAL1)
static void renumberVertLabelsLegacy(labelUList &connectivity, const label globalPointOffset)
Renumber vertex labels by global point offset - legacy format.
label nFieldPoints() const
Number of field points = nPoints + nAddPoints.
label nPoints() const
Number of points for the mesh.
label nVertLabels() const
Number of vertex labels for the mesh.
contentType
Types of content that the storage may represent.
Sizing descriptions and routines for transcribing an OpenFOAM volume mesh into a VTK unstructured gri...
static void renumberFaceOffsetsXml(labelUList &faceOffsets, const label prevOffset)
Renumber face offsets with an offset from previous - XML format.
label sizeInternal2(const enum slotType slot) const
The calculated size for vtk-internal storage of the specified slot.
Face-stream (XML, INTERNAL)
void clear() noexcept
Reset all sizes to zero.
static labelList copyVertLabelsXml(const labelUList &connectivity, const label globalPointOffset)
Copy vertex labels with a global point offset - XML format.
const labelList & cellTypes
static labelList copyFaceOffsetsXml(const labelUList &faceOffsets, const label prevOffset)
Copy face offsets with an offset from previous - XML format.
static void renumberVertLabelsXml(labelUList &connectivity, const label globalPointOffset)
Renumber vertex labels by global point offset - XML format.
static labelList copyFaceLabelsXml(const labelUList &faceLabels, const label globalPointOffset)
Copy faces stream labels with a global point offset - XML format.
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
vtuSizing() noexcept
Default construct.
slotType
The possible storage 'slots' that can be used.
label nAddPoints() const
Number of additional (decomposed) points for the mesh.
label sizeInternal1(const enum slotType slot) const
The calculated size for vtk-internal storage of the specified slot.
label sizeXml(const enum slotType slot) const
The calculated size for xml storage of the specified slot.
UList< label > labelUList
A UList of labels.
label nAddCells() const
Number of additional (decomposed) cells for the mesh.
bool operator==(const vtuSizing &rhs) const
Test equality.
void reset(const polyMesh &mesh, const bool decompose=false)
Reset sizing by analyzing the mesh.
Bookkeeping for mesh subsetting and/or polyhedral cell decomposition. Although the main use case is f...
Internal vtkUnstructuredGrid content.
label sizeOf(const enum contentType output, const enum slotType slot) const
Return the required size for the storage slot.