coordSetWriter Class Referenceabstract

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

Inheritance diagram for coordSetWriter:
[legend]
Collaboration diagram for coordSetWriter:
[legend]

Public Member Functions

 TypeName ("coordSetWriter")
 Runtime type information. More...
 
 declareRunTimeSelectionTable (autoPtr, coordSetWriter, word,(),())
 
 declareRunTimeSelectionTable (autoPtr, coordSetWriter, wordDict,(const dictionary &writeOptions),(writeOptions))
 
 coordSetWriter ()
 Default construct. More...
 
 coordSetWriter (const dictionary &options)
 Default construct with specified options. More...
 
virtual ~coordSetWriter ()
 Destructor. Calls close() More...
 
virtual bool buffering () const
 True if the format uses internal buffering (eg, column output) More...
 
virtual bool buffering (const bool on)
 Turn internal buffering on/off (only if supported by the writer) More...
 
virtual bool enabled () const
 
virtual bool needsUpdate () const
 Does the writer need an update (eg, lagging behind other changes) More...
 
virtual bool wroteData () const
 Geometry or fields written since the last open? More...
 
virtual bool expire ()
 
virtual void clear ()
 
virtual void setCoordinates (const coordSet *coords)
 Set coordinates, can also be nullptr. More...
 
virtual void setCoordinates (const coordSet &coords)
 Set coordinates. More...
 
virtual void setTracks (const UPtrList< coordSet > &tracks)
 Set track coordinates. More...
 
virtual void setTrackTimes (const UList< scalarField > &times)
 Set track times. More...
 
label numPoints () const
 The number of associated points (local processor) More...
 
label numTracks () const
 The number of coordinate tracks. More...
 
bool hasCoords () const
 Writer is associated with content. More...
 
bool empty () const
 Writer is not associated with content. More...
 
bool is_open () const noexcept
 Test if outputPath has been set. More...
 
label nFields () const noexcept
 The number of expected output fields. More...
 
label nFields (const label n) noexcept
 Set the number of expected output fields. More...
 
bool useTracks () const noexcept
 Prefer tracks to points during single set writing. More...
 
bool useTracks (const bool on) noexcept
 Enable/disable tracks preference. More...
 
bool useTimeDir () const noexcept
 Should a time directory be spliced into the output path? More...
 
bool useTimeDir (const bool on) noexcept
 Enable/disable use of spliced output path. More...
 
bool verbose () const noexcept
 Get output verbosity. More...
 
bool verbose (bool on) noexcept
 Enable/disable verbose output. More...
 
bool hasTime () const
 True if there is a known time. More...
 
const wordtimeName () const
 The current time value/name. More...
 
scalar timeValue () const
 The current time value/name. More...
 
void setTime (const instant &inst)
 Set the current time. More...
 
void setTime (scalar timeValue)
 Set current time from timeValue, auto generating the name. More...
 
void setTime (scalar timeValue, const word &timeName)
 Set current time from timeValue and timeName. More...
 
void unsetTime ()
 Clear the current time. More...
 
virtual void beginTime (const Time &t)
 Begin a time-step. More...
 
virtual void beginTime (const instant &inst)
 Begin a time-step. More...
 
virtual void endTime ()
 End a time-step. More...
 
virtual fileName path () const =0
 
virtual void open (const fileName &outputPath)
 Write separate geometry to file. More...
 
virtual void open (const coordSet &coords, const fileName &outputPath)
 Open from components. More...
 
virtual void open (const UPtrList< coordSet > &tracks, const fileName &outputPath)
 Open from components. More...
 
virtual void close (bool force=false)
 Finish output, performing any necessary cleanup. More...
 
virtual InfoProxy< coordSetWriterinfo () const
 Return info proxy. More...
 
virtual fileName write (const word &fieldName, const Field< label > &field)=0
 Write field of label (point data) More...
 
virtual fileName write (const word &fieldName, const List< Field< label > > &fieldValues)=0
 Write track fields of label (point data) More...
 
virtual fileName write (const word &fieldName, const Field< scalar > &field)=0
 Write field of scalar (point data) More...
 
virtual fileName write (const word &fieldName, const List< Field< scalar > > &fieldValues)=0
 Write track fields of scalar (point data) More...
 
virtual fileName write (const word &fieldName, const Field< vector > &field)=0
 Write field of vector (point data) More...
 
virtual fileName write (const word &fieldName, const List< Field< vector > > &fieldValues)=0
 Write track fields of vector (point data) More...
 
virtual fileName write (const word &fieldName, const Field< sphericalTensor > &field)=0
 Write field of sphericalTensor (point data) More...
 
