Writes fields in VTK (xml or legacy) format. Writes cell-values or point-interpolated values for volFields. More...
Public Member Functions | |
TypeName ("vtkWrite") | |
Runtime type information. More... | |
vtkWrite (const word &name, const Time &runTime, const dictionary &dict) | |
Construct from Time and dictionary. More... | |
virtual | ~vtkWrite ()=default |
Destructor. More... | |
virtual bool | read (const dictionary &dict) |
Read the vtkWrite specification. More... | |
virtual bool | execute () |
Execute - does nothing. More... | |
virtual bool | write () |
Write fields. More... | |
virtual bool | end () |
On end - cleanup internal allocations. More... | |
virtual void | updateMesh (const mapPolyMesh &mpm) |
Update for changes of mesh. More... | |
virtual void | movePoints (const polyMesh &mesh) |
Update for mesh point-motion. More... | |
template<class GeoField > | |
Foam::label | writeVolFields (autoPtr< vtk::internalWriter > &internalWriter, UPtrList< vtk::patchWriter > &patchWriters, const fvMeshSubset &proxy, const wordHashSet &acceptField) const |
template<class GeoField > | |
Foam::label | writeVolFields (autoPtr< vtk::internalWriter > &internalWriter, const autoPtr< volPointInterpolation > &pInterp, UPtrList< vtk::patchWriter > &patchWriters, const UPtrList< PrimitivePatchInterpolation< primitivePatch >> &patchInterps, const fvMeshSubset &proxy, const wordHashSet &acceptField) const |
![]() | |
timeFunctionObject (const word &name, const Time &runTime) | |
Construct from Time. More... | |
virtual | ~timeFunctionObject ()=default |
Destructor. More... | |
const Time & | time () const |
Return time database. More... | |
objectRegistry & | storedObjects () |
const objectRegistry & | storedObjects () const |
![]() | |
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. More... | |
autoPtr< functionObject > | clone () const |
Return clone. More... | |
virtual | ~functionObject ()=default |
Destructor. More... | |
virtual const word & | type () const =0 |
Runtime type information. More... | |
const word & | name () const noexcept |
Return the name of this functionObject. More... | |
bool | useNamePrefix () const noexcept |
Return the flag for adding a scoping name prefix. More... | |
bool | useNamePrefix (bool on) noexcept |
Modify the flag for adding a scoping name prefix. More... | |
virtual bool | execute (const label subIndex) |
Execute using the specified subIndex. More... | |
virtual bool | adjustTimeStep () |
Called at the end of Time::adjustDeltaT() if adjustTime is true. More... | |
virtual bool | filesModified () const |
Did any file get changed during execution? More... | |
Additional Inherited Members | |
![]() | |
static autoPtr< functionObject > | New (const word &name, const Time &runTime, const dictionary &dict) |
Select from dictionary, based on its "type" entry. More... | |
![]() | |
bool | log |
Flag to write log into Info. More... | |
![]() | |
static int | debug |
Flag to execute debug content. More... | |
static bool | postProcess |
Global post-processing mode switch. More... | |
static bool | defaultUseNamePrefix |
Global default for useNamePrefix. More... | |
static word | outputPrefix |
Directory prefix. More... | |
![]() | |
void | clearOutputObjects (const wordList &objNames) |
Remove specified items from "functionObjectObjects". More... | |
timeFunctionObject (const timeFunctionObject &)=delete | |
No copy construct. More... | |
void | operator= (const timeFunctionObject &)=delete |
No copy assignment. More... | |
![]() | |
word | scopedName (const word &name) const |
Return a scoped (prefixed) name. More... | |
![]() | |
const Time & | time_ |
Reference to the time database. More... | |
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); 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 | Fields to output (wordRe list) | yes | |
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 | |
selection | Cell selection (topoSet actions) | no | empty dict |
Definition at line 254 of file vtkWrite.H.
vtkWrite | ( | const word & | name, |
const Time & | runTime, | ||
const dictionary & | dict | ||
) |
Construct from Time and dictionary.
Definition at line 121 of file vtkWrite.C.
References dict, and Foam::read().
|
virtualdefault |
Destructor.
TypeName | ( | "vtkWrite" | ) |
Runtime type information.
|
virtual |
Read the vtkWrite specification.
Reimplemented from functionObject.
Definition at line 164 of file vtkWrite.C.
References IOstreamOption::ASCII, IOstreamOption::BINARY, IOstream::defaultPrecision(), dict, IOstreamOption::formatEnum(), Foam::vtk::INLINE_BASE64, Foam::name(), functionObject::outputPrefix, and functionObject::read().
|
virtual |
|
virtual |
Write fields.
Implements functionObject.
Definition at line 251 of file vtkWrite.C.
References vtmWriter::add(), seriesWriter::append(), seriesWriter::base(), objectRegistry::count(), polyMesh::defaultRegion, seriesWriter::empty(), Foam::endl(), Foam::vtk::legacy::fileExtension, forAll, patchIdentifier::index(), Foam::Info, internalWriter, k, seriesWriter::load(), UPstream::master(), patchIdentifier::name(), Foam::name(), objectRegistry::names(), nDimFields, autoPtr< T >::New(), Foam::nl, nPatchWriters, word::null, nVolFields, outputName(), UPstream::parRun(), patches, patchId(), patchIds, patchInterps, patchWriters, pInterp, word::printf(), regionDir, regionName, vtmWriter::setTime(), update(), Foam::fieldTypes::volume, vtmBoundaries, vtmOutputBase(), vtmWriter, seriesWriter::write(), vtmWriter::write(), and Foam::writeAllVolFields().
|
virtual |
On end - cleanup internal allocations.
Reimplemented from functionObject.
Definition at line 756 of file vtkWrite.C.
|
virtual |
Update for changes of mesh.
Reimplemented from functionObject.
Definition at line 271 of file vtkWriteUpdate.C.
References polyMesh::TOPO_CHANGE.
|
virtual |
Update for mesh point-motion.
Reimplemented from functionObject.
Definition at line 277 of file vtkWriteUpdate.C.
References polyMesh::POINTS_MOVED, and polyMesh::UNCHANGED.
Foam::label writeVolFields | ( | autoPtr< vtk::internalWriter > & | internalWriter, |
UPtrList< vtk::patchWriter > & | patchWriters, | ||
const fvMeshSubset & | proxy, | ||
const wordHashSet & | acceptField | ||
) | const |
Definition at line 32 of file vtkWriteTemplates.C.
References fvMeshSubset::baseMesh(), Foam::BitOps::count(), Foam::endl(), field(), objectRegistry::findObject(), internalWriter, Foam::fac::interpolate(), Log, patchWriters, objectRegistry::sortedNames(), and writer< Type >::write().
Foam::label writeVolFields | ( | autoPtr< vtk::internalWriter > & | internalWriter, |
const autoPtr< volPointInterpolation > & | pInterp, | ||
UPtrList< vtk::patchWriter > & | patchWriters, | ||
const UPtrList< PrimitivePatchInterpolation< primitivePatch >> & | patchInterps, | ||
const fvMeshSubset & | proxy, | ||
const wordHashSet & | acceptField | ||
) | const |
Definition at line 102 of file vtkWriteTemplates.C.
References fvMeshSubset::baseMesh(), Foam::BitOps::count(), Foam::endl(), field(), objectRegistry::findObject(), internalWriter, Foam::fac::interpolate(), Log, patchInterps, patchWriters, pInterp, objectRegistry::sortedNames(), and writer< Type >::write().