Public Member Functions | List of all members
lineWriter Class Reference

Write edge/points (optionally with fields) as a vtp file or a legacy vtk file. More...

Inheritance diagram for lineWriter:
Inheritance graph
[legend]
Collaboration diagram for lineWriter:
Collaboration graph
[legend]

Public Member Functions

 lineWriter (const pointField &pts, const edgeList &edges, const vtk::outputOptions opts=vtk::formatType::INLINE_BASE64)
 
 lineWriter (const pointField &pts, const edgeList &edges, const fileName &file, bool parallel=Pstream::parRun())
 
 lineWriter (const pointField &pts, const edgeList &edges, const vtk::outputOptions opts, const fileName &file, bool parallel=Pstream::parRun())
 
virtual ~lineWriter ()=default
 
virtual void setTime (const instant &inst)
 
virtual bool beginFile (std::string title="")
 
virtual bool writeGeometry ()
 
void writeTimeValue ()
 
void piece (const pointField &points, const edgeList &edges)
 
bool writeProcIDs ()
 
template<class Type >
void writeUniform (const word &fieldName, const Type &val)
 
- Public Member Functions inherited from polyWriter
 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
 
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)
 
- Public Member Functions inherited from fileWriter
 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 wordstate () const
 
const fileNameoutput () 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)
 

Additional Inherited Members

- Static Public Member Functions inherited from polyWriter
static word ext (vtk::outputOptions opts)
 
- Protected Types inherited from fileWriter
enum  outputState {
  CLOSED = 0, OPENED, DECLARED, FIELD_DATA,
  PIECE, CELL_DATA, POINT_DATA
}
 
- Protected Member Functions inherited from polyWriter
template<class Type >
void writeUniformValue (const label nCellValues, const word &fieldName, const Type &val)
 
- Protected Member Functions inherited from fileWriter
void checkFormatterValidity () const
 
OstreamreportBadState (Ostream &, outputState expected) const
 
OstreamreportBadState (Ostream &, outputState, outputState) const
 
std::ofstream & os () noexcept
 
vtk::formatterformat ()
 
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 inherited from polyWriter
label numberOfPoints_
 
label numberOfCells_
 
label nLocalPoints_
 
label nLocalLines_
 
label nLocalPolys_
 
- Protected Attributes inherited from fileWriter
vtk::fileTag contentType_
 
outputOptions opts_
 
bool parallel_
 
outputState state_
 
label nCellData_
 
label nPointData_
 
fileName outputFile_
 
autoPtr< vtk::formatterformat_
 
std::ofstream os_
 
- Static Protected Attributes inherited from fileWriter
static const Enum< outputStatestateNames
 

Detailed Description

Write edge/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.

Note
Parallel output is combined into a single Piece without point merging, which is similar to using multi-piece data sets, but allows more convenient creation as a streaming process. In the future, the duplicate points at processor connections may be addressed using ghost points.
Source files

Definition at line 61 of file foamVtkLineWriter.H.

Constructor & Destructor Documentation

◆ lineWriter() [1/3]

lineWriter ( const pointField pts,
const edgeList edges,
const vtk::outputOptions  opts = vtk::formatType::INLINE_BASE64 
)

Definition at line 26 of file foamVtkLineWriter.C.

◆ lineWriter() [2/3]

lineWriter ( const pointField pts,
const edgeList edges,
const fileName file,
bool  parallel = Pstream::parRun() 
)

Definition at line 41 of file foamVtkLineWriter.C.

◆ lineWriter() [3/3]

lineWriter ( const pointField pts,
const edgeList edges,
const vtk::outputOptions  opts,
const fileName file,
bool  parallel = Pstream::parRun() 
)

Definition at line 55 of file foamVtkLineWriter.C.

◆ ~lineWriter()

virtual ~lineWriter ( )
virtualdefault

Member Function Documentation

◆ setTime()

void setTime ( const instant inst)
virtual

Definition at line 71 of file foamVtkLineWriter.C.

◆ beginFile()

bool beginFile ( std::string  title = "")
virtual

Reimplemented from fileWriter.

Definition at line 77 of file foamVtkLineWriter.C.

References fileWriter::beginFile().

Here is the call graph for this function:

◆ writeGeometry()

bool writeGeometry ( )
virtual

Reimplemented from polyWriter.

Definition at line 97 of file foamVtkLineWriter.C.

◆ writeTimeValue()

void writeTimeValue ( )

Definition at line 103 of file foamVtkLineWriter.C.

References fileWriter::writeTimeValue().

Here is the call graph for this function:

◆ piece()

void piece ( const pointField points,
const edgeList edges 
)

Definition at line 113 of file foamVtkLineWriter.C.

References points.

◆ writeProcIDs()

bool writeProcIDs ( )

Definition at line 125 of file foamVtkLineWriter.C.

References fileWriter::writeProcIDs().

Here is the call graph for this function:

◆ writeUniform()

void writeUniform ( const word fieldName,
const Type &  val 
)
inline

Definition at line 159 of file foamVtkLineWriter.H.

References polyWriter::nLocalLines_.


The documentation for this class was generated from the following files: