Loading...
Searching...
No Matches
vtuAdaptor Class Reference

Bookkeeping for vtkUnstructuredGrid. More...

#include <foamVtkVtuAdaptor.H>

Inheritance diagram for vtuAdaptor:
Collaboration diagram for vtuAdaptor:

Public Member Functions

vtkSmartPointer< vtkPoints > NewPoints (vtkIdType count) const
 Allocate vtkPoints.
vtkSmartPointer< vtkPoints > points (const polyMesh &mesh) const
 The vtk points for the mesh (and decomposition).
vtkSmartPointer< vtkPoints > points (const polyMesh &mesh, const labelUList &pointMap) const
 The vtk points for the mesh (and decomposition) using the provided pointMap.
vtkSmartPointer< vtkUnstructuredGrid > internal (const fvMesh &mesh, const bool decompPoly=false)
 Internal mesh as vtkUnstructuredGrid.
template<class Type, class DataArrayType = vtkFloatArray>
vtkSmartPointer< DataArrayType > convertField (const DimensionedField< Type, volMesh > &fld) const
 Convert internal volume field (CellData).
template<class Type, class DataArrayType = vtkFloatArray>
vtkSmartPointer< DataArrayType > convertField (const GeometricField< Type, fvPatchField, volMesh > &fld) const
 Convert internal volume field (CellData).
Public Member Functions inherited from Caching< vtkUnstructuredGrid >
uint64_t nPoints () const
 Number of points associated with the geometry.
void clearGeom ()
 Clear geometry and dataset.
vtkSmartPointer< dataTypegetCopy () const
 Return a shallow copy of vtkgeom for manipulation.
void reuse ()
 Make a shallow copy of vtkgeom into dataset.
void set (vtkSmartPointer< dataType > geom)
 Set the geometry and make a shallow copy to dataset.
void PrintSelf (std::ostream &os) const
 Report basic information to output.
Public Member Functions inherited from foamVtkMeshMaps
 foamVtkMeshMaps ()=default
 Default construct: zero-sized, no reserved sizes.
const labelListcellMap () const noexcept
 Original cell ids for all cells (regular and decomposed).
DynamicList< label > & cellMap () noexcept
 Write access to original cell ids.
const labelListpointMap () const noexcept
 Point labels for subsetted meshes.
DynamicList< label > & pointMap () noexcept
 Write access to point labels for subsetted meshes.
const labelListadditionalIds () const noexcept
 Any additional (user) labels.
DynamicList< label > & additionalIds () noexcept
 Write access to additional (user) labels.
void clear ()
 Clear sizing.
void renumberCells (const labelUList &mapping)
 Renumber cell ids (cellMap and additionalIds) to account for subset meshes.
void renumberPoints (const labelUList &mapping)
 Renumber point ids (pointMap) to account for subset meshes.

Additional Inherited Members

Public Types inherited from Caching< vtkUnstructuredGrid >
typedef vtkUnstructuredGrid dataType
 The VTK geometry data type.
Public Attributes inherited from Caching< vtkUnstructuredGrid >
vtkSmartPointer< dataTypevtkgeom
 The geometry, without any cell/point data.
vtkSmartPointer< dataTypedataset
 The shallow-copy of geometry, plus additional data.

Detailed Description

Bookkeeping for vtkUnstructuredGrid.

A low-level backend adaptor for converting OpenFOAM volume meshes/fields to VTK internal representation. The output is a single piece vtkUnstructuredGrid dataset. Multiblock composition is done by the caller.

Note
This was originally part of the catalystFvMesh function object backend, which was prototyped in the ParaView reader module. This adaptor unifies many common elements of both.
Source files

Definition at line 72 of file foamVtkVtuAdaptor.H.

Member Function Documentation

◆ NewPoints()

vtkSmartPointer< vtkPoints > NewPoints ( vtkIdType count) const
inline

Allocate vtkPoints.

Definition at line 24 of file foamVtkVtuAdaptorI.H.

Referenced by points(), and points().

Here is the caller graph for this function:

◆ points() [1/2]

vtkSmartPointer< vtkPoints > points ( const polyMesh & mesh) const
inline

The vtk points for the mesh (and decomposition).

Definition at line 45 of file foamVtkVtuAdaptorI.H.

References foamVtkMeshMaps::additionalIds(), mesh, NewPoints(), p, pts, and UList< T >::size().

Here is the call graph for this function:

◆ points() [2/2]

vtkSmartPointer< vtkPoints > points ( const polyMesh & mesh,
const labelUList & pointMap ) const
inline

The vtk points for the mesh (and decomposition) using the provided pointMap.

Definition at line 82 of file foamVtkVtuAdaptorI.H.

References foamVtkMeshMaps::additionalIds(), mesh, NewPoints(), p, foamVtkMeshMaps::pointMap(), pts, and UList< T >::size().

Here is the call graph for this function:

◆ internal()

vtkSmartPointer< vtkUnstructuredGrid > internal ( const fvMesh & mesh,
const bool decompPoly = false )
inline

Internal mesh as vtkUnstructuredGrid.

Calling this automatically populates the sizing and vtk::Caching

Parameters
decompPolyRequest polyhedral decomposition

Definition at line 121 of file foamVtkVtuAdaptorI.H.

References Foam::vtk::Tools::asUList(), vtuSizing::CELLS, cells, vtuSizing::CELLS_OFFSETS, cellTypes, vtuSizing::FACES, vtuSizing::FACES_OFFSETS, foamVtkMeshMaps::foamVtkMeshMaps(), vtuSizing::INTERNAL1, vtuSizing::INTERNAL2, mesh, vtuSizing::nFieldCells(), points, vtuSizing::populateInternal(), UList< T >::size(), and vtuSizing::sizeOf().

Here is the call graph for this function:

◆ convertField() [1/2]

template<class Type, class DataArrayType = vtkFloatArray>
vtkSmartPointer< DataArrayType > convertField ( const DimensionedField< Type, volMesh > & fld) const

Convert internal volume field (CellData).

References fld().

Here is the call graph for this function:

◆ convertField() [2/2]

template<class Type, class DataArrayType = vtkFloatArray>
vtkSmartPointer< DataArrayType > convertField ( const GeometricField< Type, fvPatchField, volMesh > & fld) const

Convert internal volume field (CellData).

References fld().

Here is the call graph for this function:

The documentation for this class was generated from the following files: