Loading...
Searching...
No Matches
vtkWrite Class Reference

Writes fields in VTK (xml or legacy) format. Writes cell-values or point-interpolated values for volFields. More...

#include <vtkWrite.H>

Inheritance diagram for vtkWrite:
Collaboration diagram for vtkWrite:

Public Member Functions

 TypeName ("vtkWrite")
 Runtime type information.
 vtkWrite (const word &name, const Time &runTime, const dictionary &dict)
 Construct from name, Time and dictionary.
 vtkWrite (const vtkWrite &)=delete
 No copy construct.
void operator= (const vtkWrite &)=delete
 No copy assignment.
virtual ~vtkWrite ()=default
 Destructor.
virtual bool read (const dictionary &dict)
 Read the vtkWrite specification.
virtual bool execute ()
 Execute - does nothing.
virtual bool write ()
 Write fields.
virtual bool end ()
 On end - cleanup internal allocations.
virtual void updateMesh (const mapPolyMesh &mpm)
 Update for changes of mesh.
virtual void movePoints (const polyMesh &mesh)
 Update for mesh point-motion.
Public Member Functions inherited from timeFunctionObject
 timeFunctionObject (const word &name, const Time &runTime)
 Construct from Time.
virtual ~timeFunctionObject ()=default
 Destructor.
const Timetime () const
 Return time database.
objectRegistrystoredObjects ()
 Write access to the output objects ("functionObjectObjects") registered on Time.
const objectRegistrystoredObjects () const
 Const access to the output objects ("functionObjectObjects") registered on Time.
Public Member Functions inherited from functionObject
 declareRunTimeSelectionTable (autoPtr, functionObject, dictionary,(const word &name, const Time &runTime, const dictionary &dict),(name, runTime, dict))
 functionObject (const word &name, const bool withNamePrefix=defaultUseNamePrefix)
 Construct from components.
autoPtr< functionObjectclone () const
 Return clone.
virtual ~functionObject ()=default
 Destructor.
virtual const wordtype () const =0
 Runtime type information.
const wordname () const noexcept
 Return the name of this functionObject.
bool useNamePrefix () const noexcept
 Return the flag for adding a scoping name prefix.
bool useNamePrefix (bool on) noexcept
 Modify the flag for adding a scoping name prefix.
virtual bool execute (const label subIndex)
 Execute using the specified subIndex.
virtual bool adjustTimeStep ()
 Called at the end of Time::adjustDeltaT() if adjustTime is true.
virtual bool filesModified () const
 Did any file get changed during execution?

Additional Inherited Members

Static Public Member Functions inherited from functionObject
static autoPtr< functionObjectNew (const word &name, const Time &runTime, const dictionary &dict)
 Select from dictionary, based on its "type" entry.
Public Attributes inherited from functionObject
bool log
 Flag to write log into Info.
Static Public Attributes inherited from functionObject
static int debug
 Flag to execute debug content.
static bool postProcess
 Global post-processing mode switch.
static bool defaultUseNamePrefix
 Global default for useNamePrefix.
static word outputPrefix
 Directory prefix.
Protected Member Functions inherited from timeFunctionObject
void clearOutputObjects (const wordList &objNames)
 Remove specified items from "functionObjectObjects".
 timeFunctionObject (const timeFunctionObject &)=delete
 No copy construct.
void operator= (const timeFunctionObject &)=delete
 No copy assignment.
Protected Member Functions inherited from functionObject
word scopedName (const word &name) const
 Return a scoped (prefixed) name.
Protected Attributes inherited from timeFunctionObject
const Timetime_
 Reference to the time database.

Detailed Description

Writes fields in VTK (xml or legacy) format. Writes cell-values or point-interpolated values for volFields.

Example of function object specification:

vtkWrite1
{
    type            vtkWrite;
    libs            (utilityFunctionObjects);
    writeControl    writeTime;
    writeInterval   1;
    format          binary;
    legacy          false;
    decompose       false;
    ...
    fields          (U p);
    // excludeFields  ("force.*");

    selection
    {
        box
        {
            action  use;
            source  box;
            box     (-0.1 -0.01 -0.1) (0.1 0.30 0.1);
        }
        dome
        {
            action  add;
            source  sphere;
            origin  (-0.1 -0.01 -0.1);
            radius  0.25;
        }
        centre
        {
            action  subtract;
            source  sphere;
            origin  (-0.1 -0.01 -0.1);
            radius  0.1;
        }
        blob
        {
            action  add;
            source  surface;
            surface triSurfaceMesh;
            name    blob.stl;
        }
    }
}


Basic Usage

Property Description Required Default
type Type name: vtkWrite yes
fields Select fields to output (wordRe list) yes
excludeFields Exclude fields from output (wordRe list) no
boundary Convert boundary fields no true
internal Convert internal fields no true
single Combine patches into a single boundary no false
interpolate Interpolate for point values no false


Output Options

Property Description Required Default
format ascii or binary format no binary
legacy Legacy VTK output no false
precision Write precision in ascii no same as IOstream
directory The output directory name no postProcessing/NAME
width Padding width for file name no 8
decompose Decompose polyhedral cells no false
writeIds Write cell,patch,proc id fields no false


Output Selection

Property Description Required Default
region Name for a single region no region0
regions List of regions (wordRe list) no
patches Limit to listed patches (wordRe list) no
excludePatches Exclude specified patches no
selection Cell selection (topoSet actions) no empty dict
Note
The region of interest is defined by the selection dictionary as a set of actions (use,add,subtract,subset,invert). Omitting the selection dictionary is the same as specifying the conversion of all cells (in the selected regions). Omitting the patches entry is the same as specifying the conversion of all patches.
See also
Foam::functionObjects::ensightWrite Foam::functionObjects::fvMeshFunctionObject Foam::functionObjects::timeControl Foam::cellBitSet::select
Source files

Definition at line 265 of file vtkWrite.H.

Constructor & Destructor Documentation

◆ vtkWrite() [1/2]

vtkWrite ( const word & name,
const Time & runTime,
const dictionary & dict )

Construct from name, Time and dictionary.

References dict, functionObject::name(), and runTime.

Referenced by operator=(), and vtkWrite().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ vtkWrite() [2/2]

vtkWrite ( const vtkWrite & )
delete

No copy construct.

References vtkWrite().

Here is the call graph for this function:

◆ ~vtkWrite()

virtual ~vtkWrite ( )
virtualdefault

Destructor.

Member Function Documentation

◆ TypeName()

TypeName ( "vtkWrite" )

Runtime type information.

◆ operator=()

void operator= ( const vtkWrite & )
delete

No copy assignment.

References vtkWrite().

Here is the call graph for this function:

◆ read()

virtual bool read ( const dictionary & dict)
virtual

Read the vtkWrite specification.

Reimplemented from functionObject.

References dict.

◆ execute()

virtual bool execute ( )
virtual

Execute - does nothing.

Implements functionObject.

◆ write()

virtual bool write ( )
virtual

Write fields.

Implements functionObject.

◆ end()

virtual bool end ( )
virtual

On end - cleanup internal allocations.

Reimplemented from functionObject.

◆ updateMesh()

virtual void updateMesh ( const mapPolyMesh & mpm)
virtual

Update for changes of mesh.

Reimplemented from functionObject.

◆ movePoints()

virtual void movePoints ( const polyMesh & mesh)
virtual

Update for mesh point-motion.

Reimplemented from functionObject.

References mesh.


The documentation for this class was generated from the following file:
  • src/functionObjects/utilities/vtkWrite/vtkWrite.H