Public Member Functions | List of all members
internalWriter Class Reference

Write an OpenFOAM volume (internal) geometry and internal fields as a vtu file or a legacy vtk file. More...

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

Public Member Functions

 internalWriter (const polyMesh &mesh, const vtk::vtuCells &cells, const vtk::outputOptions opts=vtk::formatType::INLINE_BASE64)
 
 internalWriter (const polyMesh &mesh, const vtk::vtuCells &cells, const fileName &file, bool parallel=Pstream::parRun())
 
 internalWriter (const polyMesh &mesh, const vtk::vtuCells &cells, const vtk::outputOptions opts, const fileName &file, bool parallel=Pstream::parRun())
 
virtual ~internalWriter ()=default
 
template<class Type , template< class > class PatchField>
void write (const GeometricField< Type, PatchField, pointMesh > &field)
 
template<class Type >
void write (const DimensionedField< Type, volMesh > &field)
 
template<class Type , template< class > class PatchField>
void write (const GeometricField< Type, PatchField, volMesh > &field)
 
template<class Type >
void write (const DimensionedField< Type, volMesh > &vfield, const volPointInterpolation &pInterp)
 
template<class Type >
void write (const GeometricField< Type, fvPatchField, volMesh > &vfield, const volPointInterpolation &pInterp)
 
- Public Member Functions inherited from internalMeshWriter
 internalMeshWriter (const polyMesh &mesh, const vtk::vtuCells &cells, const vtk::outputOptions opts=vtk::formatType::INLINE_BASE64)
 
 internalMeshWriter (const polyMesh &mesh, const vtk::vtuCells &cells, const fileName &file, bool parallel=Pstream::parRun())
 
 internalMeshWriter (const polyMesh &mesh, const vtk::vtuCells &cells, const vtk::outputOptions opts, const fileName &file, bool parallel=Pstream::parRun())
 
virtual ~internalMeshWriter ()=default
 
virtual bool beginFile (std::string title="")
 
virtual bool writeGeometry ()
 
virtual bool beginCellData (label nFields=0)
 
virtual bool beginPointData (label nFields=0)
 
void writeCellIDs ()
 
bool writeProcIDs ()
 
void writePointIDs ()
 
template<class Type >
void writeUniform (const word &fieldName, const Type &val)
 
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 internalMeshWriter
static word ext (vtk::outputOptions opts)
 
- Static Public Attributes inherited from internalMeshWriter
static int debug = 0
 
- Protected Types inherited from fileWriter
enum  outputState {
  CLOSED = 0, OPENED, DECLARED, FIELD_DATA,
  PIECE, CELL_DATA, POINT_DATA
}
 
- 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 internalMeshWriter
label numberOfPoints_
 
label numberOfCells_
 
const polyMeshmesh_
 
const vtuCellsvtuCells_
 
- 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 an OpenFOAM volume (internal) geometry and internal fields as a vtu 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.
See also
Foam::vtk::internalMeshWriter
Source files

Definition at line 68 of file foamVtkInternalWriter.H.

Constructor & Destructor Documentation

◆ internalWriter() [1/3]

internalWriter ( const polyMesh mesh,
const vtk::vtuCells cells,
const vtk::outputOptions  opts = vtk::formatType::INLINE_BASE64 
)
inline

Definition at line 87 of file foamVtkInternalWriter.H.

◆ internalWriter() [2/3]

internalWriter ( const polyMesh mesh,
const vtk::vtuCells cells,
const fileName file,
bool  parallel = Pstream::parRun() 
)
inline

Definition at line 100 of file foamVtkInternalWriter.H.

◆ internalWriter() [3/3]

internalWriter ( const polyMesh mesh,
const vtk::vtuCells cells,
const vtk::outputOptions  opts,
const fileName file,
bool  parallel = Pstream::parRun() 
)
inline

Definition at line 113 of file foamVtkInternalWriter.H.

◆ ~internalWriter()

virtual ~internalWriter ( )
virtualdefault

Member Function Documentation

◆ write() [1/5]

void write ( const GeometricField< Type, PatchField, pointMesh > &  field)

◆ write() [2/5]

void write ( const DimensionedField< Type, volMesh > &  field)

Definition at line 79 of file foamVtkInternalWriterTemplates.C.

References field().

Here is the call graph for this function:

◆ write() [3/5]

void write ( const GeometricField< Type, PatchField, volMesh > &  field)

Definition at line 89 of file foamVtkInternalWriterTemplates.C.

References field().

Here is the call graph for this function:

◆ write() [4/5]

void write ( const DimensionedField< Type, volMesh > &  vfield,
const volPointInterpolation pInterp 
)

◆ write() [5/5]

void write ( const GeometricField< Type, fvPatchField, volMesh > &  vfield,
const volPointInterpolation pInterp 
)

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