Loading...
Searching...
No Matches
timeActivatedFileUpdate Class Reference

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

#include <timeActivatedFileUpdate.H>

Inheritance diagram for timeActivatedFileUpdate:
Collaboration diagram for timeActivatedFileUpdate:

Public Member Functions

 TypeName ("timeActivatedFileUpdate")
 Runtime type information.
 timeActivatedFileUpdate (const word &name, const Time &runTime, const dictionary &dict)
 Construct from name, Time and dictionary.
virtual ~timeActivatedFileUpdate ()=default
 Destructor.
virtual bool read (const dictionary &)
 Read the function-object dictionary.
virtual bool execute ()
 Execute the function-object operations.
virtual bool write ()
 Write the function-object results (no-op).
virtual bool filesModified () const
 Did any file get changed during execution?
Public Member Functions inherited from timeFunctionObject
 timeFunctionObject (const word &name, const Time &runTime)
 Construct from Time.
virtual ~timeFunctionObject ()=default
 Destructor.
const Timetime () const
 Return time database.
objectRegistrystoredObjects ()
 Write access to the output objects ("functionObjectObjects") registered on Time.
const objectRegistrystoredObjects () const
 Const access to the output objects ("functionObjectObjects") registered on Time.
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.
autoPtr< functionObjectclone () const
 Return clone.
virtual ~functionObject ()=default
 Destructor.
virtual const wordtype () const =0
 Runtime type information.
const wordname () const noexcept
 Return the name of this functionObject.
bool useNamePrefix () const noexcept
 Return the flag for adding a scoping name prefix.
bool useNamePrefix (bool on) noexcept
 Modify the flag for adding a scoping name prefix.
virtual bool execute (const label subIndex)
 Execute using the specified subIndex.
virtual bool end ()
 Called when Time::run() determines that the time-loop exits.
virtual bool adjustTimeStep ()
 Called at the end of Time::adjustDeltaT() if adjustTime is true.
virtual void updateMesh (const mapPolyMesh &mpm)
 Update for changes of mesh.
virtual void movePoints (const polyMesh &mesh)
 Update for changes of mesh.

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.
Public Attributes inherited from functionObject
bool log
 Flag to write log into Info.
Static Public Attributes inherited from functionObject
static int debug
 Flag to execute debug content.
static bool postProcess
 Global post-processing mode switch.
static bool defaultUseNamePrefix
 Global default for useNamePrefix.
static word outputPrefix
 Directory prefix.
Protected Member Functions inherited from timeFunctionObject
void clearOutputObjects (const wordList &objNames)
 Remove specified items from "functionObjectObjects".
 timeFunctionObject (const timeFunctionObject &)=delete
 No copy construct.
void operator= (const timeFunctionObject &)=delete
 No copy assignment.
Protected Member Functions inherited from functionObject
word scopedName (const word &name) const
 Return a scoped (prefixed) name.
Protected Attributes inherited from timeFunctionObject
const Timetime_
 Reference to the time database.

Detailed Description

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

Usage
Minimal example by using system/controlDict.functions:
fileUpdateFO
{
    // Mandatory entries
    type              timeActivatedFileUpdate;
    libs              (utilityFunctionObjects);

    fileToUpdate      <fileName>;  // "<system>/fvSolution";
    timeVsFile        <Tuple2<scalar, fileName>>;
    timeVsFile
    (
        (-1   "<system>/fvSolution.0")
        (0.10 "<system>/fvSolution.10")
        (0.20 "<system>/fvSolution.20")
        (0.35 "<system>/fvSolution.35")
    );

    // Inherited entries
    ...
}

where the entries mean:

Property Description Type Reqd Deflt
type Type name: timeActivatedFileUpdate word yes -
libs Library name: utilityFunctionObjects word yes -
fileToUpdate Name of the file to update fileName yes -
timeVsFile List of times vs files scalar, fileName yes -

The inherited entries are elaborated in:

Source files

Definition at line 123 of file timeActivatedFileUpdate.H.

Constructor & Destructor Documentation

◆ timeActivatedFileUpdate()

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

Construct from name, Time and dictionary.

Definition at line 93 of file timeActivatedFileUpdate.C.

References dict, functionObject::name(), read(), runTime, and timeFunctionObject::timeFunctionObject().

Here is the call graph for this function:

◆ ~timeActivatedFileUpdate()

virtual ~timeActivatedFileUpdate ( )
virtualdefault

Destructor.

Member Function Documentation

◆ TypeName()

TypeName ( "timeActivatedFileUpdate" )

Runtime type information.

References dict, functionObject::name(), and runTime.

Here is the call graph for this function:

◆ read()

bool read ( const dictionary & dict)
virtual

Read the function-object dictionary.

Reimplemented from functionObject.

Definition at line 112 of file timeActivatedFileUpdate.C.

References dict, Foam::endl(), Foam::exit(), string::expand(), Foam::FatalIOError, FatalIOErrorInFunction, Foam::Info, Foam::isFile(), UPstream::master(), name, Foam::nl, functionObject::read(), Foam::tab, timeFunctionObject::time_, and Foam::type().

Referenced by timeActivatedFileUpdate().

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

◆ execute()

bool execute ( )
virtual

Execute the function-object operations.

Implements functionObject.

Definition at line 165 of file timeActivatedFileUpdate.C.

◆ write()

bool write ( )
virtual

Write the function-object results (no-op).

Implements functionObject.

Definition at line 173 of file timeActivatedFileUpdate.C.

◆ filesModified()

bool filesModified ( ) const
virtual

Did any file get changed during execution?

Reimplemented from functionObject.

Definition at line 179 of file timeActivatedFileUpdate.C.


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