ENH: add remove objects handling in timeFunctionObject and regionFunctionObject

- makes it easier to implement functionObject or field object removal
This commit is contained in:
Mark Olesen
2019-02-08 17:47:45 +01:00
committed by Andrew Heather
parent 8f92fa016f
commit e2754962cc
19 changed files with 83 additions and 48 deletions

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2015-2017 OpenCFD Ltd.
\\ / A nd | Copyright (C) 2015-2019 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -564,7 +564,7 @@ bool Foam::functionObjects::externalCoupled::end()
bool Foam::functionObjects::externalCoupled::read(const dictionary& dict)
{
functionObject::read(dict);
timeFunctionObject::read(dict);
externalFileCoupler::readDict(dict);
calcFrequency_ = dict.lookupOrDefault("calcFrequency", 1);

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2015-2017 OpenCFD Ltd.
\\ / A nd | Copyright (C) 2015-2019 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -160,7 +160,7 @@ SourceFiles
namespace Foam
{
// Forward declaration of classes
// Forward Declarations
class fvMesh;
class IFstream;
@ -168,7 +168,7 @@ namespace functionObjects
{
/*---------------------------------------------------------------------------*\
Class functionObjects::externalCoupled Declaration
Class externalCoupled Declaration
\*---------------------------------------------------------------------------*/
class externalCoupled

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2016-2018 OpenCFD Ltd.
\\ / A nd | Copyright (C) 2016-2019 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
| Copyright (C) 2011-2017 OpenFOAM Foundation
@ -159,7 +159,7 @@ Foam::functionObjects::abort::abort
bool Foam::functionObjects::abort::read(const dictionary& dict)
{
functionObject::read(dict);
timeFunctionObject::read(dict);
file_.clear();

View File

@ -136,12 +136,7 @@ public:
// Constructors
//- Construct from Time and dictionary
abort
(
const word& name,
const Time& runTime,
const dictionary& dict
);
abort(const word& name, const Time& runTime, const dictionary& dict);
//- Destructor

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd |
\\ / A nd | Copyright (C) 2019 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
| Copyright (C) 2011-2017 OpenFOAM Foundation
@ -185,7 +185,7 @@ bool Foam::functionObjects::codedFunctionObject::end()
bool Foam::functionObjects::codedFunctionObject::read(const dictionary& dict)
{
functionObject::read(dict);
timeFunctionObject::read(dict);
dict.readCompat<word>("name", {{"redirectType", 1706}}, name_);

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2016 OpenCFD Ltd.
\\ / A nd | Copyright (C) 2016-2019 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
| Copyright (C) 2013-2016 OpenFOAM Foundation
@ -89,7 +89,7 @@ bool Foam::functionObjects::setTimeStepFunctionObject::read
const dictionary& dict
)
{
functionObject::read(dict);
timeFunctionObject::read(dict);
timeStepPtr_ = Function1<scalar>::New("deltaT", dict);

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd |
\\ / A nd | Copyright (C) 2019 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
| Copyright (C) 2013-2017 OpenFOAM Foundation
@ -82,7 +82,7 @@ namespace functionObjects
{
/*---------------------------------------------------------------------------*\
Class functionObjects::setTimeStepFunctionObject Declaration
Class setTimeStepFunctionObject Declaration
\*---------------------------------------------------------------------------*/
class setTimeStepFunctionObject

View File

@ -90,8 +90,8 @@ Foam::functionObjects::systemCall::systemCall
:
functionObject(name),
executeCalls_(),
endCalls_(),
writeCalls_(),
endCalls_(),
masterOnly_(false)
{
read(dict);

View File

@ -118,12 +118,12 @@ protected:
//- List of calls to execute - every step
stringList executeCalls_;
//- List of calls to execute when exiting the time-loop
stringList endCalls_;
//- List of calls to execute - write steps
stringList writeCalls_;
//- List of calls to execute when exiting the time-loop
stringList endCalls_;
//- Perform system calls on the master only
bool masterOnly_;

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2015-2017 OpenCFD Ltd.
\\ / A nd | Copyright (C) 2015-2019 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
| Copyright (C) 2011-2016 OpenFOAM Foundation
@ -108,7 +108,7 @@ bool Foam::functionObjects::timeActivatedFileUpdate::read
const dictionary& dict
)
{
functionObject::read(dict);
timeFunctionObject::read(dict);
dict.readEntry("fileToUpdate", fileToUpdate_);
dict.readEntry("timeVsFile", timeVsFile_);

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2017 OpenCFD Ltd.
\\ / A nd | Copyright (C) 2017-2019 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
| Copyright (C) 2011-2016 OpenFOAM Foundation
@ -80,14 +80,14 @@ SourceFiles
namespace Foam
{
// Forward declaration of classes
// Forward Declarations
class Time;
namespace functionObjects
{
/*---------------------------------------------------------------------------*\
Class functionObjects::timeActivatedFileUpdate Declaration
Class timeActivatedFileUpdate Declaration
\*---------------------------------------------------------------------------*/
class timeActivatedFileUpdate

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2017-2018 OpenCFD Ltd.
\\ / A nd | Copyright (C) 2017-2019 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -161,7 +161,7 @@ Foam::functionObjects::vtkWrite::vtkWrite
bool Foam::functionObjects::vtkWrite::read(const dictionary& dict)
{
functionObject::read(dict);
timeFunctionObject::read(dict);
readSelection(dict);

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2017-2018 OpenCFD Ltd.
\\ / A nd | Copyright (C) 2017-2019 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License