Loading...
Searching...
No Matches
coordSetWriter Class Referenceabstract

Base class for writing coordSet(s) and tracks with fields. More...

#include <coordSetWriter.H>

Inheritance diagram for coordSetWriter:
Collaboration diagram for coordSetWriter:

Public Member Functions

 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 buffering (const bool on)
 Turn internal buffering on/off (only if supported by the writer).
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 > &times)
 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 wordtimeName () 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 fileName path () const =0
 Expected (characteristic) output file name - information only. Return empty when is_open() is false.
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< coordSetWriterinfo () 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)

Static Public Member Functions

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< coordSetWriterNew (const word &writeFormat)
 Return a reference to the selected writer.
static autoPtr< coordSetWriterNew (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).

Protected Member Functions

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.
virtual bool writeBuffered ()
 Write buffered data.
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.

Static Protected Member Functions

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

UPtrList< const coordSetcoords_
 Reference to coordinate set(s).
List< scalarFieldtrackTimes_
 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< wordlabelNames_
PtrDynList< Field< label > > labelFields_
DynamicList< wordscalarNames_
PtrDynList< Field< scalar > > scalarFields_
DynamicList< wordvectorNames_
PtrDynList< Field< vector > > vectorFields_
DynamicList< wordsphericalTensorNames_
PtrDynList< Field< sphericalTensor > > sphericalTensorFields_
DynamicList< wordsymmTensorNames_
PtrDynList< Field< symmTensor > > symmTensorFields_
DynamicList< wordtensorNames_
PtrDynList< Field< tensor > > tensorFields_

Friends

Ostreamoperator<< (Ostream &os, const InfoProxy< coordSetWriter > &iproxy)
 Output info proxy.

Detailed Description

Base class for writing coordSet(s) and tracks with fields.

Example:

    coordSet coords(...);

    // Construct writer of xmgr type
    autoPtr<coordSetWriter> writer(coordSetWriter::New("vtk"));

    writer.open(coords, path/name);

    writer.write("density", rho);
    writer.write("velocity", U);
Source files

Definition at line 82 of file coordSetWriter.H.

Constructor & Destructor Documentation

◆ coordSetWriter() [1/3]

◆ coordSetWriter() [2/3]

◆ coordSetWriter() [3/3]

coordSetWriter ( const dictionary & options)
explicit

◆ ~coordSetWriter()

~coordSetWriter ( )
virtual

Destructor. Calls close().

Definition at line 153 of file coordSetWriter.C.

References close().

Here is the call graph for this function:

Member Function Documentation

◆ appendField() [1/6]

void appendField ( const word & fieldName,
const Field< label > & vals )
inlineprotected

Definition at line 190 of file coordSetWriter.H.

Referenced by csvWriter::writeTemplate(), gnuplotWriter::writeTemplate(), and rawWriter::writeTemplate().

Here is the caller graph for this function:

◆ appendField() [2/6]

void appendField ( const word & fieldName,
const Field< scalar > & vals )
inlineprotected

Definition at line 191 of file coordSetWriter.H.

◆ appendField() [3/6]

void appendField ( const word & fieldName,
const Field< vector > & vals )
inlineprotected

Definition at line 192 of file coordSetWriter.H.

◆ appendField() [4/6]

void appendField ( const word & fieldName,
const Field< sphericalTensor > & vals )
inlineprotected

Definition at line 193 of file coordSetWriter.H.

◆ appendField() [5/6]

void appendField ( const word & fieldName,
const Field< symmTensor > & vals )
inlineprotected

Definition at line 194 of file coordSetWriter.H.

◆ appendField() [6/6]

void appendField ( const word & fieldName,
const Field< tensor > & vals )
inlineprotected

Definition at line 195 of file coordSetWriter.H.

References word::null, and os().

Here is the call graph for this function:

◆ writeLine() [1/2]

void writeLine ( Ostream & os,
const UList< word > & values,
const char * sep )
staticprotected

