Write OpenFOAM patches and patch fields in VTP or legacy vtk format. More...
Static Public Member Functions | |
static word | ext (vtk::outputOptions opts) |
Protected Member Functions | |
void | beginPiece () |
void | writePoints () |
void | writePolysLegacy (const label pointOffset) |
void | writePolys (const label pointOffset) |
patchMeshWriter (const patchMeshWriter &)=delete | |
void | operator= (const patchMeshWriter &)=delete |
![]() | |
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 | nLocalPolys_ |
label | nLocalVerts_ |
const polyMesh & | mesh_ |
labelList | patchIDs_ |
![]() | |
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 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 63 of file foamVtkPatchMeshWriter.H.
|
protecteddelete |
patchMeshWriter | ( | const polyMesh & | mesh, |
const labelList & | patchIDs, | ||
const vtk::outputOptions | opts = vtk::formatType::INLINE_BASE64 |
||
) |
Definition at line 354 of file foamVtkPatchMeshWriter.C.
patchMeshWriter | ( | const polyMesh & | mesh, |
const labelList & | patchIDs, | ||
const fileName & | file, | ||
bool | parallel = Pstream::parRun() |
||
) |
Definition at line 376 of file foamVtkPatchMeshWriter.C.
patchMeshWriter | ( | const polyMesh & | mesh, |
const labelList & | patchIDs, | ||
const vtk::outputOptions | opts, | ||
const fileName & | file, | ||
bool | parallel = Pstream::parRun() |
||
) |
Definition at line 390 of file foamVtkPatchMeshWriter.C.
|
virtualdefault |
|
protected |
Definition at line 29 of file foamVtkPatchMeshWriter.C.
References polyMesh::boundaryMesh(), f(), fileWriter::format(), fileWriter::format_, fileWriter::legacy(), patchMeshWriter::mesh_, patchMeshWriter::nLocalPoints_, patchMeshWriter::nLocalPolys_, patchMeshWriter::nLocalVerts_, PrimitivePatch< FaceList, PointField >::nPoints(), Foam::vtk::NUMBER_OF_POINTS, Foam::vtk::NUMBER_OF_POLYS, patchMeshWriter::numberOfCells_, patchMeshWriter::numberOfPoints_, fileWriter::parallel_, patches, patchId(), patchMeshWriter::patchIDs_, Foam::vtk::PIECE, Foam::reduce(), and formatter::tag().
|
protected |
Definition at line 77 of file foamVtkPatchMeshWriter.C.
References Foam::vtk::legacy::beginPoints(), UPstream::blocking, format(), PrimitivePatch< FaceList, PointField >::localPoints(), UPstream::master(), UPstream::masterNo(), nPatches, patches, patchId(), UPstream::subProcs(), and Foam::vtk::writeList().
|
protected |
Definition at line 139 of file foamVtkPatchMeshWriter.C.
References Foam::vtk::legacy::beginPolys(), Foam::exit(), f(), Foam::FatalError, FatalErrorInFunction, format(), PrimitivePatch< FaceList, PointField >::localFaces(), PrimitivePatch< FaceList, PointField >::nPoints(), patches, patchId(), Foam::reduce(), Foam::vtk::writeList(), and Foam::vtk::writeListParallel().
|
protected |
Definition at line 210 of file foamVtkPatchMeshWriter.C.
References Foam::vtk::CONNECTIVITY, f(), format(), PrimitivePatch< FaceList, PointField >::localFaces(), globalIndex::localStart(), PrimitivePatch< FaceList, PointField >::nPoints(), Foam::vtk::OFFSETS, patches, patchId(), Foam::vtk::POLYS, Foam::reduce(), Foam::vtk::writeList(), and Foam::vtk::writeListParallel().
|
protecteddelete |
|
inlinestatic |
Definition at line 164 of file foamVtkPatchMeshWriter.H.
References outputOptions::ext(), fileWriter::opts(), and Foam::vtk::POLY_DATA.
|
inlinenoexcept |
Definition at line 170 of file foamVtkPatchMeshWriter.H.
References patchMeshWriter::patchIDs_.
|
virtual |
Reimplemented from fileWriter.
Definition at line 406 of file foamVtkPatchMeshWriter.C.
References fileWriter::beginFile(), and Foam::name().
|
virtual |
Implements fileWriter.
Definition at line 456 of file foamVtkPatchMeshWriter.C.
References globalIndex::localStart().
|
virtual |
Implements fileWriter.
Definition at line 482 of file foamVtkPatchMeshWriter.C.
|
virtual |
Implements fileWriter.
Definition at line 488 of file foamVtkPatchMeshWriter.C.
void writePatchIDs | ( | ) |
Definition at line 494 of file foamVtkPatchMeshWriter.C.
References UPstream::blocking, Foam::endl(), Foam::exit(), Foam::FatalError, FatalErrorInFunction, format(), UPstream::master(), UPstream::masterNo(), Foam::nl, patches, patchId(), Foam::reduce(), UPstream::subProcs(), and Foam::vtk::write().
bool writeProcIDs | ( | ) |
Definition at line 579 of file foamVtkPatchMeshWriter.C.
References fileWriter::writeProcIDs().
bool writeNeighIDs | ( | ) |
Definition at line 585 of file foamVtkPatchMeshWriter.C.
References UPstream::blocking, Foam::endl(), Foam::exit(), Foam::FatalError, FatalErrorInFunction, format(), UPstream::master(), UPstream::masterNo(), Foam::nl, UPstream::parRun(), patches, patchId(), Foam::reduce(), Foam::returnReduce(), UPstream::subProcs(), and Foam::vtk::write().
void writeUniform | ( | const word & | fieldName, |
const Type & | val | ||
) |
Definition at line 28 of file foamVtkPatchMeshWriterTemplates.C.
References Foam::endl(), Foam::exit(), Foam::FatalError, FatalErrorInFunction, Foam::nl, and Foam::expressions::POINT_DATA.
|
protected |
Definition at line 72 of file foamVtkPatchMeshWriter.H.
Referenced by patchMeshWriter::beginPiece().
|
protected |
Definition at line 75 of file foamVtkPatchMeshWriter.H.
Referenced by patchMeshWriter::beginPiece().
|
protected |
Definition at line 78 of file foamVtkPatchMeshWriter.H.
Referenced by patchMeshWriter::beginPiece().
|
protected |
Definition at line 81 of file foamVtkPatchMeshWriter.H.
Referenced by patchMeshWriter::beginPiece().
|
protected |
Definition at line 84 of file foamVtkPatchMeshWriter.H.
Referenced by patchMeshWriter::beginPiece().
|
protected |
Definition at line 87 of file foamVtkPatchMeshWriter.H.
Referenced by patchMeshWriter::beginPiece().
|
protected |
Definition at line 90 of file foamVtkPatchMeshWriter.H.
Referenced by patchMeshWriter::beginPiece(), and patchMeshWriter::patchIDs().
Copyright © 2011-2018 OpenFOAM | OPENFOAM® is a registered trademark of OpenCFD Ltd.