Loading...
Searching...
No Matches
writeFile Class Reference

Base class for writing single files from the function objects. More...

#include <writeFile.H>

Inherited by PatchInteractionModel< Foam::KinematicCloud< Foam::DSMCCloud< dsmcParcel > > >, PatchInteractionModel< Foam::DSMCCloud< dsmcParcel > >, reactionsSensitivityAnalysis< BasicChemistryModel< psiReactionThermo > >, reactionsSensitivityAnalysis< BasicChemistryModel< rhoReactionThermo > >, specieReactionRates< BasicChemistryModel< psiReactionThermo > >, specieReactionRates< BasicChemistryModel< rhoReactionThermo > >, DMDModel, FaceInteraction< CloudType >, ParticleHistogram< CloudType >, ParticlePostProcessing< CloudType >, ParticleZoneInfo< CloudType >, PatchInteractionModel< CloudType >, binModel, turbulentTemperatureRadCoupledMixedFvPatchScalarField, AMIWeights, Curle, DESModelRegions, bladeForces, blendingFactor, caseInfo, continuityError, energySpectrum, extractEulerianParticles, fieldExtents, fieldMinMax, fieldStatistics, fieldValue, multiFieldValue, fluxSummary, foamReport, forces, graphFunctionObject, logFiles, momentum, particleDistribution, radiometerProbes, reactionsSensitivityAnalysis< chemistryType >, regionSizeDistribution, sixDoFRigidBodyState, sizeDistribution, solverInfo, specieReactionRates< ChemistryModelType >, stabilityBlendingFactor, surfaceCourantNumber, timeInfo, valueAverageBase, viewFactorHeatFlux, wallShearStress, yPlus, actuationDiskSource, limitTemperature, limitTurbulenceViscosity, limitVelocity, velocityDampingConstraint, heatExchangerModel, histogramModel, noiseModel, and wallHeatFluxModel.

Collaboration diagram for writeFile:

Public Member Functions

 writeFile (const objectRegistry &obr, const fileName &prefix, const word &name="undefined", const bool writeToFile=true, const string &ext=".dat")
 Construct from objectRegistry, prefix, fileName.
 writeFile (const objectRegistry &obr, const fileName &prefix, const word &name, const dictionary &dict, const bool writeToFile=true, const string &ext=".dat")
 Construct from objectRegistry, prefix, fileName and read options from dictionary.
 writeFile (const writeFile &wf)
 Construct copy.
virtual ~writeFile ()=default
 Destructor.
virtual bool read (const dictionary &dict)
 Read.
virtual const stringsetExt (const string &ext)
 Set extension.
virtual OFstreamfile ()
 Return access to the file (if only 1).
virtual bool writeToFile () const
 Flag to allow writing to file.
virtual bool canWriteToFile () const
 Flag to allow writing to the file.
virtual bool canResetFile () const
 Flag to allow resetting the file.
virtual bool canWriteHeader () const
 Flag to allow writing the header.
virtual label charWidth () const
 Return width of character stream output.
virtual void writeCommented (Ostream &os, const string &str) const
 Write a commented string to stream.
virtual void writeTabbed (Ostream &os, const string &str) const
 Write a tabbed string to stream.
virtual void writeHeader (Ostream &os, const string &str) const
 Write a commented header to stream.
virtual void writeCurrentTime (Ostream &os) const
 Write the current time to stream.
virtual void writeBreak (Ostream &os) const
 Write a break marker to the stream.
template<class Type>
void writeHeaderValue (Ostream &os, const string &property, const Type &value) const
 Write a (commented) header property and value pair.
template<class Type>
void writeValue (Ostream &os, const Type &val) const
 Write a given value to stream with the space delimiter.

Static Public Attributes

static label addChars = 8
 Additional characters for writing.

Protected Member Functions

void initStream (Ostream &os) const
 Initialise the output stream for writing.
fileName baseFileDir () const
 Return the base directory for output.