Write line contents (eg, buffered).

Definition at line 25 of file coordSetWriterBuffers.C.

References forAll, Foam::nl, and os().

Referenced by writeBufferContents(), and csvWriter::writeBuffered().

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

◆ writeLine() [2/2]

void writeLine ( Ostream & os,
const UList< scalar > & values,
const char * sep )
staticprotected

Write line contents (eg, buffered).

Definition at line 44 of file coordSetWriterBuffers.C.

References forAll, Foam::nl, and os().

Here is the call graph for this function:

◆ clearBuffers()

void clearBuffers ( )
protected

Clear out buffering.

Definition at line 63 of file coordSetWriterBuffers.C.

References doLocalCode.

Referenced by clear(), close(), endTime(), setCoordinates(), setTracks(), csvWriter::writeBuffered(), gnuplotWriter::writeBuffered(), and rawWriter::writeBuffered().

Here is the caller graph for this function:

◆ nDataColumns()

Foam::label nDataColumns ( ) const
protected

The number of buffer data columns, after splitting into components.

Definition at line 82 of file coordSetWriterBuffers.C.

References doLocalCode.

Referenced by close(), endTime(), writeBufferContents(), and csvWriter::writeBuffered().

Here is the caller graph for this function:

◆ writeBuffered()

bool writeBuffered ( )
protectedvirtual

Write buffered data.

Reimplemented in csvWriter, gnuplotWriter, and rawWriter.

Definition at line 149 of file coordSetWriterBuffers.C.

Referenced by close(), and endTime().

Here is the caller graph for this function:

◆ writeBufferContents()

void writeBufferContents ( Ostream & os,
const coordSet & coords,
const char * sep ) const
protected

Write buffered data.

Definition at line 155 of file coordSetWriterBuffers.C.

References getBufferLine(), nDataColumns(), os(), UList< T >::size(), and writeLine().

Referenced by csvWriter::writeBuffered(), and rawWriter::writeBuffered().

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

◆ getBufferLine()

void getBufferLine ( DynamicList< scalar > & buf,
const coordSet & coords,
const label pointi ) const
protected

Get buffered data line (components).

Definition at line 102 of file coordSetWriterBuffers.C.

References DynamicList< T, SizeMin >::append(), DynamicList< T, SizeMin >::clear(), doLocalCode, coordSet::hasVectorAxis(), p, coordSet::scalarCoord(), and coordSet::vectorCoord().

Referenced by writeBufferContents().

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

◆ getExpectedPath()

Foam::fileName getExpectedPath ( const word & fileExt = word::null) const
protected

Get expected (characteristic) output file name - information only.

Definition at line 388 of file coordSetWriter.C.

References empty(), fileName::ext(), outputPath_, timeName, and useTimeDir().

Referenced by getFieldPrefixedPath(), abaqusWriter::path(), csvWriter::path(), gltfWriter::path(), gnuplotWriter::path(), nastranWriter::path(), rawWriter::path(), and xmgraceWriter::path().

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

◆ getFieldPrefixedPath()

Foam::fileName getFieldPrefixedPath ( const word & fieldName,
const word & fileExt = word::null ) const
protected

Get field-prefixed output file name.

Eg, dir/U_name.raw

Definition at line 414 of file coordSetWriter.C.

References empty(), fileName::ext(), getExpectedPath(), outputPath_, timeName, and useTimeDir().

Referenced by csvWriter::writeTemplate(), gnuplotWriter::writeTemplate(), rawWriter::writeTemplate(), and xmgraceWriter::writeTemplate().

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

◆ checkOpen()

◆ merge()

bool merge ( ) const
protectedvirtual

Perform any merging if not already upToDate (parallel) or simply mark as being up-to-date.

Definition at line 457 of file coordSetWriter.C.

References upToDate_, and wroteGeom_.

Referenced by ensightWriter::writeCollated(), and ensightWriter::writeUncollated().

Here is the caller graph for this function:

◆ adjustFieldTemplate() [1/2]

