A collection of static methods to assist converting OpenFOAM data structures into VTK internal data structures. More...
Classes | |
| struct | Patch |
| Convert OpenFOAM patch to vtkPolyData. More... | |
Functions | |
| UList< uint8_t > | asUList (vtkUnsignedCharArray *array, const label size) |
| Wrap vtkUnsignedCharArray as a UList. | |
| UList< vtkIdType > | asUList (vtkIdTypeArray *array, const label size) |
| Wrap vtkIdTypeArray as a UList. | |
| vtkSmartPointer< vtkPoints > | NewPoints (vtkIdType count) |
| Allocate vtkPoints. | |
| vtkSmartPointer< vtkPoints > | Points (const UList< point > &pts) |
| Return a list of points as vtkPoints. | |
| vtkSmartPointer< vtkPoints > | Points (const UList< point > &pts, const labelUList &addr) |
| Return an indirect list of points as vtkPoints. | |
| template<class Face> | |
| vtkSmartPointer< vtkCellArray > | Faces (const UList< Face > &faces) |
| Convert a list of faces (or triFaces) to vtk polygon cells. | |
| vtkSmartPointer< vtkPolyData > | Vertices (const UList< point > &pts) |
| Return vtkPolyData of vertices for each point. | |
| vtkSmartPointer< vtkPolyData > | Vertices (const UList< point > &pts, const labelUList &addr) |
| Return vtkPolyData of vertices for each point. | |
| scalarMinMax | rangeOf (vtkDataArray *data) |
| Min/Max of scalar, or mag() of non-scalars. Includes nullptr check. | |
| template<class Type> | |
| void | foamToVtkTuple (float output[], const Type &value) |
| Older name for copyTuple. | |
| template<class Type> | |
| void | foamToVtkTuple (double output[], const Type &value) |
| Older name for copyTuple. | |
| template<class Type> | |
| label | transcribeFloatData (vtkDataArray *array, const UList< Type > &input, vtkIdType start=0) |
| Copy list to pre-allocated vtk array. | |
| template<class Type, class DataArrayType = vtkFloatArray> | |
| vtkSmartPointer< DataArrayType > | zeroField (const word &name, const label size) |
| Create named field initialized to zero. | |
| template<class Type, class DataArrayType = vtkFloatArray> | |
| vtkSmartPointer< DataArrayType > | convertFieldToVTK (const word &name, const UList< Type > &fld) |
| Convert field data to a vtkFloatArray. | |
| template<class Type, class DataArrayType = vtkFloatArray> | |
| vtkSmartPointer< DataArrayType > | convertFieldToVTK (const word &name, const UList< Type > &fld, const labelUList &addr) |
| Convert field data to a vtkFloatArray, using indirect addressing. | |
| vtkSmartPointer< vtkCellArray > | identityVertices (const vtkIdType size) |
| An identity list of VTK_VERTEX. | |
| template<class Type> | |
| Type | copyTuple (const Type &value) |
Return a copy of the value, with components changed from OpenFOAM order to VTK order (for symmTensor). | |
| template<class FloatType, class Type> | |
| const FloatType * | copyTuple_impl (FloatType output[], const Type &value) |
| Implementation detail - not for general use! | |
| template<class Type> | |
| const double * | copyTuple (double output[], const Type &value) |
Copy/transcribe components of OpenFOAM value to the output buffer (which must be large enough to contain all components). | |
| template<class Type> | |
| const float * | copyTuple (float output[], const Type &value) |
Copy/transcribe components of OpenFOAM value to the output buffer (which must be large enough to contain all components). | |
| template<class Type> | |
| void | reorderTuple (Type &value) |
Inplace component reordering of value from OpenFOAM order to VTK order. | |
A collection of static methods to assist converting OpenFOAM data structures into VTK internal data structures.
A collection of static methods to help with conversion to/from VTK data.
Remapping of the symmTensor order is required in input or output directions. OpenFOAM uses (XX, XY, XZ, YY, YZ, ZZ) order, VTK uses (XX, YY, ZZ, XY, YZ, XZ) order.
|
inline |
Wrap vtkUnsignedCharArray as a UList.
Definition at line 23 of file foamVtkToolsI.H.
Referenced by vtuAdaptor::internal().

