Go to the documentation of this file.
38 namespace functionObjects
45 timeActivatedFileUpdate,
54 void Foam::functionObjects::timeActivatedFileUpdate::updateFile()
61 i < timeVsFile_.size()-1
70 Log <<
nl <<
type() <<
": copying file" <<
nl << timeVsFile_[i].second()
71 <<
nl <<
"to:" <<
nl << fileToUpdate_ <<
nl <<
endl;
77 cp(timeVsFile_[i].second(), destFile);
78 mv(destFile, fileToUpdate_);
88 Foam::functionObjects::timeActivatedFileUpdate::timeActivatedFileUpdate
96 fileToUpdate_(
"unknown-fileToUpdate"),
114 dict.readEntry(
"fileToUpdate", fileToUpdate_);
115 dict.readEntry(
"timeVsFile", timeVsFile_);
118 fileToUpdate_.expand();
121 <<
" time vs file list:" <<
endl;
125 timeVsFile_[i].second() = timeVsFile_[i].second().expand();
126 if (!
isFile(timeVsFile_[i].second()))
129 <<
"File: " << timeVsFile_[i].second() <<
" not found"
133 Info<<
" " << timeVsFile_[i].first() <<
tab
134 << timeVsFile_[i].second() <<
endl;
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
A class for handling words, derived from Foam::string.
bool read(const char *buf, int32_t &val)
Virtual base class for function objects with a reference to Time.
virtual bool read(const dictionary &)
static bool master(const label communicator=worldComm)
bool isFile(const fileName &name, const bool checkGzip=true, const bool followLink=true)
Ostream & endl(Ostream &os)
const Type & value() const
scalar deltaTValue() const noexcept
bool distributed() const noexcept
virtual bool read(const dictionary &dict)
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
bool mv(const fileName &src, const fileName &dst, const bool followLink=false)
Macros for easy insertion into run-time selection tables.
errorManipArg< error, int > exit(error &err, const int errNo=1)
#define FatalErrorInFunction
bool cp(const fileName &src, const fileName &dst, const bool followLink=true)
addToRunTimeSelectionTable(functionObject, ObukhovLength, dictionary)
virtual const word & type() const =0
virtual bool filesModified() const
fileName::Type type(const fileName &name, const bool followLink=true)
defineTypeNameAndDebug(ObukhovLength, 0)
word name(const expressions::valueTypeCode typeCode)