Public Member Functions | Private Member Functions | Private Attributes
timeActivatedFileUpdate Class Reference

This function object performs a file copy/replacement once a specified time has been reached. More...

Collaboration diagram for timeActivatedFileUpdate:
Collaboration graph
[legend]

Public Member Functions

 TypeName ("timeActivatedFileUpdate")
 Runtime type information. More...
 
 timeActivatedFileUpdate (const word &name, const objectRegistry &, const dictionary &, const bool loadFromFiles=false)
 Construct for given objectRegistry and dictionary. More...
 
virtual ~timeActivatedFileUpdate ()
 Destructor. More...
 
virtual const wordname () const
 Return name of the set of timeActivatedFileUpdate. More...
 
virtual void read (const dictionary &)
 Read the timeActivatedFileUpdate data. More...
 
virtual void execute ()
 Execute, currently does nothing. More...
 
virtual void end ()
 Execute at the final time-loop, currently does nothing. More...
 
virtual void timeSet ()
 Called when time was set at the end of the Time::operator++. More...
 
virtual void write ()
 Calculate the timeActivatedFileUpdate and write. More...
 
virtual void updateMesh (const mapPolyMesh &)
 Update for changes of mesh. More...
 
virtual void movePoints (const polyMesh &)
 Update for changes of mesh. More...
 

Private Member Functions

void updateFile ()
 Update file. More...
 
 timeActivatedFileUpdate (const timeActivatedFileUpdate &)
 Disallow default bitwise copy construct. More...
 
void operator= (const timeActivatedFileUpdate &)
 Disallow default bitwise assignment. More...
 

Private Attributes

word name_
 Name of this set of timeActivatedFileUpdate objects. More...
 
const objectRegistryobr_
 Owner database. More...
 
bool active_
 On/off switch. More...
 
fileName fileToUpdate_
 Name of file to update. More...
 
List< Tuple2< scalar, fileName > > timeVsFile_
 List of times vs filenames. More...
 
label lastIndex_
 Index of last file copied. More...
 
Switch log_
 Switch to send output to Info as well as to file. More...
 

Detailed Description

This function object performs a file copy/replacement once a specified time has been reached.

Example usage to update the fvSolution dictionary at various times throughout the calculation:

fileUpdate1
{
    type              timeActivatedFileUpdate;
    functionObjectLibs ("libutilityFunctionObjects.so");
    fileToUpdate      "$FOAM_CASE/system/fvSolution";
    timeVsFile
    (
        (-1 "$FOAM_CASE/system/fvSolution.0")
        (0.10 "$FOAM_CASE/system/fvSolution.10")
        (0.20 "$FOAM_CASE/system/fvSolution.20")
        (0.35 "$FOAM_CASE/system/fvSolution.35")
    );
    ...
}


Function object usage

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

Definition at line 114 of file timeActivatedFileUpdate.H.

Constructor & Destructor Documentation

◆ timeActivatedFileUpdate() [1/2]

Disallow default bitwise copy construct.

◆ timeActivatedFileUpdate() [2/2]

timeActivatedFileUpdate ( const word name,
const objectRegistry obr,
const dictionary dict,
const bool  loadFromFiles = false 
)

Construct for given objectRegistry and dictionary.

Allow the possibility to load fields from files

Definition at line 68 of file timeActivatedFileUpdate.C.

References dict, and Foam::read().

Here is the call graph for this function:

◆ ~timeActivatedFileUpdate()

Destructor.

Definition at line 89 of file timeActivatedFileUpdate.C.

Member Function Documentation

◆ updateFile()

void updateFile ( )
private

◆ operator=()

void operator= ( const timeActivatedFileUpdate )
private

Disallow default bitwise assignment.

◆ TypeName()

TypeName ( "timeActivatedFileUpdate"  )

Runtime type information.

◆ name()

virtual const word& name ( ) const
inlinevirtual

Return name of the set of timeActivatedFileUpdate.

Definition at line 178 of file timeActivatedFileUpdate.H.

References timeActivatedFileUpdate::name_.

◆ read()

void read ( const dictionary dict)
virtual

◆ execute()

void execute ( )
virtual

Execute, currently does nothing.

Definition at line 132 of file timeActivatedFileUpdate.C.

◆ end()

void end ( )
virtual

Execute at the final time-loop, currently does nothing.

Definition at line 141 of file timeActivatedFileUpdate.C.

◆ timeSet()

void timeSet ( )
virtual

Called when time was set at the end of the Time::operator++.

Definition at line 147 of file timeActivatedFileUpdate.C.

◆ write()

void write ( )
virtual

Calculate the timeActivatedFileUpdate and write.

Definition at line 153 of file timeActivatedFileUpdate.C.

◆ updateMesh()

virtual void updateMesh ( const mapPolyMesh )
inlinevirtual

Update for changes of mesh.

Definition at line 199 of file timeActivatedFileUpdate.H.

◆ movePoints()

virtual void movePoints ( const polyMesh )
inlinevirtual

Update for changes of mesh.

Definition at line 203 of file timeActivatedFileUpdate.H.

Field Documentation

◆ name_

word name_
private

Name of this set of timeActivatedFileUpdate objects.

Definition at line 119 of file timeActivatedFileUpdate.H.

Referenced by timeActivatedFileUpdate::name().

◆ obr_

const objectRegistry& obr_
private

Owner database.

Definition at line 122 of file timeActivatedFileUpdate.H.

Referenced by timeActivatedFileUpdate::updateFile().

◆ active_

bool active_
private

On/off switch.

Definition at line 125 of file timeActivatedFileUpdate.H.

◆ fileToUpdate_

fileName fileToUpdate_
private

Name of file to update.

Definition at line 128 of file timeActivatedFileUpdate.H.

Referenced by timeActivatedFileUpdate::updateFile().

◆ timeVsFile_

List<Tuple2<scalar, fileName> > timeVsFile_
private

List of times vs filenames.

Definition at line 131 of file timeActivatedFileUpdate.H.

Referenced by timeActivatedFileUpdate::updateFile().

◆ lastIndex_

label lastIndex_
private

Index of last file copied.

Definition at line 134 of file timeActivatedFileUpdate.H.

Referenced by timeActivatedFileUpdate::updateFile().

◆ log_

Switch log_
private

Switch to send output to Info as well as to file.

Definition at line 137 of file timeActivatedFileUpdate.H.

Referenced by timeActivatedFileUpdate::updateFile().


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