virtual fileName write (const word &fieldName, const List< Field< sphericalTensor > > &fieldValues)=0
 Write track fields of sphericalTensor (point data) More...
 
virtual fileName write (const word &fieldName, const Field< symmTensor > &field)=0
 Write field of symmTensor (point data) More...
 
virtual fileName write (const word &fieldName, const List< Field< symmTensor > > &fieldValues)=0
 Write track fields of symmTensor (point data) More...
 
virtual fileName write (const word &fieldName, const Field< tensor > &field)=0
 Write field of tensor (point data) More...
 
virtual fileName write (const word &fieldName, const List< Field< tensor > > &fieldValues)=0
 Write track fields of tensor (point data) More...
 
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 bool supportedType (const word &writeType)
 True if New is likely to succeed for this writeType. More...
 
static autoPtr< coordSetWriterNew (const word &writeFormat)
 Return a reference to the selected writer. More...
 
static autoPtr< coordSetWriterNew (const word &writeFormat, const dictionary &writeOptions)
 Return a reference to the selected writer. More...
 
static word suffix (const word &fldName, const word &fileExt=word::null)
 Name suffix based on fieldName (underscore separator) More...
 
static word suffix (const wordList &fieldNames, const word &fileExt=word::null)
 Name suffix based on fieldNames (underscore separator) More...
 

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. More...
 
label nDataColumns () const
 The number of buffer data columns, after splitting into components. More...
 
virtual bool writeBuffered ()
 Write buffered data. More...
 
void writeBufferContents (Ostream &os, const coordSet &coords, const char *sep) const
 Write buffered data. More...
 
void getBufferLine (DynamicList< scalar > &buf, const coordSet &coords, const label pointi) const
 Get buffered data line (components) More...
 
fileName getExpectedPath (const word &fileExt=word::null) const
 Get expected (characteristic) output file name - information only. More...
 
fileName getFieldPrefixedPath (const word &fieldName, const word &fileExt=word::null) const
 Get field-prefixed output file name. More...
 
void checkOpen () const
 Verify that the outputPath_ has been set or FatalError. More...
 
virtual bool merge () const
 
template<class Type >
fileName writeTemplate (const word &fieldName, const Field< Type > &values)
 Dummy templated write operation. More...
 
template<class Type >
fileName writeTemplate (const word &fieldName, const List< Field< Type > > &fieldValues)
 Dummy templated write operation. Multiple tracks. More...
 
 coordSetWriter (const coordSetWriter &)=delete
 No copy construct. More...
 
void operator= (const coordSetWriter &)=delete
 No copy assignment. More...
 

Static Protected Member Functions

static void writeLine (Ostream &, const UList< word > &, const char *sep)
 Write line contents (eg, buffered) More...
 
static void writeLine (Ostream &, const UList< scalar > &, const char *sep)
 Write line contents (eg, buffered) More...
 
template<class Type >
static UPtrList< const Field< Type > > repackageFields (const Field< Type > &field)
 Repackage field into a UPtrList. More...
 
template<class Type >
static UPtrList< const Field< Type > > repackageFields (const UList< Field< Type > > &fieldValues)
 Repackage multiple fields into a UPtrList. More...
 
template<class Type >
static void writeTable (Ostream &os, const coordSet &coords, const UList< Type > &values, const char *sep)
 Write coordinates and values. More...
 

Protected Attributes

UPtrList< const coordSetcoords_
 Reference to coordinate set(s) More...
 
List< scalarFieldtrackTimes_
 Track times (eg, streamlines), one per coords_ entry. More...
 
bool upToDate_
 The content is up-to-date? More...
 
bool wroteGeom_
 Track if geometry has been written since the last open. More...
 
bool buffering_
 Writer with buffering output. More...
 
bool useTracks_
 Prefer tracks to points during single set writing. More...
 
bool useTimeDir_
 Insert additional time sub-directory in the output path. More...
 
bool verbose_
 Additional output verbosity. More...
 
label nFields_
 The number of fields. More...
 
instant currTime_
 The current time value/name. More...
 
fileName outputPath_
 The full output directory and file (coords) name. More...
 
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 > &ip)
 Output info proxy. More...
 

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 85 of file coordSetWriter.H.

Constructor & Destructor Documentation

◆ coordSetWriter() [1/3]

coordSetWriter ( const coordSetWriter )
protecteddelete

No copy construct.

◆ coordSetWriter() [2/3]

Default construct.

Definition at line 83 of file coordSetWriter.C.

◆ coordSetWriter() [3/3]