fileName baseTimeDir () const
 Return the base directory for the current time value.
fileName filePath (const fileName &fName) const
 Return the full path for the supplied file name.
virtual autoPtr< OFstreamnewFile (const fileName &fName) const
 Return autoPtr to a new file using file name.
virtual autoPtr< OFstreamnewFileAtTime (const word &name, scalar timeValue) const
 Return autoPtr to a new file for a given time.
virtual autoPtr< OFstreamnewFileAtStartTime (const word &name) const
 Return autoPtr to a new file using the simulation start time.
virtual void resetFile (const word &name)
 Reset internal file pointer to new file with new name.
Omanip< int > valueWidth (const label offset=0) const
 Return the value width when writing to stream with optional offset.
void operator= (const writeFile &)=delete
 No copy assignment.
virtual autoPtr< OFstreamcreateFile (const word &name, scalar timeValue) const
 Deprecated(2022-09) Return autoPtr to a new file for a given time.
virtual autoPtr< OFstreamcreateFile (const word &name) const
 Deprecated(2022-09) Return autoPtr to a new file using the simulation start time.

Protected Attributes

const objectRegistryfileObr_
 Reference to the region objectRegistry.
const fileName prefix_
 Prefix.
word fileName_
 Name of file.
autoPtr< OFstreamfilePtr_
 File pointer.
label writePrecision_
 Write precision.
bool writeToFile_
 Flag to enable/disable writing to file.
bool updateHeader_
 Flag to update the header, e.g. on mesh changes. Default is true.
bool writtenHeader_
 Flag to identify whether the header has been written.
bool useUserTime_
 Flag to use the specified user time, e.g. CA deg instead of seconds. Default = true.
scalar startTime_
 Start time value.
string ext_
 File extension; default = .dat.

Detailed Description

Base class for writing single files from the function objects.

Usage
<dictName>
{
    // Inherited entries
    ...

    // Optional entries
    writePrecision    <int>;
    writeToFile       <bool>;
    useUserTime       <bool>;
    updateHeader      <bool>;
}

where the entries mean:

Property Description Type Reqd Deflt
writePrecision Number of decimal points int no <system dflt>
writeToFile Produce text file output? bool no true
useUserTime Use user time (e.g. degrees)? bool no true
updateHeader Update header on mesh changes? bool no true
Note
The file header is normally updated whenver the mesh points or topology changes. In some cases, the function object is actually unaffected by these changes. Use the updateHeader flag to override the default behaviour.
Source files

Definition at line 112 of file writeFile.H.

Constructor & Destructor Documentation

◆ writeFile() [1/3]

writeFile ( const objectRegistry & obr,
const fileName & prefix,
const word & name = "undefined",
const bool writeToFile = true,
const string & ext = ".dat" )

Construct from objectRegistry, prefix, fileName.

Definition at line 199 of file writeFile.C.

References ext_, fileName_, fileObr_, filePtr_, Foam::name(), prefix_, startTime, startTime_, updateHeader_, useUserTime_, writePrecision_, writeToFile(), writeToFile_, and writtenHeader_.

