Write lagrangian (cloud) positions and fields (as PointData) in VTP format. Legacy VTK format is intentionally not supported since the VTP format provides much better field selection in ParaView, and for consistency with the Foam::functionObjects::vtkCloud function object. More...
Public Member Functions | |
lagrangianWriter (const fvMesh &mesh, const word &cloudName, const vtk::outputOptions opts=vtk::formatType::INLINE_BASE64, bool useVerts=false) | |
lagrangianWriter (const fvMesh &mesh, const word &cloudName, const fileName &file, bool parallel=Pstream::parRun()) | |
lagrangianWriter (const fvMesh &mesh, const word &cloudName, const vtk::outputOptions opts, const fileName &file, bool parallel=Pstream::parRun()) | |
virtual | ~lagrangianWriter ()=default |
virtual bool | beginFile (std::string title="") |
virtual bool | writeGeometry () |
bool | beginParcelData () |
bool | endParcelData () |
template<class Type > | |
void | write (const IOField< Type > &field) |
template<class Type > | |
label | writeFields (const wordList &fieldNames, bool verbose=true) |
template<class Type > | |
label | writeFields (const IOobjectList &objects, bool verbose=true) |
template<class Type > | |
Foam::label | writeFields (const wordList &fieldNames, bool verbose) |
template<class Type > | |
Foam::label | writeFields (const IOobjectList &objects, const bool verbose) |
![]() | |
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 () |
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) |
Protected Member Functions | |
virtual bool | beginCellData (label nFields=0) |
virtual bool | beginPointData (label nFields=0) |
![]() | |
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 |
Additional Inherited Members | |
![]() | |
enum | outputState { CLOSED = 0, OPENED, DECLARED, FIELD_DATA, PIECE, CELL_DATA, POINT_DATA } |
![]() | |
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 lagrangian (cloud) positions and fields (as PointData) in VTP format. Legacy VTK format is intentionally not supported since the VTP format provides much better field selection in ParaView, and for consistency with the Foam::functionObjects::vtkCloud function object.
The file output states are managed by the Foam::vtk::fileWriter class. FieldData (eg, TimeValue) must appear before any geometry pieces.
Definition at line 66 of file foamVtkLagrangianWriter.H.
lagrangianWriter | ( | const fvMesh & | mesh, |
const word & | cloudName, | ||
const vtk::outputOptions | opts = vtk::formatType::INLINE_BASE64 , |
||
bool | useVerts = false |
||
) |
Definition at line 111 of file foamVtkLagrangianWriter.C.
References fileWriter::legacy().
lagrangianWriter | ( | const fvMesh & | mesh, |
const word & | cloudName, | ||
const fileName & | file, | ||
bool | parallel = Pstream::parRun() |
||
) |
Definition at line 130 of file foamVtkLagrangianWriter.C.
lagrangianWriter | ( | const fvMesh & | mesh, |
const word & | cloudName, | ||
const vtk::outputOptions | opts, | ||
const fileName & | file, | ||
bool | parallel = Pstream::parRun() |
||
) |
Definition at line 144 of file foamVtkLagrangianWriter.C.
|
virtualdefault |
|
protectedvirtual |
Implements fileWriter.
Definition at line 96 of file foamVtkLagrangianWriter.C.
|
protectedvirtual |
Implements fileWriter.
Definition at line 102 of file foamVtkLagrangianWriter.C.
|
inlinestatic |
Definition at line 174 of file foamVtkLagrangianWriter.H.
References Foam::vtk::fileExtension, and Foam::vtk::POLY_DATA.
|
virtual |
Reimplemented from fileWriter.
Definition at line 160 of file foamVtkLagrangianWriter.C.
References fileWriter::beginFile(), and Foam::name().
|
virtual |
Implements fileWriter.
Definition at line 182 of file foamVtkLagrangianWriter.C.
References format(), Foam::vtk::NUMBER_OF_POINTS, Foam::vtk::NUMBER_OF_VERTS, Foam::vtk::PIECE, Foam::expressions::POINT_DATA, Foam::vtk::POINTS, Foam::reduce(), Foam::vtk::writeList(), and Foam::vtk::writeListParallel().
bool beginParcelData | ( | ) |
Definition at line 271 of file foamVtkLagrangianWriter.C.
References Foam::vtk::legacy::beginCellData(), and Foam::vtk::legacy::beginPointData().
bool endParcelData | ( | ) |
Definition at line 284 of file foamVtkLagrangianWriter.C.
void write | ( | const IOField< Type > & | field | ) |
Definition at line 28 of file foamVtkLagrangianWriterTemplates.C.
References Foam::endl(), Foam::exit(), Foam::FatalError, FatalErrorInFunction, field(), fileWriter::isState(), fileWriter::nCellData_, Foam::nl, fileWriter::nPointData_, Foam::expressions::POINT_DATA, and fileWriter::reportBadState().
label writeFields | ( | const IOobjectList & | objects, |
bool | verbose = true |
||
) |
Definition at line 68 of file foamVtkLagrangianWriterTemplates.C.
References Foam::endl(), field(), fieldNames(), Foam::Info, IOobject::READ_IF_PRESENT, Foam::returnReduce(), and IOobject::typeHeaderOk().
Foam::label writeFields | ( | const IOobjectList & | objects, |
const bool | verbose | ||
) |
Definition at line 134 of file foamVtkLagrangianWriterTemplates.C.
References IOobjectList::allNames().
Copyright © 2011-2018 OpenFOAM | OPENFOAM® is a registered trademark of OpenCFD Ltd.