mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: Function objects - first pass at updating read functionality
Note: should be using the result of the parent::read(dict) when deciding whether to read local entries...
This commit is contained in:
@ -3,7 +3,7 @@
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
\\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -114,6 +114,8 @@ Foam::functionObjects::abort::~abort()
|
||||
|
||||
bool Foam::functionObjects::abort::read(const dictionary& dict)
|
||||
{
|
||||
functionObject::read(dict);
|
||||
|
||||
if (dict.found("action"))
|
||||
{
|
||||
action_ = actionTypeNames_.read(dict.lookup("action"));
|
||||
|
||||
@ -184,6 +184,8 @@ bool Foam::codedFunctionObject::end()
|
||||
|
||||
bool Foam::codedFunctionObject::read(const dictionary& dict)
|
||||
{
|
||||
functionObject::read(dict);
|
||||
|
||||
// Backward compatibility
|
||||
if (dict.found("redirectType"))
|
||||
{
|
||||
|
||||
@ -72,6 +72,8 @@ Foam::functionObjects::removeRegisteredObject::~removeRegisteredObject()
|
||||
|
||||
bool Foam::functionObjects::removeRegisteredObject::read(const dictionary& dict)
|
||||
{
|
||||
regionFunctionObject::read(dict);
|
||||
|
||||
dict.lookup("objects") >> objectNames_;
|
||||
|
||||
return true;
|
||||
|
||||
@ -77,6 +77,8 @@ bool Foam::functionObjects::runTimeControls::runTimeControl::read
|
||||
const dictionary& dict
|
||||
)
|
||||
{
|
||||
fvMeshFunctionObject::read(dict);
|
||||
|
||||
const dictionary& conditionsDict = dict.subDict("conditions");
|
||||
const wordList conditionNames(conditionsDict.toc());
|
||||
conditions_.setSize(conditionNames.size());
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2013-2016 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
\\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -92,6 +92,8 @@ bool Foam::functionObjects::setTimeStepFunctionObject::read
|
||||
const dictionary& dict
|
||||
)
|
||||
{
|
||||
functionObject::read(dict);
|
||||
|
||||
timeStepPtr_ = Function1<scalar>::New("deltaT", dict);
|
||||
|
||||
// Check that adjustTimeStep is active
|
||||
|
||||
@ -74,6 +74,8 @@ Foam::functionObjects::systemCall::~systemCall()
|
||||
|
||||
bool Foam::functionObjects::systemCall::read(const dictionary& dict)
|
||||
{
|
||||
functionObject::read(dict);
|
||||
|
||||
dict.readIfPresent("executeCalls", executeCalls_);
|
||||
dict.readIfPresent("endCalls", endCalls_);
|
||||
dict.readIfPresent("writeCalls", writeCalls_);
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
|
||||
\\/ M anipulation | Copyright (C) 2015-2016 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -103,6 +103,8 @@ bool Foam::functionObjects::timeActivatedFileUpdate::read
|
||||
const dictionary& dict
|
||||
)
|
||||
{
|
||||
functionObject::read(dict);
|
||||
|
||||
dict.lookup("fileToUpdate") >> fileToUpdate_;
|
||||
dict.lookup("timeVsFile") >> timeVsFile_;
|
||||
|
||||
|
||||
@ -122,6 +122,8 @@ Foam::functionObjects::writeDictionary::~writeDictionary()
|
||||
|
||||
bool Foam::functionObjects::writeDictionary::read(const dictionary& dict)
|
||||
{
|
||||
regionFunctionObject::read(dict);
|
||||
|
||||
wordList dictNames(dict.lookup("dictNames"));
|
||||
HashSet<word> uniqueNames(dictNames);
|
||||
dictNames_ = uniqueNames.toc();
|
||||
|
||||
@ -98,6 +98,8 @@ Foam::functionObjects::writeObjects::~writeObjects()
|
||||
|
||||
bool Foam::functionObjects::writeObjects::read(const dictionary& dict)
|
||||
{
|
||||
functionObject::read(dict);
|
||||
|
||||
if (dict.found("field"))
|
||||
{
|
||||
objectNames_.setSize(1);
|
||||
|
||||
Reference in New Issue
Block a user