template<class Type>
tmp< Field< Type > > adjustFieldTemplate ( const word & fieldName,
const tmp< Field< Type > > & tfield ) const
protected

Referenced by abaqusWriter::writeTemplate().

Here is the caller graph for this function:

◆ repackageFields() [1/4]

template<class Type>
UPtrList< const Field< Type > > repackageFields ( const Field< Type > & field)
staticprotected

◆ repackageFields() [2/4]

template<class Type>
UPtrList< const Field< Type > > repackageFields ( const UList< Field< Type > > & fieldValues)
staticprotected

Repackage multiple fields into a UPtrList.

References os().

Here is the call graph for this function:

◆ writeTable()

template<class Type>
void writeTable ( Ostream & os,
const coordSet & coords,
const UList< Type > & values,
const char * sep )
staticprotected

Write coordinates and values.

Definition at line 157 of file coordSetWriterTemplates.C.

References Foam::component(), forAll, coordSet::hasVectorAxis(), Foam::nl, os(), p, coordSet::scalarCoord(), and coordSet::vectorCoord().

Referenced by csvWriter::writeTemplate(), gnuplotWriter::writeTemplate(), rawWriter::writeTemplate(), xmgraceWriter::writeTemplate(), and xmgraceWriter::writeTemplate().

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

◆ writeTemplate() [1/2]

template<class Type>
fileName writeTemplate ( const word & fieldName,
const Field< Type > & values )
inlineprotected

Dummy templated write operation.

if (!wroteGeom_) { return this->write(); }

Parameters
fieldNameName of field
valuesLocal field values to write

Definition at line 327 of file coordSetWriter.H.

References fileName::null.

◆ writeTemplate() [2/2]

template<class Type>
fileName writeTemplate ( const word & fieldName,
const List< Field< Type > > & fieldValues )
inlineprotected

Dummy templated write operation. Multiple tracks.

Definition at line 344 of file coordSetWriter.H.

References fileName::null.

◆ operator=()

void operator= ( const coordSetWriter & )
protecteddelete

No copy assignment.

References coordSetWriter().

Here is the call graph for this function:

◆ TypeName()

TypeName ( "coordSetWriter" )

Runtime type information.

◆ declareRunTimeSelectionTable() [1/2]

declareRunTimeSelectionTable ( autoPtr ,
coordSetWriter ,
word ,
() ,
()  )

References coordSetWriter().

Here is the call graph for this function:

◆ declareRunTimeSelectionTable() [2/2]

declareRunTimeSelectionTable ( autoPtr ,
coordSetWriter ,
wordDict ,
(const dictionary &writeOptions) ,
(writeOptions)  )

References coordSetWriter(), dict, and word::null.

Here is the call graph for this function:

◆ formatOptions() [1/2]

Foam::dictionary formatOptions ( const dictionary & dict,
const word & formatName,
const word & entryName = "formatOptions" )
static

Same as fileFormats::getFormatOptions.

Definition at line 75 of file coordSetWriter.C.

References dict, and Foam::fileFormats::getFormatOptions().

Referenced by ParticleZoneInfo< CloudType >::ParticleZoneInfo().

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

◆ formatOptions() [2/2]

Foam::dictionary formatOptions ( const dictionary & dict,
const dictionary & setDict,
const word & formatName,
const word & entryName = "formatOptions" )
static

Same as fileFormats::getFormatOptions.

Definition at line 86 of file coordSetWriter.C.

References dict, and Foam::fileFormats::getFormatOptions().

Here is the call graph for this function:

◆ supportedType()

bool supportedType ( const word & writeType)
static

True if New is likely to succeed for this writeType.

Definition at line 26 of file coordSetWriterNew.C.

◆ New() [1/2]

Foam::autoPtr< Foam::coordSetWriter > New ( const word & writeFormat)
static

Return a reference to the selected writer.

Definition at line 36 of file coordSetWriterNew.C.

