30 inline vtkSmartPointer<vtkPoints>
45 vtkpoints->SetNumberOfPoints(
pts.size() + addPoints.
size());
48 vtkIdType pointId = 0;
51 vtkpoints->SetPoint(pointId++,
p.v_);
55 for (
const label meshCelli : addPoints)
57 vtkpoints->SetPoint(pointId++,
mesh.cellCentres()[meshCelli].v_);
64 inline vtkSmartPointer<vtkPoints>
78 const labelUList& addPoints = this->additionalIds();
80 vtkpoints->SetNumberOfPoints(pointMap.
size() + addPoints.
size());
83 vtkIdType pointId = 0;
84 for (
const label meshPointi : pointMap)
86 vtkpoints->SetPoint(pointId++,
pts[meshPointi].v_);
90 for (
const label meshCelli : addPoints)
92 vtkpoints->SetPoint(pointId++,
mesh.cellCentres()[meshCelli].v_);
99 inline vtkSmartPointer<vtkUnstructuredGrid>
103 const bool decompPoly
108 #ifdef VTK_CELL_ARRAY_V2
109 vtk::vtuSizing::contentType::INTERNAL2
111 vtk::vtuSizing::contentType::INTERNAL1
142 sizing.
sizeOf(
output, vtk::vtuSizing::slotType::CELLS_OFFSETS)
146 #ifdef VTK_CELL_ARRAY_V2 181 sizing.
sizeOf(
output, vtk::vtuSizing::slotType::FACES_OFFSETS)
190 cellsUL, cellOffsetsUL,
191 facesUL, faceLocationsUL,
192 static_cast<foamVtkMeshMaps&>(*
this),
200 vtkmesh->SetPoints(this->
points(mesh));
202 #ifdef VTK_CELL_ARRAY_V2 205 cells->SetData(cellOffsets, cellConnect);
219 vtkmesh->SetCells(
cellTypes, cellOffsets,
cells, faceLocations, faces);
223 vtkmesh->SetCells(
cellTypes, cellOffsets,
cells,
nullptr,
nullptr);
void size(const label n)
Older name for setAddressableSize.
contentType
Types of content that the storage may represent.
tmp< DimensionedField< TypeR, GeoMesh > > New(const tmp< DimensionedField< TypeR, GeoMesh >> &tf1, const word &name, const dimensionSet &dimensions, const bool initCopy=false)
Global function forwards to reuseTmpDimensionedField::New.
const labelList & additionalIds() const noexcept
Any additional (user) labels.
const labelList & cellTypes
A Vector of values with scalar precision, where scalar is float/double depending on the compilation f...
void populateInternal(const polyMesh &mesh, UList< uint8_t > &cellTypes, UList< int > &connectivity, UList< int > &offsets, UList< int > &faces, UList< int > &facesOffsets, foamVtkMeshMaps &maps, const enum contentType output) const
Populate lists for Internal VTK format.
label nFieldCells() const noexcept
Number of field cells = nCells + nAddCells.
vtkSmartPointer< vtkUnstructuredGrid > internal(const fvMesh &mesh, const bool decompPoly=false)
Internal mesh as vtkUnstructuredGrid.
Sizing descriptions and routines for transcribing an OpenFOAM volume mesh into a VTK unstructured gri...
Mesh data needed to do the Finite Volume discretisation.
vtkSmartPointer< vtkPoints > points(const fvMesh &mesh) const
The vtk points for the mesh (and decomposition)
label sizeOf(const enum contentType output, const enum slotType slot) const
Return the required size for the storage slot.
static Ostream & output(Ostream &os, const IntRange< T > &range)