Referenced by actuationDiskSource::actuationDiskSource(), AMIWeights::AMIWeights(), binModel::binModel(), blendingFactor::blendingFactor(), caseInfo::caseInfo(), continuityError::continuityError(), Curle::Curle(), DESModelRegions::DESModelRegions(), DMDModel::DMDModel(), energySpectrum::energySpectrum(), extractEulerianParticles::extractEulerianParticles(), FaceInteraction< CloudType >::FaceInteraction(), FaceInteraction< CloudType >::FaceInteraction(), fieldExtents::fieldExtents(), fieldMinMax::fieldMinMax(), fieldValue::fieldValue(), fieldValue::fieldValue(), fluxSummary::fluxSummary(), foamReport::foamReport(), forces::forces(), forces::forces(), graphFunctionObject::graphFunctionObject(), heatExchangerModel::heatExchangerModel(), histogramModel::histogramModel(), limitTemperature::limitTemperature(), limitTurbulenceViscosity::limitTurbulenceViscosity(), limitVelocity::limitVelocity(), logFiles::logFiles(), logFiles::logFiles(), momentum::momentum(), momentum::momentum(), multiFieldValue::multiFieldValue(), noiseModel::noiseModel(), operator=(), particleDistribution::particleDistribution(), ParticleHistogram< CloudType >::ParticleHistogram(), ParticleHistogram< CloudType >::ParticleHistogram(), ParticlePostProcessing< CloudType >::ParticlePostProcessing(), ParticlePostProcessing< CloudType >::ParticlePostProcessing(), ParticleZoneInfo< CloudType >::ParticleZoneInfo(), ParticleZoneInfo< CloudType >::ParticleZoneInfo(), PatchInteractionModel< CloudType >::PatchInteractionModel(), PatchInteractionModel< CloudType >::PatchInteractionModel(), PatchInteractionModel< Foam::KinematicCloud< Foam::DSMCCloud< dsmcParcel > > >::PatchInteractionModel(), radiometerProbes::radiometerProbes(), reactionsSensitivityAnalysis< chemistryType >::reactionsSensitivityAnalysis(), regionSizeDistribution::regionSizeDistribution(), sixDoFRigidBodyState::sixDoFRigidBodyState(), sizeDistribution::sizeDistribution(), solverInfo::solverInfo(), specieReactionRates< ChemistryModelType >::specieReactionRates(), stabilityBlendingFactor::stabilityBlendingFactor(), surfaceCourantNumber::surfaceCourantNumber(), timeInfo::timeInfo(), valueAverageBase::valueAverageBase(), velocityDampingConstraint::velocityDampingConstraint(), viewFactorHeatFlux::viewFactorHeatFlux(), viewFactorHeatFlux::viewFactorHeatFlux(), wallShearStress::wallShearStress(), writeFile(), writeFile(), and yPlus::yPlus().

Here is the call graph for this function:

◆ writeFile() [2/3]

writeFile ( const objectRegistry & obr,
const fileName & prefix,
const word & name,
const dictionary & dict,
const bool writeToFile = true,
const string & ext = ".dat" )

Construct from objectRegistry, prefix, fileName and read options from dictionary.

Definition at line 222 of file writeFile.C.

References dict, Foam::name(), read(), writeFile(), and writeToFile().

Here is the call graph for this function:

◆ writeFile() [3/3]

writeFile ( const writeFile & wf)

Construct copy.

Definition at line 183 of file writeFile.C.

References ext_, fileName_, fileObr_, filePtr_, prefix_, startTime_, updateHeader_, useUserTime_, writeFile(), writePrecision_, writeToFile_, and writtenHeader_.

Here is the call graph for this function:

◆ ~writeFile()

virtual ~writeFile ( )
virtualdefault

Destructor.

References dict, and os().

Here is the call graph for this function:

Member Function Documentation

◆ initStream()

void initStream ( Ostream & os) const
protected

Initialise the output stream for writing.

Definition at line 35 of file writeFile.C.

References charWidth(), os(), and writePrecision_.

Referenced by logFiles::createFiles(), newFile(), and newFileAtTime().

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

◆ baseFileDir()

Foam::fileName baseFileDir ( ) const
protected

Return the base directory for output.

Definition at line 43 of file writeFile.C.

References fileName::clean(), fileObr_, Foam::isA(), meshPtr, and functionObject::outputPrefix.

Referenced by baseTimeDir(), surfaceNoise::calculate(), Curle::execute(), filePath(), newFileAtTime(), pointNoise::processData(), and propellerInfo::writeSampleDiskSurface().

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

◆ baseTimeDir()

Foam::fileName baseTimeDir ( ) const
protected

Return the base directory for the current time value.

Definition at line 66 of file writeFile.C.