References Foam::exit(), Foam::FatalError, and FatalErrorInLookup.

Referenced by ParticleZoneInfo< CloudType >::ParticleZoneInfo(), particleDistribution::read(), regionSizeDistribution::read(), and streamLineBase::read().

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

◆ New() [2/2]

Foam::autoPtr< Foam::coordSetWriter > New ( const word & writeFormat,
const dictionary & writeOptions )
static

Return a reference to the selected writer.

Select with extra write option

Definition at line 57 of file coordSetWriterNew.C.

References Foam::exit(), Foam::FatalError, and FatalErrorInLookup.

Here is the call graph for this function:

◆ suffix() [1/2]

Foam::word suffix ( const word & fldName,
const word & fileExt = word::null )
static

Name suffix based on fieldName (underscore separator).

Definition at line 38 of file coordSetWriter.C.

References word::ext().

Here is the call graph for this function:

◆ suffix() [2/2]

Foam::word suffix ( const wordList & fieldNames,
const word & fileExt = word::null )
static

Name suffix based on fieldNames (underscore separator).

Definition at line 55 of file coordSetWriter.C.

References word::ext().

Here is the call graph for this function:

◆ buffering() [1/2]

bool buffering ( ) const
virtual

True if the format uses internal buffering (eg, column output).

Reimplemented in nullWriter.

Definition at line 177 of file coordSetWriterBuffers.C.

References buffering_.

◆ buffering() [2/2]

bool buffering ( const bool on)
virtual

Turn internal buffering on/off (only if supported by the writer).

Reimplemented in csvWriter, gnuplotWriter, rawWriter, and xmgraceWriter.

Definition at line 184 of file coordSetWriterBuffers.C.

References buffering_.

◆ enabled()

virtual bool enabled ( ) const
inlinevirtual

The writer is enabled. If the writer is not enabled, it may be possible for the caller to skip various preparatory operations.

This method is primarily useful for the null writer

Reimplemented in nullWriter.

Definition at line 502 of file coordSetWriter.H.

◆ needsUpdate()

bool needsUpdate ( ) const
virtual

Does the writer need an update (eg, lagging behind other changes).

Reimplemented in nullWriter.

Definition at line 349 of file coordSetWriter.C.

References upToDate_.

◆ wroteData()

bool wroteData ( ) const
virtual

Geometry or fields written since the last open?

Reimplemented in nullWriter.

Definition at line 355 of file coordSetWriter.C.

References wroteGeom_.

◆ expire()

bool expire ( )
virtual

Mark that content changed and the writer will need an update, and set nFields = 0.

May also free up unneeded data. Return false if it was previously already expired.

Definition at line 361 of file coordSetWriter.C.

References coords_, trackTimes_, upToDate_, and wroteGeom_.

Referenced by clear(), setCoordinates(), and setTracks().

Here is the caller graph for this function:

◆ clear()

void clear ( )
virtual

Close any open output, remove coordSet associations and expire the writer.

Definition at line 265 of file coordSetWriter.C.

References clearBuffers(), close(), coords_, expire(), and trackTimes_.

Here is the call graph for this function:

◆ setCoordinates() [1/2]

void setCoordinates ( const coordSet * coords)
virtual

Set coordinates, can also be nullptr.

Reimplemented in nullWriter.

Definition at line 275 of file coordSetWriter.C.

References clearBuffers(), coords_, expire(), and trackTimes_.

Referenced by open(), and setCoordinates().

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

◆ setCoordinates() [2/2]

void setCoordinates ( const coordSet & coords)
virtual

Set coordinates.

Reimplemented in nullWriter.

Definition at line 293 of file coordSetWriter.C.

References setCoordinates().

Here is the call graph for this function:

◆ setTracks()

void setTracks ( const UPtrList< coordSet > & tracks)
virtual

Set track coordinates.

Reimplemented in nullWriter.

Definition at line 299 of file coordSetWriter.C.

References clearBuffers(), coords_, expire(), forAll, UPtrList< T >::get(), UPtrList< T >::size(), trackTimes_, and useTracks_.

