34 Foam::vtk::vtuCells::vtuCells
42 decomposeRequest_(decompose),
52 Foam::vtk::vtuCells::vtuCells
65 Foam::vtk::vtuCells::vtuCells
79 Foam::vtk::vtuCells::vtuCells
94 void Foam::vtk::vtuCells::resize_all()
96 cellTypes_.resize(nFieldCells());
98 vertOffset_.resize(sizeOf(output_, slotType::CELLS_OFFSETS));
100 faceOffset_.resize(sizeOf(output_, slotType::FACES_OFFSETS));
104 void Foam::vtk::vtuCells::populateOutput(
const polyMesh&
mesh)
112 case contentType::LEGACY:
124 case contentType::XML:
139 case contentType::INTERNAL1:
140 case contentType::INTERNAL2:
159 void Foam::vtk::vtuCells::populateOutput(
const UList<cellShape>& shapes)
161 if (output_ != contentType::LEGACY && output_ != contentType::XML)
164 <<
"Internal formats not supported for shape cells - using XML" 167 output_ = contentType::XML;
179 case contentType::LEGACY:
191 case contentType::XML:
209 <<
"Unhandled VTK format " << int(output_) <<
nl 237 populateOutput(
mesh);
250 if (selectionMode() == selectionModeType::SUBSET_MESH)
252 maps_.cellMap() = subsetCellsIds;
255 populateOutput(
mesh);
262 const enum contentType
output,
267 decomposeRequest_ = decompose;
278 if (output_ != contentType::LEGACY && output_ != contentType::XML)
281 <<
"VTK internal format is not supported for shape cells" 282 <<
" switching to xml" <<
nl <<
nl;
284 output_ = contentType::XML;
287 decomposeRequest_ =
false;
297 case contentType::LEGACY:
309 case contentType::XML:
327 <<
"Unhandled VTK format " << int(output_) <<
nl 337 maps_.additionalIds() = cellIds;
338 setNumAddPoints(maps_.additionalIds().size());
344 maps_.renumberCells(mapping);
350 maps_.renumberPoints(mapping);
errorManipArg< error, int > exit(error &err, const int errNo=1)
contentType
Types of content that the storage may represent.
error FatalError
Error stream (stdout output on all processes), with additional 'FOAM FATAL ERROR' header text and sta...
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
void resetShapes(const UList< cellShape > &shapes)
Reset sizing using primitive shapes only (ADVANCED USAGE)
constexpr char nl
The newline '\n' character (0x0a)
void reset(const polyMesh &mesh, const bool decompose=false)
Reset sizing by analyzing the mesh.
Encapsulated combinations of output format options. This is primarily useful when defining the output...
labelList identity(const label len, label start=0)
Return an identity map of the given length with (map[i] == i), works like std::iota() but returning a...
void renumberCells(const labelUList &mapping)
Renumber cell ids to account for subset meshes.
label nCells() const noexcept
Number of cells for the mesh.
void renumberPoints(const labelUList &mapping)
Renumber point ids to account for subset meshes.
const labelList & addPointCellLabels() const noexcept
Additional point addressing (from added point to original cell)
void clear()
Reset all sizes to zero.
Sizing descriptions and routines for transcribing an OpenFOAM volume mesh into a VTK unstructured gri...
#define WarningInFunction
Report a warning using Foam::Warning.
static Ostream & output(Ostream &os, const IntRange< T > &range)
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 reset(const polyMesh &mesh)
Create the geometry using the previously requested output and decomposition types.
A deep-copy description of an OpenFOAM volume mesh in data structures suitable for VTK UnstructuredGr...