Write surfaces fields (as PointData) in VTP format. Legacy VTK format is intentionally not supported. More...
Static Public Member Functions | |
static word | ext (vtk::outputOptions) |
Additional Inherited Members | |
![]() | |
enum | outputState { CLOSED = 0, OPENED, DECLARED, FIELD_DATA, PIECE, CELL_DATA, POINT_DATA } |
![]() | |
void | checkFormatterValidity () const |
Ostream & | reportBadState (Ostream &, outputState expected) const |
Ostream & | reportBadState (Ostream &, outputState, outputState) const |
std::ofstream & | os () noexcept |
vtk::formatter & | format () |
bool | isState (outputState test) const noexcept |
bool | notState (outputState test) const noexcept |
template<class Type > | |
void | beginDataArray (const word &fieldName, const label nValues) |
void | endDataArray () |
void | beginPoints (const label nPoints) |
void | endPoints () |
bool | enter_Piece () |
bool | endPiece () |
bool | enter_CellData (label nEntries, label nFields) |
bool | enter_PointData (label nEntries, label nFields) |
bool | exit_File () |
template<class Type > | |
void | writeUniform (const word &fieldName, const Type &val, const label nValues) |
template<class Type > | |
void | writeBasicField (const word &fieldName, const UList< Type > &field) |
bool | writeProcIDs (const label nValues) |
fileWriter (const fileWriter &)=delete | |
void | operator= (const fileWriter &)=delete |
![]() | |
vtk::fileTag | contentType_ |
outputOptions | opts_ |
bool | parallel_ |
outputState | state_ |
label | nCellData_ |
label | nPointData_ |
fileName | outputFile_ |
autoPtr< vtk::formatter > | format_ |
std::ofstream | os_ |
![]() | |
static const Enum< outputState > | stateNames |
Write surfaces fields (as PointData) in VTP format. Legacy VTK format is intentionally not supported.
The file output is structured as HEAD, FIELD_DATA, PIECE followed by any CELL_DATA or POINT_DATA. These states are tracked internally to help detect logic errors.
The FieldData element is to be placed prior to writing any geometry Piece. This moves the information to the front of the output file for visibility and simplifies the logic.
Definition at line 67 of file foamVtkSurfaceFieldWriter.H.
surfaceFieldWriter | ( | const fvMesh & | mesh, |
const vtk::outputOptions | opts = vtk::formatType::INLINE_BASE64 |
||
) |
Definition at line 55 of file foamVtkSurfaceFieldWriter.C.
References fileWriter::legacy().
surfaceFieldWriter | ( | const fvMesh & | mesh, |
const fileName & | file, | ||
bool | parallel = Pstream::parRun() |
||
) |
Definition at line 70 of file foamVtkSurfaceFieldWriter.C.
surfaceFieldWriter | ( | const fvMesh & | mesh, |
const vtk::outputOptions | opts, | ||
const fileName & | file, | ||
bool | parallel = Pstream::parRun() |
||
) |
Definition at line 83 of file foamVtkSurfaceFieldWriter.C.
|
virtualdefault |
|
inlinestatic |
Definition at line 135 of file foamVtkSurfaceFieldWriter.H.
References Foam::vtk::fileExtension, and Foam::vtk::POLY_DATA.
|
virtual |
Reimplemented from fileWriter.
Definition at line 98 of file foamVtkSurfaceFieldWriter.C.
References fileWriter::beginFile(), and Foam::name().
|
virtual |
Implements fileWriter.
Definition at line 128 of file foamVtkSurfaceFieldWriter.C.
References Foam::vtk::legacy::beginPoints(), format(), Foam::vtk::NUMBER_OF_POINTS, Foam::vtk::PIECE, Foam::reduce(), Foam::vtk::writeList(), and Foam::vtk::writeListParallel().
|
virtual |
Implements fileWriter.
Definition at line 187 of file foamVtkSurfaceFieldWriter.C.
|
virtual |
Implements fileWriter.
Definition at line 194 of file foamVtkSurfaceFieldWriter.C.
void write | ( | const surfaceVectorField & | field | ) |
Definition at line 201 of file foamVtkSurfaceFieldWriter.C.
References boundary, Foam::endl(), Foam::exit(), Foam::FatalError, FatalErrorInFunction, field(), Foam::nl, Foam::expressions::POINT_DATA, Foam::reduce(), Foam::vtk::writeList(), and Foam::vtk::writeListParallel().
Copyright © 2011-2018 OpenFOAM | OPENFOAM® is a registered trademark of OpenCFD Ltd.