Write faces/points (optionally with fields) as a vtp file or a legacy vtk file. More...
Public Member Functions | |
polyWriter (const vtk::outputOptions opts=vtk::formatType::INLINE_BASE64) | |
polyWriter (const fileName &file, bool parallel=Pstream::parRun()) | |
polyWriter (const vtk::outputOptions opts, const fileName &file, bool parallel=Pstream::parRun()) | |
virtual | ~polyWriter ()=default |
virtual bool | writeGeometry () |
bool | writeLineGeometry (const pointField &points, const edgeList &edges) |
bool | writePolyGeometry (const pointField &points, const faceList &faces) |
virtual bool | beginCellData (label nFields=0) |
virtual bool | beginPointData (label nFields=0) |
template<class Type > | |
void | write (const word &fieldName, const UList< Type > &field) |
template<class Type > | |
void | writeCellData (const word &fieldName, const UList< Type > &field) |
template<class Type > | |
void | writePointData (const word &fieldName, const UList< Type > &field) |
![]() | |
fileWriter (const vtk::fileTag contentType, const vtk::outputOptions opts) | |
virtual | ~fileWriter () |
vtk::fileTag | contentType () const |
vtk::outputOptions | opts () const |
word | ext () const |
bool | legacy () const |
bool | parallel () const noexcept |
const word & | state () const |
const fileName & | output () const noexcept |
bool | open (const fileName &file, bool parallel=Pstream::parRun()) |
void | close () |
virtual bool | beginFile (std::string title="") |
bool | beginFieldData (label nFields=0) |
label | nCellData () const noexcept |
label | nPointData () const noexcept |
bool | endFieldData () |
bool | endCellData () |
bool | endPointData () |
void | writeTimeValue (scalar timeValue) |
Static Public Member Functions | |
static word | ext (vtk::outputOptions opts) |
Protected Member Functions | |
template<class Type > | |
void | writeUniformValue (const label nCellValues, const word &fieldName, const Type &val) |
![]() | |
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 |
Protected Attributes | |
label | numberOfPoints_ |
label | numberOfCells_ |
label | nLocalPoints_ |
label | nLocalLines_ |
label | nLocalPolys_ |
![]() | |
vtk::fileTag | contentType_ |
outputOptions | opts_ |
bool | parallel_ |
outputState | state_ |
label | nCellData_ |
label | nPointData_ |
fileName | outputFile_ |
autoPtr< vtk::formatter > | format_ |
std::ofstream | os_ |
Additional Inherited Members | |
![]() | |
enum | outputState { CLOSED = 0, OPENED, DECLARED, FIELD_DATA, PIECE, CELL_DATA, POINT_DATA } |
![]() | |
static const Enum< outputState > | stateNames |
Write faces/points (optionally with fields) as a vtp file or a legacy vtk file.
The file output states are managed by the Foam::vtk::fileWriter class. FieldData (eg, TimeValue) must appear before any geometry pieces.
Definition at line 63 of file foamVtkPolyWriter.H.
|
explicit |
Definition at line 556 of file foamVtkPolyWriter.C.
|
explicit |
Definition at line 573 of file foamVtkPolyWriter.C.
polyWriter | ( | const vtk::outputOptions | opts, |
const fileName & | file, | ||
bool | parallel = Pstream::parRun() |
||
) |
Definition at line 586 of file foamVtkPolyWriter.C.
|
virtualdefault |
|
protected |
Definition at line 25 of file foamVtkPolyWriterTemplates.C.
References Foam::endl(), Foam::exit(), Foam::FatalError, FatalErrorInFunction, Foam::nl, and Foam::expressions::POINT_DATA.
|
inlinestatic |
Definition at line 175 of file foamVtkPolyWriter.H.
References outputOptions::ext(), fileWriter::opts(), and Foam::vtk::POLY_DATA.
|
virtual |
Implements fileWriter.
Reimplemented in GenericPatchWriter< PatchType >, lineWriter, and surfaceWriter.
Definition at line 600 of file foamVtkPolyWriter.C.
References Foam::abort(), Foam::endl(), Foam::FatalError, FatalErrorInFunction, and Foam::nl.
bool writeLineGeometry | ( | const pointField & | points, |
const edgeList & | edges | ||
) |
Definition at line 612 of file foamVtkPolyWriter.C.
References globalIndex::localStart(), and points.
bool writePolyGeometry | ( | const pointField & | points, |
const faceList & | faces | ||
) |
Definition at line 642 of file foamVtkPolyWriter.C.
References globalIndex::localStart(), and points.
Referenced by GenericPatchWriter< PatchType >::writeGeometry().
|
virtual |
Implements fileWriter.
Definition at line 671 of file foamVtkPolyWriter.C.
|
virtual |
Implements fileWriter.
Definition at line 677 of file foamVtkPolyWriter.C.
Definition at line 65 of file foamVtkPolyWriterTemplates.C.
References Foam::endl(), Foam::exit(), Foam::FatalError, FatalErrorInFunction, field(), Foam::nl, and Foam::expressions::POINT_DATA.
Definition at line 102 of file foamVtkPolyWriterTemplates.C.
References Foam::endl(), Foam::exit(), Foam::FatalError, FatalErrorInFunction, field(), and Foam::nl.
Definition at line 129 of file foamVtkPolyWriterTemplates.C.
References Foam::endl(), Foam::exit(), Foam::FatalError, FatalErrorInFunction, field(), Foam::nl, and Foam::expressions::POINT_DATA.
|
protected |
Definition at line 72 of file foamVtkPolyWriter.H.
|
protected |
Definition at line 75 of file foamVtkPolyWriter.H.
|
protected |
Definition at line 78 of file foamVtkPolyWriter.H.
|
protected |
Definition at line 81 of file foamVtkPolyWriter.H.
Referenced by lineWriter::writeUniform().
|
protected |
Definition at line 84 of file foamVtkPolyWriter.H.
Referenced by GenericPatchWriter< PatchType >::writeProcIDs(), and surfaceWriter::writeUniform().
Copyright © 2011-2018 OpenFOAM | OPENFOAM® is a registered trademark of OpenCFD Ltd.