Referenced by open().

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

◆ setTrackTimes()

void setTrackTimes ( const UList< scalarField > & times)
virtual

Set track times.

Definition at line 316 of file coordSetWriter.C.

References coords_, UList< T >::size(), and trackTimes_.

Here is the call graph for this function:

◆ numPoints()

Foam::label numPoints ( ) const

The number of associated points (local processor).

Definition at line 329 of file coordSetWriter.C.

References coords_, and forAll.

◆ numTracks()

Foam::label numTracks ( ) const

The number of coordinate tracks.

Definition at line 343 of file coordSetWriter.C.

References coords_.

◆ hasCoords()

bool hasCoords ( ) const

Writer is associated with content.

Definition at line 377 of file coordSetWriter.C.

References coords_.

◆ empty()

bool empty ( ) const

Writer is not associated with content.

Definition at line 383 of file coordSetWriter.C.

References coords_.

Referenced by getExpectedPath(), getFieldPrefixedPath(), abaqusWriter::writeTemplate(), nastranWriter::writeTemplate(), ensightWriter::writeUncollated(), and ensightWriter::writeUncollated().

Here is the caller graph for this function:

◆ is_open()

bool is_open ( ) const
inlinenoexcept

Test if outputPath has been set.

Definition at line 23 of file coordSetWriterI.H.

References Foam::noexcept, and outputPath_.

Referenced by checkOpen().

Here is the caller graph for this function:

◆ nFields() [1/2]

Foam::label nFields ( ) const
inlinenoexcept

The number of expected output fields.

Currently only used by the legacy VTK format.

Definition at line 29 of file coordSetWriterI.H.

References nFields_, and Foam::noexcept.

◆ nFields() [2/2]

Foam::label nFields ( const label n)
inlinenoexcept

Set the number of expected output fields.

Currently only used by the legacy VTK format.

Returns
old value

Definition at line 35 of file coordSetWriterI.H.

References n, and nFields_.

◆ useTracks() [1/2]

bool useTracks ( ) const
inlinenoexcept

Prefer tracks to points during single set writing.

Definition at line 43 of file coordSetWriterI.H.

References Foam::noexcept, and useTracks_.

◆ useTracks() [2/2]

bool useTracks ( const bool on)
inlinenoexcept

Enable/disable tracks preference.

Returns
old value

Definition at line 49 of file coordSetWriterI.H.

References useTracks_.

◆ useTimeDir() [1/2]

bool useTimeDir ( ) const
inlinenoexcept

◆ useTimeDir() [2/2]

bool useTimeDir ( const bool on)
inlinenoexcept

Enable/disable use of spliced output path.

Returns
old value

Definition at line 63 of file coordSetWriterI.H.

References useTimeDir_.

◆ verbose() [1/2]

bool verbose ( ) const
inlinenoexcept

Get output verbosity.

Definition at line 71 of file coordSetWriterI.H.

References Foam::noexcept, and verbose_.

◆ verbose() [2/2]

bool verbose ( bool on)
inlinenoexcept

Enable/disable verbose output.

Returns
old value

Definition at line 77 of file coordSetWriterI.H.

References verbose_.

◆ hasTime()

bool hasTime ( ) const
inline

True if there is a known time.

Definition at line 85 of file coordSetWriterI.H.

References currTime_.

◆ timeName()

const Foam::word & timeName ( ) const
inline

The current time value/name.

Definition at line 91 of file coordSetWriterI.H.

References currTime_.

Referenced by setTime().

Here is the caller graph for this function:

◆ timeValue()

Foam::scalar timeValue ( ) const
inline

The current time value/name.

Definition at line 97 of file coordSetWriterI.H.

References currTime_.

Referenced by setTime(), setTime(), ensightWriter::writeCollated(), ensightWriter::writeCollated(), nastranWriter::writeTemplate(), ensightWriter::writeUncollated(), and ensightWriter::writeUncollated().

