vtuAdaptor Class Reference

Bookkeeping for vtkUnstructuredGrid. More...

Inheritance diagram for vtuAdaptor:
[legend]
Collaboration diagram for vtuAdaptor:
[legend]

Public Member Functions

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

Static Public Member Functions

template<class Type >
static vtkSmartPointer< vtkFloatArray > convertField (const DimensionedField< Type, volMesh > &fld, const vtuAdaptor &vtuData)
 Convert internal volume field (CellData) More...
 
template<class Type >
static vtkSmartPointer< vtkFloatArray > convertField (const GeometricField< Type, fvPatchField, volMesh > &fld, const vtuAdaptor &vtuData)
 Convert internal volume field (CellData) More...
 

Additional Inherited Members

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

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 73 of file foamVtkVtuAdaptor.H.

Member Function Documentation

◆ points() [1/2]

vtkSmartPointer< vtkPoints > points ( const fvMesh mesh) const
inline

The vtk points for the mesh (and decomposition)

Definition at line 31 of file foamVtkVtuAdaptorI.H.

References foamVtkMeshMaps::additionalIds(), primitiveMesh::cellCentres(), mesh, p, polyMesh::points(), and UList< T >::size().

Here is the call graph for this function:

◆ points() [2/2]

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

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

Definition at line 65 of file foamVtkVtuAdaptorI.H.

References mesh, 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

Definition at line 100 of file foamVtkVtuAdaptorI.H.

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

Here is the call graph for this function:

◆ convertField() [1/4]

vtkSmartPointer< vtkFloatArray > convertField ( const DimensionedField< Type, volMesh > &  fld,
const vtuAdaptor vtuData 
)
static

Convert internal volume field (CellData)

Definition at line 38 of file foamVtkVtuAdaptorTemplates.C.

References foamVtkMeshMaps::cellMap(), fld(), Foam::vtk::Tools::foamToVtkTuple(), and UList< T >::size().

Here is the call graph for this function:

◆ convertField() [2/4]

vtkSmartPointer< vtkFloatArray > convertField ( const GeometricField< Type, fvPatchField, volMesh > &  fld,
const vtuAdaptor vtuData 
)
static

Convert internal volume field (CellData)

Definition at line 75 of file foamVtkVtuAdaptorTemplates.C.

References fld().

Here is the call graph for this function:

◆ convertField() [3/4]

vtkSmartPointer< vtkFloatArray > convertField ( const DimensionedField< Type, volMesh > &  fld) const

Convert internal volume field (CellData)

Definition at line 87 of file foamVtkVtuAdaptorTemplates.C.

References fld().

Here is the call graph for this function:

◆ convertField() [4/4]

vtkSmartPointer< vtkFloatArray > convertField ( const GeometricField< Type, fvPatchField, volMesh > &  fld) const

Convert internal volume field (CellData)

Definition at line 98 of file foamVtkVtuAdaptorTemplates.C.

References fld().

Here is the call graph for this function:

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