A coordSet(s) writer in gnuplot format. More...
#include <gnuplotCoordSetWriter.H>


Public Member Functions | |
| TypeNameNoDebug ("gnuplot") | |
| Runtime type information (no debug). | |
| gnuplotWriter () | |
| Default construct. | |
| gnuplotWriter (const dictionary &options) | |
| Default construct with specified options. | |
| gnuplotWriter (const coordSet &coords, const fileName &outputPath, const dictionary &options=dictionary()) | |
| Construct from components. | |
| gnuplotWriter (const UPtrList< coordSet > &tracks, const fileName &outputPath, const dictionary &options=dictionary()) | |
| Construct from components. | |
| virtual | ~gnuplotWriter () |
| Destructor. Calls close(). | |
| virtual bool | buffering (const bool on) |
| Enable/disable internal buffering. | |
| virtual fileName | path () const |
| Characteristic output file name - information only. | |
| declareCoordSetWriterWriteMethod (label) | |
| declareCoordSetWriterWriteMethod (scalar) | |
| declareCoordSetWriterWriteMethod (vector) | |
| declareCoordSetWriterWriteMethod (sphericalTensor) | |
| declareCoordSetWriterWriteMethod (symmTensor) | |
| declareCoordSetWriterWriteMethod (tensor) | |
| template<class Type> | |
| Foam::fileName | writeTemplate (const word &fieldName, const Field< Type > &values) |
| template<class Type> | |
| Foam::fileName | writeTemplate (const word &fieldName, const List< Field< Type > > &fieldValues) |
| template<class Type> | |
| Foam::fileName | writeTemplate (const word &fieldName, const UPtrList< const Field< Type > > &fieldPtrs) |
| Public Member Functions inherited from coordSetWriter | |
| TypeName ("coordSetWriter") | |
| Runtime type information. | |
| declareRunTimeSelectionTable (autoPtr, coordSetWriter, word,(),()) | |
| declareRunTimeSelectionTable (autoPtr, coordSetWriter, wordDict,(const dictionary &writeOptions),(writeOptions)) | |
| coordSetWriter () | |
| Default construct. | |
| coordSetWriter (const dictionary &options) | |
| Default construct with specified options. | |
| virtual | ~coordSetWriter () |
| Destructor. Calls close(). | |
| virtual bool | buffering () const |
| True if the format uses internal buffering (eg, column output). | |
| virtual bool | enabled () const |
| The writer is enabled. If the writer is not enabled, it may be possible for the caller to skip various preparatory operations. | |
| virtual bool | needsUpdate () const |
| Does the writer need an update (eg, lagging behind other changes). | |
| virtual bool | wroteData () const |
| Geometry or fields written since the last open? | |
| virtual bool | expire () |
| Mark that content changed and the writer will need an update, and set nFields = 0. | |
| virtual void | clear () |
| Close any open output, remove coordSet associations and expire the writer. | |
| virtual void | setCoordinates (const coordSet *coords) |
| Set coordinates, can also be nullptr. | |
| virtual void | setCoordinates (const coordSet &coords) |
| Set coordinates. | |
| virtual void | setTracks (const UPtrList< coordSet > &tracks) |
| Set track coordinates. | |
| virtual void | setTrackTimes (const UList< scalarField > ×) |
| Set track times. | |
| label | numPoints () const |
| The number of associated points (local processor). | |
| label | numTracks () const |
| The number of coordinate tracks. | |
| bool | hasCoords () const |
| Writer is associated with content. | |
| bool | empty () const |
| Writer is not associated with content. | |
| bool | is_open () const noexcept |
| Test if outputPath has been set. | |
| label | nFields () const noexcept |
| The number of expected output fields. | |
| label | nFields (const label n) noexcept |
| Set the number of expected output fields. | |
| bool | useTracks () const noexcept |
| Prefer tracks to points during single set writing. | |
| bool | useTracks (const bool on) noexcept |
| Enable/disable tracks preference. | |
| bool | useTimeDir () const noexcept |
| Should a time directory be spliced into the output path? | |
| bool | useTimeDir (const bool on) noexcept |
| Enable/disable use of spliced output path. | |
| bool | verbose () const noexcept |
| Get output verbosity. | |
| bool | verbose (bool on) noexcept |
| Enable/disable verbose output. | |
| bool | hasTime () const |
| True if there is a known time. | |
| const word & | timeName () const |
| The current time value/name. | |
| scalar | timeValue () const |
| The current time value/name. | |
| void | setTime (const instant &inst) |
| Set the current time. | |
| void | setTime (scalar timeValue) |
| Set current time from timeValue, auto generating the name. | |
| void | setTime (scalar timeValue, const word &timeName) |
| Set current time from timeValue and timeName. | |
| void | unsetTime () |
| Clear the current time. | |
| virtual void | beginTime (const Time &t) |
| Begin a time-step. | |
| virtual void | beginTime (const instant &inst) |
| Begin a time-step. | |
| virtual void | endTime () |
| End a time-step. | |
| virtual void | open (const fileName &outputPath) |
| Write separate geometry to file. | |
| virtual void | open (const coordSet &coords, const fileName &outputPath) |
| Open from components. | |
| virtual void | open (const UPtrList< coordSet > &tracks, const fileName &outputPath) |
| Open from components. | |
| virtual void | close (bool force=false) |
| Finish output, performing any necessary cleanup. | |
| virtual InfoProxy< coordSetWriter > | info () const |
| Return info proxy, used to print information to a stream. | |
| virtual fileName | write (const word &fieldName, const Field< label > &field)=0 |
| Write field of label (point data). | |
| virtual fileName | write (const word &fieldName, const List< Field< label > > &fieldValues)=0 |
| Write track fields of label (point data). | |
| virtual fileName | write (const word &fieldName, const Field< scalar > &field)=0 |
| Write field of scalar (point data). | |
| virtual fileName | write (const word &fieldName, const List< Field< scalar > > &fieldValues)=0 |
| Write track fields of scalar (point data). | |
| virtual fileName | write (const word &fieldName, const Field< vector > &field)=0 |
| Write field of vector (point data). | |
| virtual fileName | write (const word &fieldName, const List< Field< vector > > &fieldValues)=0 |
| Write track fields of vector (point data). | |
| virtual fileName | write (const word &fieldName, const Field< sphericalTensor > &field)=0 |
| Write field of sphericalTensor (point data). | |
| virtual fileName | write (const word &fieldName, const List< Field< sphericalTensor > > &fieldValues)=0 |
| Write track fields of sphericalTensor (point data). | |
| virtual fileName | write (const word &fieldName, const Field< symmTensor > &field)=0 |
| Write field of symmTensor (point data). | |
| virtual fileName | write (const word &fieldName, const List< Field< symmTensor > > &fieldValues)=0 |
| Write track fields of symmTensor (point data). | |
| virtual fileName | write (const word &fieldName, const Field< tensor > &field)=0 |
| Write field of tensor (point data). | |
| virtual fileName | write (const word &fieldName, const List< Field< tensor > > &fieldValues)=0 |
| Write track fields of tensor (point data). | |
| template<class Type> | |
| Foam::tmp< Foam::Field< Type > > | adjustFieldTemplate (const word &fieldName, const tmp< Field< Type > > &tfield) const |
| template<class Type> | |
| Foam::UPtrList< const Foam::Field< Type > > | repackageFields (const Field< Type > &field) |
| template<class Type> | |
| Foam::UPtrList< const Foam::Field< Type > > | repackageFields (const UList< Field< Type > > &fieldValues) |
Protected Member Functions | |
| virtual bool | writeBuffered () |
| Write buffered data. | |
| Protected Member Functions inherited from coordSetWriter | |
| void | appendField (const word &fieldName, const Field< label > &vals) |
| void | appendField (const word &fieldName, const Field< scalar > &vals) |
| void | appendField (const word &fieldName, const Field< vector > &vals) |
| void | appendField (const word &fieldName, const Field< sphericalTensor > &vals) |
| void | appendField (const word &fieldName, const Field< symmTensor > &vals) |
| void | appendField (const word &fieldName, const Field< tensor > &vals) |
| void | clearBuffers () |
| Clear out buffering. | |
| label | nDataColumns () const |
| The number of buffer data columns, after splitting into components. | |
| void | writeBufferContents (Ostream &os, const coordSet &coords, const char *sep) const |
| Write buffered data. | |
| void | getBufferLine (DynamicList< scalar > &buf, const coordSet &coords, const label pointi) const |
| Get buffered data line (components). | |
| fileName | getExpectedPath (const word &fileExt=word::null) const |
| Get expected (characteristic) output file name - information only. | |
| fileName | getFieldPrefixedPath (const word &fieldName, const word &fileExt=word::null) const |
| Get field-prefixed output file name. | |
| void | checkOpen () const |
| Verify that the outputPath_ has been set or FatalError. | |
| virtual bool | merge () const |
| Perform any merging if not already upToDate (parallel) or simply mark as being up-to-date. | |
| template<class Type> | |
| tmp< Field< Type > > | adjustFieldTemplate (const word &fieldName, const tmp< Field< Type > > &tfield) const |
| template<class Type> | |
| fileName | writeTemplate (const word &fieldName, const Field< Type > &values) |
| Dummy templated write operation. | |
| template<class Type> | |
| fileName | writeTemplate (const word &fieldName, const List< Field< Type > > &fieldValues) |
| Dummy templated write operation. Multiple tracks. | |
| coordSetWriter (const coordSetWriter &)=delete | |
| No copy construct. | |
| void | operator= (const coordSetWriter &)=delete |
| No copy assignment. | |
Additional Inherited Members | |
| Static Public Member Functions inherited from coordSetWriter | |
| static dictionary | formatOptions (const dictionary &dict, const word &formatName, const word &entryName="formatOptions") |
| Same as fileFormats::getFormatOptions. | |
| static dictionary | formatOptions (const dictionary &dict, const dictionary &setDict, const word &formatName, const word &entryName="formatOptions") |
| Same as fileFormats::getFormatOptions. | |
| static bool | supportedType (const word &writeType) |
| True if New is likely to succeed for this writeType. | |
| static autoPtr< coordSetWriter > | New (const word &writeFormat) |
| Return a reference to the selected writer. | |
| static autoPtr< coordSetWriter > | New (const word &writeFormat, const dictionary &writeOptions) |
| Return a reference to the selected writer. | |
| static word | suffix (const word &fldName, const word &fileExt=word::null) |
| Name suffix based on fieldName (underscore separator). | |
| static word | suffix (const wordList &fieldNames, const word &fileExt=word::null) |
| Name suffix based on fieldNames (underscore separator). | |
| Static Protected Member Functions inherited from coordSetWriter | |
| static void | writeLine (Ostream &, const UList< word > &, const char *sep) |
| Write line contents (eg, buffered). | |
| static void | writeLine (Ostream &, const UList< scalar > &, const char *sep) |
| Write line contents (eg, buffered). | |
| template<class Type> | |
| static UPtrList< const Field< Type > > | repackageFields (const Field< Type > &field) |
| Repackage field into a UPtrList. | |
| template<class Type> | |
| static UPtrList< const Field< Type > > | repackageFields (const UList< Field< Type > > &fieldValues) |
| Repackage multiple fields into a UPtrList. | |
| template<class Type> | |
| static void | writeTable (Ostream &os, const coordSet &coords, const UList< Type > &values, const char *sep) |
| Write coordinates and values. | |
| Protected Attributes inherited from coordSetWriter | |
| UPtrList< const coordSet > | coords_ |
| Reference to coordinate set(s). | |
| List< scalarField > | trackTimes_ |
| Track times (eg, streamlines), one per coords_ entry. | |
| bool | upToDate_ |
| The content is up-to-date? | |
| bool | wroteGeom_ |
| Track if geometry has been written since the last open. | |
| bool | buffering_ |
| Writer with buffering output. | |
| bool | useTracks_ |
| Prefer tracks to points during single set writing. | |
| bool | useTimeDir_ |
| Insert additional time sub-directory in the output path. | |
| bool | verbose_ |
| Additional output verbosity. | |
| label | nFields_ |
| The number of fields. | |
| instant | currTime_ |
| The current time value/name. | |
| fileName | outputPath_ |
| The full output directory and file (coords) name. | |
| scalar | geometryScale_ |
| Output geometry scaling after rotate/translate. | |
| point | geometryCentre_ |
| The centre of rotation (untranslate, translate). | |
| coordSystem::cartesian | geometryTransform_ |
| Local coordinate system transformation. | |
| dictionary | fieldLevel_ |
| Field level to remove (on output). | |
| dictionary | fieldScale_ |
| Field scaling (on output). | |
| DynamicList< word > | labelNames_ |
| PtrDynList< Field< label > > | labelFields_ |
| DynamicList< word > | scalarNames_ |
| PtrDynList< Field< scalar > > | scalarFields_ |
| DynamicList< word > | vectorNames_ |
| PtrDynList< Field< vector > > | vectorFields_ |
| DynamicList< word > | sphericalTensorNames_ |
| PtrDynList< Field< sphericalTensor > > | sphericalTensorFields_ |
| DynamicList< word > | symmTensorNames_ |
| PtrDynList< Field< symmTensor > > | symmTensorFields_ |
| DynamicList< word > | tensorNames_ |
| PtrDynList< Field< tensor > > | tensorFields_ |
A coordSet(s) writer in gnuplot format.
The formatOptions for gnuplot:
| Property | Description | Required | Default |
|---|---|---|---|
buffer | Use buffered output | no | true |
compression | Use file compression | no | false |
precision | Write precision in ascii | no | same as IOstream |
When called with a single coordSet, will buffer the output of all fields and output together in the order of label/scalar/vector/... each of which is sorted alphabetically according to the field name.
When called as a track writer (eg, with multiple coordSets), will emit one file per field.
Definition at line 85 of file gnuplotCoordSetWriter.H.
| gnuplotWriter | ( | ) |
Default construct.
Definition at line 51 of file gnuplotCoordSetWriter.C.
References coordSetWriter::buffering_, and coordSetWriter::coordSetWriter().
Referenced by gnuplotWriter(), and gnuplotWriter().


|
explicit |
Default construct with specified options.
Definition at line 61 of file gnuplotCoordSetWriter.C.
References coordSetWriter::buffering_, coordSetWriter::coordSetWriter(), and dictionary::getOrDefault().

| gnuplotWriter | ( | const coordSet & | coords, |
| const fileName & | outputPath, | ||
| const dictionary & | options = dictionary() ) |
Construct from components.
Definition at line 78 of file gnuplotCoordSetWriter.C.
References gnuplotWriter(), and coordSetWriter::open().

| gnuplotWriter | ( | const UPtrList< coordSet > & | tracks, |
| const fileName & | outputPath, | ||
| const dictionary & | options = dictionary() ) |
Construct from components.
Definition at line 91 of file gnuplotCoordSetWriter.C.
References gnuplotWriter(), and coordSetWriter::open().

|
virtual |
Destructor. Calls close().
Definition at line 106 of file gnuplotCoordSetWriter.C.
References coordSetWriter::close().

|
protectedvirtual |
Write buffered data.
Reimplemented from coordSetWriter.
Definition at line 131 of file gnuplotCoordSetWriter.C.
References coordSetWriter::clearBuffers(), coordSetWriter::coords_, doLocalCode, Foam::isDir(), Foam::mkDir(), Foam::nl, os(), fileName::path(), path(), and fileName::stem().