Here is the caller graph for this function:

◆ setTime() [1/3]

void setTime ( const instant & inst)

Set the current time.

Definition at line 161 of file coordSetWriter.C.

References currTime_.

◆ setTime() [2/3]

void setTime ( scalar timeValue)

Set current time from timeValue, auto generating the name.

Definition at line 167 of file coordSetWriter.C.

References currTime_, and timeValue().

Here is the call graph for this function:

◆ setTime() [3/3]

void setTime ( scalar timeValue,
const word & timeName )

Set current time from timeValue and timeName.

Definition at line 173 of file coordSetWriter.C.

References currTime_, timeName(), and timeValue().

Here is the call graph for this function:

◆ unsetTime()

void unsetTime ( )

Clear the current time.

Definition at line 180 of file coordSetWriter.C.

References currTime_.

Referenced by endTime().

Here is the caller graph for this function:

◆ beginTime() [1/2]

void beginTime ( const Time & t)
virtual

Begin a time-step.

Reimplemented in gltfWriter, vtkWriter, and xmgraceWriter.

Definition at line 187 of file coordSetWriter.C.

References setTime(), Time::timeName(), and dimensioned< Type >::value().

Referenced by gltfWriter::beginTime(), gltfWriter::beginTime(), xmgraceWriter::beginTime(), and xmgraceWriter::beginTime().

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

◆ beginTime() [2/2]

void beginTime ( const instant & inst)
virtual

Begin a time-step.

Reimplemented in gltfWriter, vtkWriter, and xmgraceWriter.

Definition at line 193 of file coordSetWriter.C.

References setTime().

Here is the call graph for this function:

◆ endTime()

void endTime ( )
virtual

End a time-step.

Reimplemented in gltfWriter, vtkWriter, and xmgraceWriter.

Definition at line 199 of file coordSetWriter.C.

References clearBuffers(), nDataColumns(), unsetTime(), and writeBuffered().

Referenced by gltfWriter::endTime(), and xmgraceWriter::endTime().

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

◆ path()

virtual fileName path ( ) const
pure virtual

Expected (characteristic) output file name - information only. Return empty when is_open() is false.

Implemented in abaqusWriter, csvWriter, ensightWriter, gltfWriter, gnuplotWriter, nastranWriter, nullWriter, rawWriter, vtkWriter, and xmgraceWriter.

References close(), open(), and path().

Referenced by path().

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

◆ open() [1/3]

◆ open() [2/3]

void open ( const coordSet & coords,
const fileName & outputPath )
virtual

Open from components.

Definition at line 221 of file coordSetWriter.C.

References close(), open(), and setCoordinates().

Here is the call graph for this function:

◆ open() [3/3]

void open ( const UPtrList< coordSet > & tracks,
const fileName & outputPath )
virtual

Open from components.

Definition at line 233 of file coordSetWriter.C.

References close(), open(), and setTracks().

Here is the call graph for this function:

◆ close()

void close ( bool force = false)
virtual

Finish output, performing any necessary cleanup.

Optional force disassociation with any coordSet(s)

Reimplemented in ensightWriter, gltfWriter, vtkWriter, and xmgraceWriter.

Definition at line 245 of file coordSetWriter.C.

References clearBuffers(), coords_, Foam::Info, nDataColumns(), Foam::nl, outputPath_, trackTimes_, verbose_, writeBuffered(), and wroteGeom_.

Referenced by clear(), ensightWriter::close(), gltfWriter::close(), xmgraceWriter::close(), open(), open(), path(), abaqusWriter::~abaqusWriter(), ~coordSetWriter(), csvWriter::~csvWriter(), gnuplotWriter::~gnuplotWriter(), nastranWriter::~nastranWriter(), and rawWriter::~rawWriter().

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

◆ info()

virtual InfoProxy< coordSetWriter > info ( ) const
inlinevirtual

Return info proxy, used to print information to a stream.

Definition at line 744 of file coordSetWriter.H.

