mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: Added state dictionary to functionObjectList
Note: added as a pointer since the list operates in multiple modes, e.g. as constructed by the Time database and 'outside' by execFlowFunctionObjects
This commit is contained in:
@ -2,8 +2,8 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
|
||||
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -43,6 +43,7 @@ SourceFiles
|
||||
#include "functionObject.H"
|
||||
#include "SHA1Digest.H"
|
||||
#include "HashTable.H"
|
||||
#include "IOdictionary.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -74,6 +75,9 @@ class functionObjectList
|
||||
// functionObject specifications.
|
||||
const dictionary& parentDict_;
|
||||
|
||||
//- Function object properties - stores state information
|
||||
mutable autoPtr<IOdictionary> stateDictPtr_;
|
||||
|
||||
//- Switch for the execution of the functionObjects
|
||||
bool execution_;
|
||||
|
||||
@ -83,6 +87,9 @@ class functionObjectList
|
||||
|
||||
// Private Member Functions
|
||||
|
||||
//- Create state dictionary
|
||||
void createStateDict() const;
|
||||
|
||||
//- Remove and return the function object pointer by name,
|
||||
// and returns the old index via the parameter.
|
||||
// Returns a NULL pointer (and index -1) if it didn't exist.
|
||||
@ -136,6 +143,12 @@ public:
|
||||
//- Access to the functionObjects
|
||||
using PtrList<functionObject>::operator[];
|
||||
|
||||
//- Return the state dictionary
|
||||
IOdictionary& stateDict();
|
||||
|
||||
//- Return const access to the state dictionary
|
||||
const IOdictionary& stateDict() const;
|
||||
|
||||
//- Clear the list of function objects
|
||||
virtual void clear();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user