| TypeNameNoDebug | ( | "gnuplot" | ) |
Runtime type information (no debug).
|
virtual |
Enable/disable internal buffering.
Reimplemented from coordSetWriter.
Definition at line 114 of file gnuplotCoordSetWriter.C.
References coordSetWriter::buffering_.
|
virtual |
Characteristic output file name - information only.
Implements coordSetWriter.
Definition at line 122 of file gnuplotCoordSetWriter.C.
References coordSetWriter::getExpectedPath().

| declareCoordSetWriterWriteMethod | ( | label | ) |
| declareCoordSetWriterWriteMethod | ( | scalar | ) |
| declareCoordSetWriterWriteMethod | ( | vector | ) |
| declareCoordSetWriterWriteMethod | ( | sphericalTensor | ) |
| declareCoordSetWriterWriteMethod | ( | symmTensor | ) |
| declareCoordSetWriterWriteMethod | ( | tensor | ) |
| Foam::fileName writeTemplate | ( | const word & | fieldName, |
| const Field< Type > & | values ) |
Definition at line 207 of file gnuplotCoordSetWriter.C.
References coordSetWriter::appendField(), coordSetWriter::buffering_, coordSetWriter::checkOpen(), coordSetWriter::coords_, fileName::null, path(), coordSetWriter::repackageFields(), and coordSetWriter::useTracks_.

| Foam::fileName writeTemplate | ( | const word & | fieldName, |
| const List< Field< Type > > & | fieldValues ) |
Definition at line 234 of file gnuplotCoordSetWriter.C.
References coordSetWriter::checkOpen(), coordSetWriter::coords_, fileName::null, and coordSetWriter::repackageFields().

| Foam::fileName writeTemplate | ( | const word & | fieldName, |
| const UPtrList< const Field< Type > > & | fieldPtrs ) |
const label nPoints = numPoints();
Definition at line 28 of file gnuplotCoordSetWriterImpl.C.
References coordSetWriter::coords_, Foam::endl(), Foam::exit(), Foam::FatalError, FatalErrorInFunction, forAll, coordSetWriter::getFieldPrefixedPath(), Foam::Info, Foam::isDir(), Foam::mkDir(), Foam::nl, os(), fileName::path(), fileName::stem(), coordSetWriter::verbose_, coordSetWriter::writeTable(), and coordSetWriter::wroteGeom_.
