38namespace functionObjects
54void Foam::functionObjects::timeActivatedFileUpdate::updateFile()
61 i < timeVsFile_.size()-1
70 const fileName& srcFile = timeVsFile_[i].second();
101 fileToUpdate_(
"unknown-fileToUpdate"),
119 dict.readEntry(
"fileToUpdate", fileToUpdate_);
120 dict.readEntry(
"timeVsFile", timeVsFile_);
123 fileToUpdate_.expand();
126 <<
" time vs file list:" <<
endl;
130 timeVsFile_[i].second().expand();
131 const fileName& srcFile = timeVsFile_[i].second();
134 Info<<
" " << timeVsFile_[i].first() <<
tab
135 << time_.relativePath(srcFile,
true) <<
endl;
143 <<
"File not found: " << srcFile <<
endl
Macros for easy insertion into run-time selection tables.
#define addToRunTimeSelectionTable(baseType, thisType, argNames)
Add to construction table with typeName as the key.
virtual bool read()
Re-read model coefficients if they have changed.
bool distributed() const noexcept
fileName relativePath(const fileName &input, const bool caseTag=false) const
scalar deltaTValue() const noexcept
Return time step value.
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
const Type & value() const
Return const reference to value.
A class for handling file names.
Abstract base-class for Time/database function objects.
virtual const word & type() const =0
Runtime type information.
Performs a file copy/replacement once a specified time has been reached.
virtual bool filesModified() const
Did any file get changed during execution?
virtual bool execute()
Execute file updates.
virtual bool write()
Do nothing.
virtual bool read(const dictionary &)
Read the timeActivatedFileUpdate data.
Virtual base class for function objects with a reference to Time.
const Time & time_
Reference to the time database.
splitCell * master() const
A class for handling words, derived from Foam::string.
#define defineTypeNameAndDebug(Type, DebugSwitch)
Define the typeName and debug information.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
messageStream Info
Information stream (stdout output on master, null elsewhere)
fileName::Type type(const fileName &name, const bool followLink=true)
Return the file type: DIRECTORY or FILE, normally following symbolic links.
Ostream & endl(Ostream &os)
Add newline and flush stream.
pid_t pid()
Return the PID of this process.
bool isFile(const fileName &name, const bool checkGzip=true, const bool followLink=true)
Does the name exist as a FILE in the file system?
bool cp(const fileName &src, const fileName &dst, const bool followLink=true)
Copy the source to the destination (recursively if necessary).
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for INVALID.
bool mv(const fileName &src, const fileName &dst, const bool followLink=false)
Rename src to dst.
errorManipArg< error, int > exit(error &err, const int errNo=1)
constexpr char nl
The newline '\n' character (0x0a)
constexpr char tab
The tab '\t' character(0x09)
#define forAll(list, i)
Loop across all elements in list.