coordSetWriter ( const dictionary options)
explicit

Default construct with specified options.

Definition at line 100 of file coordSetWriter.C.

References dictionary::readIfPresent(), and coordSetWriter::verbose_.

Here is the call graph for this function:

◆ ~coordSetWriter()

~coordSetWriter ( )
virtual

Destructor. Calls close()

Definition at line 110 of file coordSetWriter.C.

Member Function Documentation

◆ appendField() [1/6]

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

Definition at line 146 of file coordSetWriter.H.

◆ appendField() [2/6]

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

Definition at line 147 of file coordSetWriter.H.

◆ appendField() [3/6]

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

Definition at line 148 of file coordSetWriter.H.

◆ appendField() [4/6]

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

Definition at line 149 of file coordSetWriter.H.

◆ appendField() [5/6]

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

Definition at line 150 of file coordSetWriter.H.

◆ appendField() [6/6]

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

Definition at line 151 of file coordSetWriter.H.

◆ writeLine() [1/2]

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

Write line contents (eg, buffered)

Definition at line 32 of file coordSetWriterBuffers.C.

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

Here is the call 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 51 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 70 of file coordSetWriterBuffers.C.

References doLocalCode.

◆ nDataColumns()

Foam::label nDataColumns ( ) const
protected

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

Definition at line 89 of file coordSetWriterBuffers.C.

References doLocalCode.

◆ writeBuffered()

bool writeBuffered ( )
protectedvirtual

Write buffered data.

Reimplemented in csvWriter, gnuplotWriter, and rawWriter.

Definition at line 156 of file coordSetWriterBuffers.C.

◆ writeBufferContents()

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

Write buffered data.

Definition at line 162 of file coordSetWriterBuffers.C.

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

Here is the call 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 109 of file coordSetWriterBuffers.C.

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

Here is the call 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 345 of file coordSetWriter.C.

References fileName::ext(), fileName::path(), and timeName.

Here is the call 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 371 of file coordSetWriter.C.

References fileName::ext(), fileName::path(), and timeName.

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()

void checkOpen ( ) const
protected

Verify that the outputPath_ has been set or FatalError.

Definition at line 403 of file coordSetWriter.C.

References Foam::exit(), Foam::FatalError, FatalErrorInFunction, Foam::nl, and Foam::type().

Here is the call graph for this function:

◆ merge()

bool merge ( ) const
protectedvirtual

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

Definition at line 414 of file coordSetWriter.C.

◆ repackageFields() [1/4]

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

Repackage field into a UPtrList.

◆ repackageFields() [2/4]

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

Repackage multiple fields into a UPtrList.

◆ writeTable()

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

Write coordinates and values.

Definition at line 56 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(), and xmgraceWriter::writeTemplate().

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

◆ writeTemplate() [1/2]

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 245 of file coordSetWriter.H.

References fileName::null.

◆ writeTemplate() [2/2]

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

Dummy templated write operation. Multiple tracks.

Definition at line 260 of file coordSetWriter.H.

References fileName::null.

◆ operator=()

void operator= ( const coordSetWriter )
protecteddelete

No copy assignment.

◆ TypeName()

TypeName ( "coordSetWriter"  )

Runtime type information.

◆ declareRunTimeSelectionTable() [1/2]

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

◆ declareRunTimeSelectionTable() [2/2]

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

◆ supportedType()

bool supportedType ( const word writeType)
static

True if New is likely to succeed for this writeType.

Definition at line 33 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 43 of file coordSetWriterNew.C.

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

Here is the call 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 64 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 44 of file coordSetWriter.C.

References word::ext().

Referenced by histogram::write().

Here is the call graph for this function:
Here is the caller 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 61 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 184 of file coordSetWriterBuffers.C.

◆ 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 191 of file coordSetWriterBuffers.C.

◆ 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 364 of file coordSetWriter.H.

Referenced by Foam::byDt(), laminar< ReactionThermo >::correct(), cloudSolution::read(), multiphaseSystem::sigma(), and twoPhaseSystem::solve().

Here is the caller graph for this function:

◆ needsUpdate()

bool needsUpdate ( ) const
virtual

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

Reimplemented in nullWriter.

Definition at line 306 of file coordSetWriter.C.

◆ wroteData()

bool wroteData ( ) const
virtual

Geometry or fields written since the last open?

Reimplemented in nullWriter.

Definition at line 312 of file coordSetWriter.C.

◆ 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 318 of file coordSetWriter.C.

◆ clear()

void clear ( )
virtual

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

Definition at line 222 of file coordSetWriter.C.

◆ setCoordinates() [1/2]

