timeActivatedFileUpdate Class Reference

Performs a file copy/replacement once a specified time has been reached. More...

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

Public Member Functions

 TypeName ("timeActivatedFileUpdate")
 Runtime type information. More...
 
 timeActivatedFileUpdate (const word &name, const Time &runTime, const dictionary &dict)
 Construct from Time and dictionary. More...
 
virtual ~timeActivatedFileUpdate ()=default
 Destructor. More...
 
virtual bool read (const dictionary &)
 Read the timeActivatedFileUpdate data. More...
 
virtual bool execute ()
 Execute file updates. More...
 
virtual bool write ()
 Do nothing. More...
 
virtual bool filesModified () const
 Did any file get changed during execution? More...
 
- Public Member Functions inherited from timeFunctionObject
 timeFunctionObject (const word &name, const Time &runTime)
 Construct from Time. More...
 
virtual ~timeFunctionObject ()=default
 Destructor. More...
 
const Timetime () const
 Return time database. More...
 
objectRegistrystoredObjects ()
 
const objectRegistrystoredObjects () const
 
- Public Member Functions inherited from functionObject
 declareRunTimeSelectionTable (autoPtr, functionObject, dictionary,(const word &name, const Time &runTime, const dictionary &dict),(name, runTime, dict))
 
 functionObject (const word &name, const bool withNamePrefix=defaultUseNamePrefix)
 Construct from components. More...
 
autoPtr< functionObjectclone () const
 Return clone. More...
 
virtual ~functionObject ()=default
 Destructor. More...
 
virtual const wordtype () const =0
 Runtime type information. More...
 
const wordname () const noexcept
 Return the name of this functionObject. More...
 
bool useNamePrefix () const noexcept
 Return the flag for adding a scoping name prefix. More...
 
bool useNamePrefix (bool on) noexcept
 Modify the flag for adding a scoping name prefix. More...
 
virtual bool execute (const label subIndex)
 Execute using the specified subIndex. More...
 
virtual bool end ()
 Called when Time::run() determines that the time-loop exits. More...
 
virtual bool adjustTimeStep ()
 Called at the end of Time::adjustDeltaT() if adjustTime is true. More...
 
virtual void updateMesh (const mapPolyMesh &mpm)
 Update for changes of mesh. More...
 
virtual void movePoints (const polyMesh &mesh)
 Update for changes of mesh. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from functionObject
static autoPtr< functionObjectNew (const word &name, const Time &runTime, const dictionary &dict)
 Select from dictionary, based on its "type" entry. More...
 
- Public Attributes inherited from functionObject
bool log
 Flag to write log into Info. More...
 
- Static Public Attributes inherited from functionObject
static int debug
 Flag to execute debug content. More...
 
static bool postProcess
 Global post-processing mode switch. More...
 
static bool defaultUseNamePrefix
 Global default for useNamePrefix. More...
 
static word outputPrefix
 Directory prefix. More...
 
- Protected Member Functions inherited from timeFunctionObject
void clearOutputObjects (const wordList &objNames)
 Remove specified items from "functionObjectObjects". More...
 
 timeFunctionObject (const timeFunctionObject &)=delete
 No copy construct. More...
 
void operator= (const timeFunctionObject &)=delete
 No copy assignment. More...
 
- Protected Member Functions inherited from functionObject
word scopedName (const word &name) const
 Return a scoped (prefixed) name. More...
 
- Protected Attributes inherited from timeFunctionObject
const Timetime_
 Reference to the time database. More...
 

Detailed Description

Performs a file copy/replacement once a specified time has been reached.

Usage
Example usage to update the fvSolution dictionary at various times throughout the calculation:
fileUpdate1
{
    type              timeActivatedFileUpdate;
    libs              (utilityFunctionObjects);
    writeControl      timeStep;
    writeInterval     1;
    fileToUpdate      "<system>/fvSolution";
    timeVsFile
    (
        (-1   "<system>/fvSolution.0")
        (0.10 "<system>/fvSolution.10")
        (0.20 "<system>/fvSolution.20")
        (0.35 "<system>/fvSolution.35")
    );
    ...
}

Where the entries comprise:

Property Description Required Default value
type Type name: timeActivatedFileUpdate yes
fileToUpdate Name of file to update yes
timeVsFile List of time vs file yes
Source files

Definition at line 113 of file timeActivatedFileUpdate.H.

Constructor & Destructor Documentation

◆ timeActivatedFileUpdate()

timeActivatedFileUpdate ( const word name,
const Time runTime,
const dictionary dict 
)

Construct from Time and dictionary.

Definition at line 89 of file timeActivatedFileUpdate.C.

References dict, and Foam::read().

Here is the call graph for this function:

◆ ~timeActivatedFileUpdate()

virtual ~timeActivatedFileUpdate ( )
virtualdefault

Destructor.

Member Function Documentation

◆ TypeName()

TypeName ( "timeActivatedFileUpdate"  )

Runtime type information.

◆ read()

bool read ( const dictionary dict)
virtual

Read the timeActivatedFileUpdate data.

Reimplemented from functionObject.

Definition at line 108 of file timeActivatedFileUpdate.C.

References dict, Foam::endl(), Foam::exit(), Foam::FatalError, FatalErrorInFunction, forAll, Foam::Info, Foam::isFile(), Foam::name(), Foam::nl, functionObject::read(), Foam::tab, and Foam::type().

Here is the call graph for this function:

◆ execute()

bool execute ( )
virtual

Execute file updates.

Implements functionObject.

Definition at line 144 of file timeActivatedFileUpdate.C.

◆ write()

bool write ( )
virtual

Do nothing.

Implements functionObject.

Definition at line 152 of file timeActivatedFileUpdate.C.

◆ filesModified()

bool filesModified ( ) const
virtual

Did any file get changed during execution?

Reimplemented from functionObject.

Definition at line 158 of file timeActivatedFileUpdate.C.


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