Write OpenFOAM patches and patch fields in VTP or legacy vtk format. More...


Public Member Functions | |
| patchWriter (const patchWriter &)=delete | |
| No copy construct. More... | |
| void | operator= (const patchWriter &)=delete |
| No copy assignment. More... | |
| patchWriter (const polyMesh &mesh, const labelUList &patchIDs, const vtk::outputOptions opts=vtk::formatType::INLINE_BASE64, const bool useNearCellValue=false) | |
| Construct from components (default format INLINE_BASE64) More... | |
| patchWriter (const polyMesh &mesh, const labelUList &patchIDs, const fileName &file, bool parallel=UPstream::parRun()) | |
| Construct from components (default format INLINE_BASE64), and open the file for writing. More... | |
| patchWriter (const polyMesh &mesh, const labelUList &patchIDs, const vtk::outputOptions opts, const fileName &file, bool parallel=UPstream::parRun()) | |
| Construct from components (default format INLINE_BASE64), and open the file for writing. More... | |
| virtual | ~patchWriter ()=default |
| Destructor. More... | |
| bool | useCellValue () const noexcept |
| Use patch internal field values? More... | |
| bool | useCellValue (bool on) noexcept |
| Select use of patch internal field values. More... | |
| template<class Type , template< class > class PatchField> | |
| void | write (const GeometricField< Type, PatchField, pointMesh > &field) |
| Write point field. More... | |
| template<class Type , template< class > class PatchField> | |
| void | write (const GeometricField< Type, PatchField, volMesh > &field) |
| Write volume field. More... | |
| template<class Type > | |
| void | write (const GeometricField< Type, fvPatchField, volMesh > &field, const PrimitivePatchInterpolation< primitivePatch > &pInterp) |
| Write volume field with point interpolation. More... | |
| template<class Type > | |
| void | write (const GeometricField< Type, fvPatchField, volMesh > &field, const PrimitivePatchInterpolation< primitivePatch > *pInterp) |
| Write volume field with point interpolation. More... | |
| patchWriter (const polyMesh &mesh, const labelUList &patchIDs, const vtk::outputOptions opts, const bool useNearCellValue, const fileName &file, bool parallel=UPstream::parRun()) | |
Construct with useNearCellValue setting. More... | |
Public Member Functions inherited from patchMeshWriter | |
| patchMeshWriter (const patchMeshWriter &)=delete | |
| No copy construct. More... | |
| void | operator= (const patchMeshWriter &)=delete |
| No copy assignment. More... | |
| patchMeshWriter (const polyMesh &mesh, const labelUList &patchIDs, const vtk::outputOptions opts=vtk::formatType::INLINE_BASE64) | |
| Construct from components (default format INLINE_BASE64) More... | |
| patchMeshWriter (const polyMesh &mesh, const labelUList &patchIDs, const fileName &file, bool parallel=UPstream::parRun()) | |
| Construct from components (default format INLINE_BASE64), and open the file for writing. More... | |
| patchMeshWriter (const polyMesh &mesh, const labelUList &patchIDs, const vtk::outputOptions opts, const fileName &file, bool parallel=UPstream::parRun()) | |
| Construct from components and open the file for writing. More... | |
| virtual | ~patchMeshWriter ()=default |
| Destructor. More... | |
| const labelList & | patchIDs () const noexcept |
| The patch IDs. More... | |
| virtual bool | beginFile (std::string title="") |
| Write file header (non-collective) More... | |
| virtual bool | writeGeometry () |
| Write patch topology. More... | |
| virtual bool | beginCellData (label nFields=0) |
| Begin CellData output section for specified number of fields. More... | |
| virtual bool | beginPointData (label nFields=0) |
| Begin PointData for specified number of fields. More... | |
| void | writePatchIDs () |
| Write patch ids as CellData. More... | |
| bool | writeProcIDs () |
| Write processor ids for each line as CellData or for each point as PointData, depending on isPointData() state. No-op in serial. More... | |
| bool | writeNeighIDs () |
| Write processor neighbour ids as CellData. This is no-op in serial. More... | |
| template<class Type > | |
| void | writeUniform (const word &fieldName, const Type &val) |
| Write a uniform field of Cell (Face) or Point values. More... | |
Public Member Functions inherited from fileWriter | |
| fileWriter (const vtk::fileTag contentType, const vtk::outputOptions opts) | |
| Construct from components. More... | |
| virtual | ~fileWriter () |
| Destructor. More... | |
| vtk::fileTag | contentType () const noexcept |
| The content type. More... | |
| vtk::outputOptions | opts () const noexcept |
| The output options in use. More... | |
| word | ext () const |
| File extension for current format type. More... | |
| bool | legacy () const noexcept |
| Commonly used query. More... | |
| bool | parallel () const noexcept |
| Parallel output requested? More... | |
| const word & | state () const |
| The output state in printable format. More... | |
| const fileName & | output () const noexcept |
| The current output file name. More... | |
| virtual bool | open (const fileName &file, bool parallel=UPstream::parRun()) |
| Open file for writing (creates parent directory). More... | |
| void | close () |
| End the file contents and close the file after writing. More... | |
| bool | beginFieldData (label nFields=0) |
| Begin FieldData output section for specified number of fields. More... | |
| bool | isCellData () const noexcept |
| True if output state corresponds to CELL_DATA. More... | |
| bool | isPointData () const noexcept |
| True if output state corresponds to POINT_DATA. More... | |
| label | nCellData () const noexcept |
| The number of CellData written for the Piece thus far. More... | |
| label | nPointData () const noexcept |
| The number of PointData written for the Piece thus far. More... | |
| bool | endFieldData () |
| Explicitly end FieldData output and switch to DECLARED state. More... | |
| bool | endCellData () |
| Explicitly end CellData output and switch to PIECE state. More... | |
| bool | endPointData () |
| Explicitly end PointData output and switch to PIECE state. More... | |
| void | writeTimeValue (scalar timeValue) |
| Write "TimeValue" FieldData (name as per Catalyst output) More... | |
Additional Inherited Members | |
Static Public Member Functions inherited from patchMeshWriter | |
| static word | ext (vtk::outputOptions opts) |
| File extension for given output type. More... | |
Protected Types inherited from fileWriter | |
| enum | outputState : uint8_t { CLOSED = 0, OPENED, DECLARED, FIELD_DATA, PIECE, CELL_DATA, POINT_DATA } |
| Internal tracking of the output state. More... | |
Protected Member Functions inherited from patchMeshWriter | |
| label | nTotalPoints () const noexcept |
| Total number of field points for the current Piece. More... | |
| label | nTotalCells () const noexcept |
| Total number of field cells (faces) for the current Piece. More... | |
| void | beginPiece () |
| Determine sizes and begin piece. More... | |
| void | writePoints () |
| Write patch points. More... | |
| void | writePolys_legacy () |
| Write patch faces, legacy format. More... | |
| void | writePolys () |
| Write patch faces. More... | |
Protected Member Functions inherited from fileWriter | |
| void | checkFormatterValidity () const |
| Verify that formatter in either allocated or not required. More... | |
| Ostream & | reportBadState (Ostream &, outputState expected) const |
| Generate message reporting bad writer state. More... | |
| Ostream & | reportBadState (Ostream &, outputState, outputState) const |
| Generate message reporting bad writer state. More... | |
| std::ofstream & | os () noexcept |
| The backend ostream in use. More... | |
| vtk::formatter & | format () |
| The VTK formatter in use. FatalError for off-processor. More... | |
| bool | isState (outputState test) const noexcept |
| True if output state corresponds to the test state. More... | |
| bool | notState (outputState test) const noexcept |
| True if output state does not correspond to the test state. More... | |
| template<class Type > | |
| void | beginDataArray (const word &fieldName, const label nValues) |
| Start of a field or DataArray output (legacy or non-legacy). More... | |
| void | endDataArray () |
| Flush formatter and end of DataArray output (non-legacy) More... | |
| void | beginPoints (const label nPoints) |
| Start of a POINTS DataArray. More... | |
| void | endPoints () |
| End of a POINTS DataArray. More... | |
| bool | enter_Piece () |
| Trigger change state to Piece. Resets nCellData_, nPointData_. More... | |
| bool | endPiece () |
| Explicitly end Piece output and switch to DECLARED state. More... | |
| bool | enter_CellData (label nEntries, label nFields) |
| Trigger change state to CellData. More... | |
| bool | enter_PointData (label nEntries, label nFields) |
| Trigger change state to PointData. More... | |
| bool | exit_File () |
| Emit file footer (end data, end piece, end file) More... | |
| template<class Type > | |
| void | writeUniform (const word &fieldName, const Type &val, const label nValues) |
| Write uniform field content. More... | |
| template<class Type > | |
| void | writeBasicField (const word &fieldName, const UList< Type > &field) |
| Write basic (primitive) field content. More... | |
| bool | writeProcIDs (const label nValues) |
| Write nValues of processor ids as CellData or PointData (no-op in serial) More... | |
| fileWriter (const fileWriter &)=delete | |
| No copy construct. More... | |
| void | operator= (const fileWriter &)=delete |
| No copy assignment. More... | |
Protected Attributes inherited from patchMeshWriter | |
| const polyMesh & | mesh_ |
| Reference to the OpenFOAM mesh (or subset) More... | |
| labelList | patchIDs_ |
| The selected patch ids. More... | |
| OffsetRange< label > | pointSlab_ |
| Slab addressing for field points of the current Piece. More... | |
| OffsetRange< label > | cellSlab_ |
| Slab addressing for field cells (faces) for the current Piece. More... | |
| OffsetRange< label > | connectivitySlab_ |
| Slab addressing for cell (face) connectivity count, which is just the sum of the face sizes. More... | |
Protected Attributes inherited from fileWriter | |
| outputState | state_ |
| The output state. More... | |
| vtk::fileTag | contentType_ |
| The content type (PolyData, UnstructuredGrid ...) More... | |
| bool | parallel_ |
| Parallel writing (via master) More... | |
| vtk::outputOptions | opts_ |
| Requested output options. More... | |
| label | nCellData_ |
| The number of CellData written for the Piece thus far. More... | |
| label | nPointData_ |
| The number of PointData written for the Piece thus far. More... | |
| fileName | outputFile_ |
| The output file name. More... | |
| autoPtr< vtk::formatter > | format_ |
| The VTK formatter in use (only valid on master process) More... | |
| std::ofstream | os_ |
| The backend ostream in use (only opened on master process) More... | |
Static Protected Attributes inherited from fileWriter | |
| static const Enum< outputState > | stateNames |
| Names for the output state (for messages, not for file output). More... | |
Write OpenFOAM patches and patch fields in VTP or legacy vtk format.
The file output states are managed by the Foam::vtk::fileWriter class. FieldData (eg, TimeValue) must appear before any geometry pieces.
Definition at line 64 of file foamVtkPatchWriter.H.
|
delete |
No copy construct.
|
inline |
Construct from components (default format INLINE_BASE64)
| useNearCellValue | Use patch internal instead of patch face values |
Definition at line 96 of file foamVtkPatchWriter.H.
|
inline |
Construct from components (default format INLINE_BASE64), and open the file for writing.
The file name is with/without an extension.
Definition at line 115 of file foamVtkPatchWriter.H.
|
inline |
Construct from components (default format INLINE_BASE64), and open the file for writing.
The file name is with/without an extension.
Definition at line 133 of file foamVtkPatchWriter.H.
|
virtualdefault |
Destructor.
|
inline |
Construct with useNearCellValue setting.
| useNearCellValue | Use patch internal instead of patch face values |
Definition at line 227 of file foamVtkPatchWriter.H.
|
delete |
No copy assignment.
|
inlinenoexcept |
Use patch internal field values?
Definition at line 159 of file foamVtkPatchWriter.H.
|
inlinenoexcept |
Select use of patch internal field values.
Definition at line 169 of file foamVtkPatchWriter.H.
| void write | ( | const GeometricField< Type, PatchField, pointMesh > & | field | ) |
Write point field.
| void write | ( | const GeometricField< Type, PatchField, volMesh > & | field | ) |
Write volume field.
| void write | ( | const GeometricField< Type, fvPatchField, volMesh > & | field, |
| const PrimitivePatchInterpolation< primitivePatch > & | pInterp | ||
| ) |
Write volume field with point interpolation.
| void write | ( | const GeometricField< Type, fvPatchField, volMesh > & | field, |
| const PrimitivePatchInterpolation< primitivePatch > * | pInterp | ||
| ) |
Write volume field with point interpolation.