void setCoordinates ( const coordSet coords)
virtual

Set coordinates, can also be nullptr.

Reimplemented in nullWriter.

Definition at line 232 of file coordSetWriter.C.

◆ setCoordinates() [2/2]

void setCoordinates ( const coordSet coords)
virtual

Set coordinates.

Reimplemented in nullWriter.

Definition at line 250 of file coordSetWriter.C.

◆ setTracks()

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

Set track coordinates.

Reimplemented in nullWriter.

Definition at line 256 of file coordSetWriter.C.

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

Here is the call graph for this function:

◆ setTrackTimes()

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

Set track times.

Definition at line 273 of file coordSetWriter.C.

References UList< T >::size().

Here is the call graph for this function:

◆ numPoints()

Foam::label numPoints ( ) const

The number of associated points (local processor)

Definition at line 286 of file coordSetWriter.C.

References forAll.

◆ numTracks()

Foam::label numTracks ( ) const

The number of coordinate tracks.

Definition at line 300 of file coordSetWriter.C.

◆ hasCoords()

bool hasCoords ( ) const

Writer is associated with content.

Definition at line 334 of file coordSetWriter.C.

◆ empty()

bool empty ( ) const

Writer is not associated with content.

Definition at line 340 of file coordSetWriter.C.

◆ is_open()

bool is_open ( ) const
inlinenoexcept

Test if outputPath has been set.

Definition at line 30 of file coordSetWriterI.H.

References coordSetWriter::outputPath_.

◆ 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 36 of file coordSetWriterI.H.

◆ 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 42 of file coordSetWriterI.H.

References n.

◆ useTracks() [1/2]

bool useTracks ( ) const
inlinenoexcept

Prefer tracks to points during single set writing.

Definition at line 50 of file coordSetWriterI.H.

◆ useTracks() [2/2]

bool useTracks ( const bool  on)
inlinenoexcept

Enable/disable tracks preference.

Returns
old value

Definition at line 56 of file coordSetWriterI.H.

◆ useTimeDir() [1/2]

bool useTimeDir ( ) const
inlinenoexcept

Should a time directory be spliced into the output path?

Definition at line 64 of file coordSetWriterI.H.

◆ useTimeDir() [2/2]

bool useTimeDir ( const bool  on)
inlinenoexcept

Enable/disable use of spliced output path.

Returns
old value

Definition at line 70 of file coordSetWriterI.H.

◆ verbose() [1/2]

bool verbose ( ) const
inlinenoexcept

Get output verbosity.

Definition at line 78 of file coordSetWriterI.H.

◆ verbose() [2/2]

bool verbose ( bool  on)
inlinenoexcept

Enable/disable verbose output.

Returns
old value

Definition at line 84 of file coordSetWriterI.H.

◆ hasTime()

bool hasTime ( ) const
inline

True if there is a known time.

Definition at line 92 of file coordSetWriterI.H.

◆ timeName()

const Foam::word & timeName ( ) const
inline

The current time value/name.

Definition at line 98 of file coordSetWriterI.H.

◆ timeValue()

Foam::scalar timeValue ( ) const
inline

The current time value/name.

Definition at line 104 of file coordSetWriterI.H.

◆ setTime() [1/3]

void setTime ( const instant inst)

Set the current time.

Definition at line 118 of file coordSetWriter.C.

◆ setTime() [2/3]

void setTime ( scalar  timeValue)

Set current time from timeValue, auto generating the name.

Definition at line 124 of file coordSetWriter.C.

◆ setTime() [3/3]

void setTime ( scalar  timeValue,
const word timeName 
)

Set current time from timeValue and timeName.

Definition at line 130 of file coordSetWriter.C.

References timeName.

◆ unsetTime()

void unsetTime ( )

Clear the current time.

Definition at line 137 of file coordSetWriter.C.

◆ beginTime() [1/2]

void beginTime ( const Time t)
virtual

Begin a time-step.

Reimplemented in gltfWriter, vtkWriter, and xmgraceWriter.

Definition at line 144 of file coordSetWriter.C.

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

Referenced by gltfWriter::beginTime(), vtkWriter::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 150 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 156 of file coordSetWriter.C.

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

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 csvWriter, ensightWriter, gltfWriter, gnuplotWriter, nastranWriter, nullWriter, rawWriter, vtkWriter, and xmgraceWriter.

◆ open() [1/3]

void open ( const fileName outputPath)
virtual

Write separate geometry to file.

/ TBD: virtual fileName write() = 0; Open for output on specified path, using existing content

Reimplemented in nullWriter.