References coordSetWriter(), and info().

Referenced by info().

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

◆ write() [1/12]

virtual fileName write ( const word & fieldName,
const Field< label > & field )
pure virtual

Write field of label (point data).

Parameters
fieldNameName of field
fieldField values

◆ write() [2/12]

virtual fileName write ( const word & fieldName,
const List< Field< label > > & fieldValues )
pure virtual

Write track fields of label (point data).

Parameters
fieldNameName of field
fieldValuesPer-track values

◆ write() [3/12]

virtual fileName write ( const word & fieldName,
const Field< scalar > & field )
pure virtual

Write field of scalar (point data).

Parameters
fieldNameName of field
fieldField values

◆ write() [4/12]

virtual fileName write ( const word & fieldName,
const List< Field< scalar > > & fieldValues )
pure virtual

Write track fields of scalar (point data).

Parameters
fieldNameName of field
fieldValuesPer-track values

◆ write() [5/12]

virtual fileName write ( const word & fieldName,
const Field< vector > & field )
pure virtual

Write field of vector (point data).

Parameters
fieldNameName of field
fieldField values

◆ write() [6/12]

virtual fileName write ( const word & fieldName,
const List< Field< vector > > & fieldValues )
pure virtual

Write track fields of vector (point data).

Parameters
fieldNameName of field
fieldValuesPer-track values

◆ write() [7/12]

virtual fileName write ( const word & fieldName,
const Field< sphericalTensor > & field )
pure virtual

Write field of sphericalTensor (point data).

Parameters
fieldNameName of field
fieldField values

◆ write() [8/12]

virtual fileName write ( const word & fieldName,
const List< Field< sphericalTensor > > & fieldValues )
pure virtual

Write track fields of sphericalTensor (point data).

Parameters
fieldNameName of field
fieldValuesPer-track values

◆ write() [9/12]

virtual fileName write ( const word & fieldName,
const Field< symmTensor > & field )
pure virtual

Write field of symmTensor (point data).

Parameters
fieldNameName of field
fieldField values

◆ write() [10/12]

virtual fileName write ( const word & fieldName,
const List< Field< symmTensor > > & fieldValues )
pure virtual

Write track fields of symmTensor (point data).

Parameters
fieldNameName of field
fieldValuesPer-track values

◆ write() [11/12]

virtual fileName write ( const word & fieldName,
const Field< tensor > & field )
pure virtual

Write field of tensor (point data).

Parameters
fieldNameName of field
fieldField values

◆ write() [12/12]

virtual fileName write ( const word & fieldName,
const List< Field< tensor > > & fieldValues )
pure virtual

Write track fields of tensor (point data).

Parameters
fieldNameName of field
fieldValuesPer-track values

◆ adjustFieldTemplate() [2/2]

template<class Type>
Foam::tmp< Foam::Field< Type > > adjustFieldTemplate ( const word & fieldName,
const tmp< Field< Type > > & tfield ) const

◆ repackageFields() [3/4]

template<class Type>
Foam::UPtrList< const Foam::Field< Type > > repackageFields ( const Field< Type > & field)

Definition at line 133 of file coordSetWriterTemplates.C.

References field(), and UPtrList< T >::set().

Here is the call graph for this function:

◆ repackageFields() [4/4]

template<class Type>
Foam::UPtrList< const Foam::Field< Type > > repackageFields ( const UList< Field< Type > > & fieldValues)

Definition at line 144 of file coordSetWriterTemplates.C.

References forAll, and UPtrList< T >::set().

Here is the call graph for this function:

◆ operator<<

Ostream & operator<< ( Ostream & os,
const InfoProxy< coordSetWriter > & iproxy )
friend

Output info proxy.

References os().

Member Data Documentation

◆ coords_

◆ trackTimes_

List<scalarField> trackTimes_
protected

Track times (eg, streamlines), one per coords_ entry.

Definition at line 96 of file coordSetWriter.H.