References baseFileDir(), fileObr_, and prefix_.

Referenced by particleDistribution::generateDistribution(), regionSizeDistribution::write(), and AMIWeights::writeWeightField().

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

◆ filePath()

Foam::fileName filePath ( const fileName & fName) const
protected

Return the full path for the supplied file name.

Definition at line 72 of file writeFile.C.

References baseFileDir(), and prefix_.

Referenced by surfaceNoise::calculate(), and newFile().

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

◆ newFile()

Foam::autoPtr< Foam::OFstream > newFile ( const fileName & fName) const
protectedvirtual

Return autoPtr to a new file using file name.

Note: no check for if the file already exists

Definition at line 81 of file writeFile.C.

References Foam::exit(), ext_, Foam::FatalIOError, FatalIOErrorInFunction, filePath(), initStream(), UPstream::master(), Foam::mkDir(), fileName::name(), path(), autoPtr< T >::reset(), and writeToFile_.

Referenced by surfaceNoise::calculate(), and pointNoise::processData().

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

◆ newFileAtTime()

◆ newFileAtStartTime()

Foam::autoPtr< Foam::OFstream > newFileAtStartTime ( const word & name) const
protectedvirtual

Return autoPtr to a new file using the simulation start time.

Definition at line 155 of file writeFile.C.

References Foam::name(), newFileAtTime(), and startTime_.

Referenced by createFile(), logFiles::createFiles(), propellerInfo::createFiles(), forceCoeffs::createIntegratedDataFile(), forces::createIntegratedDataFiles(), FaceInteraction< CloudType >::FaceInteraction(), file(), binModel::read(), Curle::read(), resetFile(), sizeDistribution::sizeDistribution(), and fluxSummary::update().

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

◆ resetFile()

void resetFile ( const word & name)
protectedvirtual

Reset internal file pointer to new file with new name.

Definition at line 165 of file writeFile.C.

References fileName_, filePtr_, and newFileAtStartTime().

Referenced by radiometerProbes::read(), limitTemperature::read(), limitTurbulenceViscosity::read(), limitVelocity::read(), velocityDampingConstraint::read(), logFiles::resetName(), sizeDistribution::sizeDistribution(), and turbulentTemperatureRadCoupledMixedFvPatchScalarField::updateCoeffs().

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

◆ valueWidth()

Foam::Omanip< int > valueWidth ( const label offset = 0) const
protected

Return the value width when writing to stream with optional offset.

Definition at line 172 of file writeFile.C.

References addChars, Foam::setw(), and writePrecision_.

Referenced by interfaceHeight::writeFileHeader().

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

◆ operator=()

void operator= ( const writeFile & )
protecteddelete

No copy assignment.

References writeFile().

Here is the call graph for this function:

◆ createFile() [1/2]

virtual autoPtr< OFstream > createFile ( const word & name,
scalar timeValue ) const
inlineprotectedvirtual

Deprecated(2022-09) Return autoPtr to a new file for a given time.

Deprecated
(2022-09) - use newFileAtTime function

Definition at line 248 of file writeFile.H.

References createFile(), Foam::name(), and newFileAtTime().

Referenced by createFile(), and createFile().

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

◆ createFile() [2/2]

virtual autoPtr< OFstream > createFile ( const word & name) const
inlineprotectedvirtual

Deprecated(2022-09) Return autoPtr to a new file using the simulation start time.

Deprecated
(2022-09) - use newFileAtStartTime function

Definition at line 265 of file writeFile.H.

References createFile(), Foam::name(), and newFileAtStartTime().

Here is the call graph for this function:

◆ read()

bool read ( const dictionary & dict)
virtual

Read.