Definition at line 171 of file coordSetWriter.C.

Referenced by csvWriter::csvWriter(), ensightWriter::ensightWriter(), gltfWriter::gltfWriter(), gnuplotWriter::gnuplotWriter(), nastranWriter::nastranWriter(), rawWriter::rawWriter(), vtkWriter::vtkWriter(), and xmgraceWriter::xmgraceWriter().

Here is the caller graph for this function:

◆ open() [2/3]

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

Open from components.

Definition at line 178 of file coordSetWriter.C.

◆ open() [3/3]

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

Open from components.

Definition at line 190 of file coordSetWriter.C.

◆ 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 202 of file coordSetWriter.C.

References Foam::Info, and Foam::nl.

◆ info()

virtual InfoProxy< coordSetWriter > info ( ) const
inlinevirtual

Return info proxy.

Definition at line 521 of file coordSetWriter.H.

◆ 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

◆ repackageFields() [3/4]

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

Definition at line 32 of file coordSetWriterTemplates.C.

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

Here is the call graph for this function:

◆ repackageFields() [4/4]

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

Definition at line 43 of file coordSetWriterTemplates.C.

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

Here is the call graph for this function:

Friends And Related Function Documentation

◆ operator<<

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

Output info proxy.

Member Data Documentation

◆ coords_

UPtrList<const coordSet> coords_
protected

Reference to coordinate set(s)

Definition at line 92 of file coordSetWriter.H.

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

◆ trackTimes_

List<scalarField> trackTimes_
protected

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

Definition at line 95 of file coordSetWriter.H.

◆ upToDate_

bool upToDate_
mutableprotected

The content is up-to-date?

Definition at line 98 of file coordSetWriter.H.

Referenced by Foam::operator<<().

◆ wroteGeom_

bool wroteGeom_
mutableprotected

Track if geometry has been written since the last open.

Definition at line 101 of file coordSetWriter.H.

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

◆ buffering_

bool buffering_
mutableprotected

Writer with buffering output.

//- Writing in parallel (via master) bool parallel_;

Definition at line 107 of file coordSetWriter.H.

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

◆ useTracks_

bool useTracks_
protected

Prefer tracks to points during single set writing.

Definition at line 110 of file coordSetWriter.H.

◆ useTimeDir_

bool useTimeDir_
protected

Insert additional time sub-directory in the output path.

Definition at line 113 of file coordSetWriter.H.

◆ verbose_

◆ nFields_

label nFields_
protected

The number of fields.

Definition at line 119 of file coordSetWriter.H.

Referenced by Foam::operator<<().

◆ currTime_

instant currTime_
protected

The current time value/name.

Definition at line 122 of file coordSetWriter.H.

Referenced by Foam::operator<<().

◆ outputPath_

fileName outputPath_
protected

The full output directory and file (coords) name.

Definition at line 125 of file coordSetWriter.H.

Referenced by coordSetWriter::is_open(), and Foam::operator<<().

◆ labelNames_

DynamicList<word> labelNames_
protected

Definition at line 146 of file coordSetWriter.H.

◆ labelFields_

PtrDynList<Field< label > > labelFields_
protected

Definition at line 146 of file coordSetWriter.H.

◆ scalarNames_

DynamicList<word> scalarNames_
protected

Definition at line 147 of file coordSetWriter.H.

◆ scalarFields_

PtrDynList<Field< scalar > > scalarFields_
protected

Definition at line 147 of file coordSetWriter.H.

◆ vectorNames_

DynamicList<word> vectorNames_
protected

Definition at line 148 of file coordSetWriter.H.

◆ vectorFields_

PtrDynList<Field< vector > > vectorFields_
protected

Definition at line 148 of file coordSetWriter.H.

◆ sphericalTensorNames_

DynamicList<word> sphericalTensorNames_
protected

Definition at line 149 of file coordSetWriter.H.

◆ sphericalTensorFields_

PtrDynList<Field< sphericalTensor > > sphericalTensorFields_
protected

Definition at line 149 of file coordSetWriter.H.

◆ symmTensorNames_

DynamicList<word> symmTensorNames_
protected

Definition at line 150 of file coordSetWriter.H.

◆ symmTensorFields_

PtrDynList<Field< symmTensor > > symmTensorFields_
protected

Definition at line 150 of file coordSetWriter.H.

◆ tensorNames_

DynamicList<word> tensorNames_
protected

Definition at line 151 of file coordSetWriter.H.

◆ tensorFields_

PtrDynList<Field< tensor > > tensorFields_
protected

Definition at line 151 of file coordSetWriter.H.


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