|
inline |
Wrap vtkIdTypeArray as a UList.
Definition at line 36 of file foamVtkToolsI.H.
|
inline |
Allocate vtkPoints.
Definition at line 50 of file foamVtkToolsI.H.
Referenced by Points(), and Points().

Return a list of points as vtkPoints.
Definition at line 71 of file foamVtkToolsI.H.
References NewPoints(), p, and pts.
Referenced by Vertices(), and Vertices().


|
inline |
Return an indirect list of points as vtkPoints.
Definition at line 89 of file foamVtkToolsI.H.
References NewPoints(), p, pts, and UList< T >::size().

| vtkSmartPointer< vtkCellArray > Faces | ( | const UList< Face > & | faces | ) |
Convert a list of faces (or triFaces) to vtk polygon cells.
References pts.
Return vtkPolyData of vertices for each point.
Definition at line 109 of file foamVtkToolsI.H.
References identityVertices(), Points(), and pts.

|
inline |
Return vtkPolyData of vertices for each point.
Definition at line 124 of file foamVtkToolsI.H.
References identityVertices(), Points(), pts, and UList< T >::size().

|
inline |
Min/Max of scalar, or mag() of non-scalars. Includes nullptr check.
Definition at line 139 of file foamVtkToolsI.H.
References range.
| void foamToVtkTuple | ( | float | output[], |
| const Type & | value ) |
Older name for copyTuple.
Definition at line 318 of file foamVtkTools.H.
References copyTuple().

| void foamToVtkTuple | ( | double | output[], |
| const Type & | value ) |
Older name for copyTuple.
Definition at line 327 of file foamVtkTools.H.
References copyTuple().

| label transcribeFloatData | ( | vtkDataArray * | array, |
| const UList< Type > & | input, | ||
| vtkIdType | start = 0 ) |
Copy list to pre-allocated vtk array.
| [out] | array | destination (vtkFloatArray or vtkDoubleArray) can also be a nullptr (no-op) |
| start | The write offset into output array |
| vtkSmartPointer< DataArrayType > zeroField | ( | const word & | name, |
| const label | size ) |
Create named field initialized to zero.
References Foam::name().

| vtkSmartPointer< DataArrayType > convertFieldToVTK | ( | const word & | name, |
| const UList< Type > & | fld ) |
Convert field data to a vtkFloatArray.
References fld(), and Foam::name().

| vtkSmartPointer< DataArrayType > convertFieldToVTK | ( | const word & | name, |
| const UList< Type > & | fld, | ||
| const labelUList & | addr ) |
Convert field data to a vtkFloatArray, using indirect addressing.
References fld(), and Foam::name().

|
inline |
An identity list of VTK_VERTEX.
Definition at line 161 of file foamVtkToolsI.H.
References cells.
Referenced by Vertices(), and Vertices().

| Type copyTuple | ( | const Type & | value | ) |
Return a copy of the value, with components changed from OpenFOAM order to VTK order (for symmTensor).
Referenced by foamToVtkTuple(), and foamToVtkTuple().

| const FloatType * copyTuple_impl | ( | FloatType | output[], |
| const Type & | value ) |
Implementation detail - not for general use!
| const double * copyTuple | ( | double | output[], |
| const Type & | value ) |
Copy/transcribe components of OpenFOAM value to the output buffer (which must be large enough to contain all components).
output buffer, which allows this routine to act as pass-through filter. | [out] | output | the output/work buffer |
| const float * copyTuple | ( | float | output[], |
| const Type & | value ) |
Copy/transcribe components of OpenFOAM value to the output buffer (which must be large enough to contain all components).
| [out] | output | the output/work buffer |
| void reorderTuple | ( | Type & | value | ) |
Inplace component reordering of value from OpenFOAM order to VTK order.
Reordering is currently only applied for Foam::symmTensor, all other types are a no-op.