Reimplemented in binModel, singleDirectionUniformBin, uniformBin, DMDModel, STDMD, AMIWeights, bladeForces, blendingFactor, caseInfo, cloudInfo, continuityError, Curle, DESModelRegions, energySpectrum, extractEulerianParticles, fieldExtents, fieldMinMax, fieldStatistics, fieldValue, multiFieldValue, volFieldValue, fluxSummary, foamReport, forceCoeffs, forces, interfaceHeight, momentum, particleDistribution, propellerInfo, radiometerProbes, reactionsSensitivityAnalysis< chemistryType >, reactionsSensitivityAnalysis< BasicChemistryModel< psiReactionThermo > >, reactionsSensitivityAnalysis< BasicChemistryModel< rhoReactionThermo > >, regionSizeDistribution, sixDoFRigidBodyState, sizeDistribution, solverInfo, specieReactionRates< ChemistryModelType >, specieReactionRates< BasicChemistryModel< psiReactionThermo > >, specieReactionRates< BasicChemistryModel< rhoReactionThermo > >, stabilityBlendingFactor, surfaceCourantNumber, timeInfo, valueAverage, valueAverageBase, viewFactorHeatFlux, wallShearStress, yPlus, actuationDiskSource, limitTemperature, limitTurbulenceViscosity, limitVelocity, radialActuationDiskSource, velocityDampingConstraint, heatExchangerModel, effectivenessTable, referenceTemperature, histogramModel, equalBinWidth, unequalBinWidth, noiseModel, pointNoise, surfaceNoise, wallHeatFluxModel, gauge, and wall.

Definition at line 240 of file writeFile.C.

References IOstream::defaultPrecision(), dict, MinMax< label >::ge(), UPstream::master(), updateHeader_, useUserTime_, writePrecision_, and writeToFile_.

Referenced by logFiles::logFiles(), binModel::read(), AMIWeights::read(), blendingFactor::read(), caseInfo::read(), cloudInfo::read(), continuityError::read(), Curle::read(), DESModelRegions::read(), energySpectrum::read(), extractEulerianParticles::read(), fieldExtents::read(), fieldMinMax::read(), fieldValue::read(), multiFieldValue::read(), fluxSummary::read(), forces::read(), momentum::read(), particleDistribution::read(), radiometerProbes::read(), reactionsSensitivityAnalysis< chemistryType >::read(), regionSizeDistribution::read(), sizeDistribution::read(), stabilityBlendingFactor::read(), surfaceCourantNumber::read(), timeInfo::read(), valueAverageBase::read(), wallShearStress::read(), yPlus::read(), histogramModel::read(), noiseModel::read(), and writeFile().

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

◆ setExt()

const Foam::string & setExt ( const string & ext)
virtual

Set extension.

Definition at line 263 of file writeFile.C.

References ext_.

Referenced by caseInfo::read(), and foamReport::read().

Here is the caller graph for this function:

◆ file()

Foam::OFstream & file ( )
virtual

Return access to the file (if only 1).

Definition at line 270 of file writeFile.C.

References fileName_, filePtr_, newFileAtStartTime(), Foam::Snull, and writeToFile_.