Referenced by clear(), close(), coordSetWriter(), expire(), setCoordinates(), setTracks(), setTrackTimes(), gltfWriter::writeTemplate(), and gltfWriter::writeTemplate_animate().

◆ upToDate_

bool upToDate_
mutableprotected

The content is up-to-date?

Definition at line 101 of file coordSetWriter.H.

Referenced by coordSetWriter(), expire(), merge(), needsUpdate(), ensightWriter::writeCollated(), and ensightWriter::writeCollated().

◆ wroteGeom_

◆ buffering_

◆ useTracks_

◆ useTimeDir_

bool useTimeDir_
protected

Insert additional time sub-directory in the output path.

Definition at line 124 of file coordSetWriter.H.

Referenced by coordSetWriter(), useTimeDir(), and useTimeDir().

◆ verbose_

◆ nFields_

label nFields_
protected

The number of fields.

Definition at line 134 of file coordSetWriter.H.

Referenced by coordSetWriter(), nFields(), nFields(), and vtkWriter::writeTemplate().

◆ currTime_

◆ outputPath_

◆ geometryScale_

scalar geometryScale_
protected

Output geometry scaling after rotate/translate.

Definition at line 149 of file coordSetWriter.H.

Referenced by coordSetWriter(), and coordSetWriter().

◆ geometryCentre_

point geometryCentre_
protected

The centre of rotation (untranslate, translate).

Definition at line 154 of file coordSetWriter.H.

Referenced by coordSetWriter(), and coordSetWriter().

◆ geometryTransform_

coordSystem::cartesian geometryTransform_
protected

Local coordinate system transformation.

Definition at line 159 of file coordSetWriter.H.

Referenced by adjustFieldTemplate(), coordSetWriter(), and coordSetWriter().

◆ fieldLevel_

dictionary fieldLevel_
protected

Field level to remove (on output).

Definition at line 164 of file coordSetWriter.H.

Referenced by adjustFieldTemplate(), coordSetWriter(), and coordSetWriter().

◆ fieldScale_

dictionary fieldScale_
protected

Field scaling (on output).

Definition at line 169 of file coordSetWriter.H.

Referenced by adjustFieldTemplate(), coordSetWriter(), and coordSetWriter().

◆ labelNames_

DynamicList<word> labelNames_
protected

Definition at line 190 of file coordSetWriter.H.

Referenced by csvWriter::writeBuffered().

◆ labelFields_

PtrDynList<Field<label> > labelFields_
protected

Definition at line 190 of file coordSetWriter.H.

◆ scalarNames_

DynamicList<word> scalarNames_
protected

Definition at line 191 of file coordSetWriter.H.

Referenced by csvWriter::writeBuffered().

◆ scalarFields_

PtrDynList<Field<scalar> > scalarFields_
protected

Definition at line 191 of file coordSetWriter.H.

◆ vectorNames_

DynamicList<word> vectorNames_
protected

Definition at line 192 of file coordSetWriter.H.

◆ vectorFields_

PtrDynList<Field<vector> > vectorFields_
protected

Definition at line 192 of file coordSetWriter.H.

◆ sphericalTensorNames_

DynamicList<word> sphericalTensorNames_
protected

Definition at line 193 of file coordSetWriter.H.

◆ sphericalTensorFields_

PtrDynList<Field<sphericalTensor> > sphericalTensorFields_
protected

Definition at line 193 of file coordSetWriter.H.

◆ symmTensorNames_

DynamicList<word> symmTensorNames_
protected

Definition at line 194 of file coordSetWriter.H.

◆ symmTensorFields_

PtrDynList<Field<symmTensor> > symmTensorFields_
protected

Definition at line 194 of file coordSetWriter.H.

◆ tensorNames_

DynamicList<word> tensorNames_
protected

Definition at line 195 of file coordSetWriter.H.

◆ tensorFields_

PtrDynList<Field<tensor> > tensorFields_
protected

Definition at line 195 of file coordSetWriter.H.


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