Referenced by actuationDiskSource::actuationDiskSource(), velocityDampingConstraint::addDamping(), blendingFactor::blendingFactor(), valueAverageBase::calc(), fieldExtents::calcFieldExtents(), valueAverageBase::calculate(), continuityError::continuityError(), limitTemperature::correct(), limitTurbulenceViscosity::correct(), limitVelocity::correct(), DESModelRegions::DESModelRegions(), effectivenessTable::effectivenessTable(), DESModelRegions::execute(), momentum::execute(), solverInfo::execute(), surfaceCourantNumber::execute(), LocalInteraction< CloudType >::info(), RecycleInteraction< CloudType >::info(), StandardWallInteraction< CloudType >::info(), fieldMinMax::output(), PatchInteractionModel< Foam::KinematicCloud< Foam::DSMCCloud< dsmcParcel > > >::postEvolve(), AMIWeights::read(), radiometerProbes::read(), limitTemperature::read(), limitTurbulenceViscosity::read(), limitVelocity::read(), velocityDampingConstraint::read(), histogramModel::read(), referenceTemperature::referenceTemperature(), AMIWeights::reportPatch(), sixDoFRigidBodyState::sixDoFRigidBodyState(), specieReactionRates< ChemistryModelType >::specieReactionRates(), stabilityBlendingFactor::stabilityBlendingFactor(), timeInfo::timeInfo(), turbulentTemperatureRadCoupledMixedFvPatchScalarField::updateCoeffs(), solverInfo::updateSolverInfo(), valueAverageBase::valueAverageBase(), volFieldValue::volFieldValue(), wallShearStress::wallShearStress(), blendingFactor::write(), continuityError::write(), fieldExtents::write(), fieldMinMax::write(), multiFieldValue::write(), volFieldValue::write(), radiometerProbes::write(), sixDoFRigidBodyState::write(), sizeDistribution::write(), specieReactionRates< ChemistryModelType >::write(), stabilityBlendingFactor::write(), timeInfo::write(), viewFactorHeatFlux::write(), wallShearStress::write(), yPlus::write(), effectivenessTable::write(), referenceTemperature::write(), histogramModel::write(), fieldMinMax::writeFileHeader(), sizeDistribution::writeFileHeader(), solverInfo::writeFileHeader(), volFieldValue::writeValues(), and yPlus::yPlus().

Here is the call graph for this function:

◆ writeToFile()

◆ canWriteToFile()

bool canWriteToFile ( ) const
virtual

Flag to allow writing to the file.

Definition at line 292 of file writeFile.C.

References filePtr_, UPstream::master(), and writeToFile_.

Referenced by velocityDampingConstraint::addDamping(), limitTemperature::correct(), limitTurbulenceViscosity::correct(), limitVelocity::correct(), and turbulentTemperatureRadCoupledMixedFvPatchScalarField::updateCoeffs().

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

◆ canResetFile()

bool canResetFile ( ) const
virtual

Flag to allow resetting the file.

Definition at line 298 of file writeFile.C.

References filePtr_, UPstream::master(), and writeToFile_.

Referenced by radiometerProbes::read(), limitTemperature::read(), limitTurbulenceViscosity::read(), limitVelocity::read(), velocityDampingConstraint::read(), and turbulentTemperatureRadCoupledMixedFvPatchScalarField::updateCoeffs().

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

◆ canWriteHeader()

bool canWriteHeader ( ) const
virtual

Flag to allow writing the header.

Definition at line 304 of file writeFile.C.

References UPstream::master(), updateHeader_, writeToFile_, and writtenHeader_.

Referenced by radiometerProbes::read(), limitTemperature::read(), limitTurbulenceViscosity::read(), limitVelocity::read(), velocityDampingConstraint::read(), and turbulentTemperatureRadCoupledMixedFvPatchScalarField::updateCoeffs().

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

◆ charWidth()

Foam::label charWidth ( ) const
virtual

Return width of character stream output.

Definition at line 311 of file writeFile.C.

References addChars, and writePrecision_.

Referenced by initStream(), writeCommented(), writeCurrentTime(), writeHeaderValue(), and writeTabbed().

Here is the caller graph for this function:

◆ writeCommented()

void writeCommented ( Ostream & os,
const string & str ) const
virtual

Write a commented string to stream.

Definition at line 317 of file writeFile.C.

References charWidth(), os(), Foam::setf(), and Foam::setw().

Referenced by propellerInfo::createFiles(), FaceInteraction< CloudType >::FaceInteraction(), Curle::read(), singleDirectionUniformBin::writeFileHeader(), uniformBin::writeFileHeader(), AMIWeights::writeFileHeader(), blendingFactor::writeFileHeader(), cloudInfo::writeFileHeader(), continuityError::writeFileHeader(), DESModelRegions::writeFileHeader(), energySpectrum::writeFileHeader(), fieldExtents::writeFileHeader(), fieldMinMax::writeFileHeader(), multiFieldValue::writeFileHeader(), volFieldValue::writeFileHeader(), fluxSummary::writeFileHeader(), interfaceHeight::writeFileHeader(), momentum::writeFileHeader(), sixDoFRigidBodyState::writeFileHeader(), sizeDistribution::writeFileHeader(), solverInfo::writeFileHeader(), stabilityBlendingFactor::writeFileHeader(), timeInfo::writeFileHeader(), valueAverageBase::writeFileHeader(), volRegion::writeFileHeader(), wallShearStress::writeFileHeader(), limitTemperature::writeFileHeader(), limitTurbulenceViscosity::writeFileHeader(), limitVelocity::writeFileHeader(), velocityDampingConstraint::writeFileHeader(), histogramModel::writeFileHeader(), noiseModel::writeFileHeader(), PatchInteractionModel< CloudType >::writeFileHeader(), writeHeader(), forceCoeffs::writeIntegratedDataFileHeader(), forces::writeIntegratedDataFileHeader(), and propellerInfo::writeWake().

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

◆ writeTabbed()

◆ writeHeader()

◆ writeCurrentTime()

◆ writeBreak()

void writeBreak ( Ostream & os) const
virtual

Write a break marker to the stream.

Definition at line 367 of file writeFile.C.

References os(), and Foam::writeHeader().

Referenced by propellerInfo::writeAxialWake(), fieldExtents::writeFileHeader(), fieldMinMax::writeFileHeader(), solverInfo::writeFileHeader(), and propellerInfo::writeWake().

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

◆ writeHeaderValue()

◆ writeValue()

template<class Type>
void writeValue ( Ostream & os,
const Type & val ) const

Write a given value to stream with the space delimiter.

Definition at line 39 of file writeFileTemplates.C.

References Foam::component(), and os().

Referenced by binModel::writeBinnedData(), and forces::writeIntegratedDataFile().

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

Member Data Documentation

◆ fileObr_

◆ prefix_

const fileName prefix_
protected

Prefix.

Definition at line 126 of file writeFile.H.

Referenced by baseTimeDir(), valueAverageBase::calculate(), filePath(), newFileAtTime(), writeFile(), and writeFile().

◆ fileName_

word fileName_
protected

Name of file.

Definition at line 131 of file writeFile.H.

Referenced by file(), resetFile(), writeFile(), and writeFile().

◆ filePtr_

autoPtr<OFstream> filePtr_
protected

File pointer.

Definition at line 136 of file writeFile.H.

Referenced by canResetFile(), canWriteToFile(), file(), resetFile(), writeFile(), and writeFile().

◆ writePrecision_

label writePrecision_
protected

◆ writeToFile_

◆ updateHeader_

bool updateHeader_
protected

Flag to update the header, e.g. on mesh changes. Default is true.

Definition at line 152 of file writeFile.H.

Referenced by canWriteHeader(), read(), turbulentTemperatureRadCoupledMixedFvPatchScalarField::write(), writeFile(), and writeFile().

◆ writtenHeader_

◆ useUserTime_

bool useUserTime_
protected

Flag to use the specified user time, e.g. CA deg instead of seconds. Default = true.

Definition at line 163 of file writeFile.H.

Referenced by newFileAtTime(), read(), turbulentTemperatureRadCoupledMixedFvPatchScalarField::write(), writeCurrentTime(), writeFile(), and writeFile().

◆ startTime_

scalar startTime_
protected

Start time value.

Definition at line 168 of file writeFile.H.

Referenced by newFileAtStartTime(), writeFile(), and writeFile().

◆ ext_

string ext_
protected

File extension; default = .dat.

Definition at line 173 of file writeFile.H.

Referenced by newFile(), newFileAtTime(), setExt(), writeFile(), and writeFile().

◆ addChars

Foam::label addChars = 8
static

Additional characters for writing.

Definition at line 279 of file writeFile.H.

Referenced by charWidth(), and valueWidth().


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