mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
Merge branch 'merge-foundation' of develop.openfoam.com:Development/OpenFOAM-plus into merge-foundation
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;
|
||||
|
||||
@ -87,7 +87,13 @@ void Foam::functionObjects::residuals::writeResidual(const word& fieldName)
|
||||
{
|
||||
if (component(validComponents, cmpt) != -1)
|
||||
{
|
||||
file() << token::TAB << component(residual, cmpt);
|
||||
const scalar r = component(residual, cmpt);
|
||||
|
||||
file() << token::TAB << r;
|
||||
|
||||
const word resultName =
|
||||
fieldName + word(pTraits<Type>::componentNames[cmpt]);
|
||||
setResult(resultName, r);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -60,8 +60,8 @@ public:
|
||||
|
||||
enum operatingMode
|
||||
{
|
||||
omMin, //< Minimum
|
||||
omMax //< Maximum
|
||||
omMin, //!< Minimum
|
||||
omMax //!< Maximum
|
||||
};
|
||||
|
||||
static const NamedEnum<operatingMode, 2> operatingModeNames;
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2015 OpenFOAM Foundation
|
||||
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
|
||||
\\/ M anipulation | Copyright (C) 2015-2016 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -53,16 +53,21 @@ namespace runTimeControls
|
||||
defineTypeNameAndDebug(minMaxCondition, 0);
|
||||
addToRunTimeSelectionTable(runTimeCondition, minMaxCondition, dictionary);
|
||||
|
||||
template<>
|
||||
const char* NamedEnum<minMaxCondition::modeType, 2>::names[] =
|
||||
{
|
||||
"minimum",
|
||||
"maximum"
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
template<>
|
||||
const char* Foam::NamedEnum
|
||||
<
|
||||
Foam::functionObjects::runTimeControls::minMaxCondition::modeType,
|
||||
2
|
||||
>::names[] =
|
||||
{
|
||||
"minimum",
|
||||
"maximum"
|
||||
};
|
||||
|
||||
const Foam::NamedEnum
|
||||
<
|
||||
Foam
|
||||
@ -86,7 +91,7 @@ Foam::functionObjects::runTimeControls::minMaxCondition::minMaxCondition
|
||||
)
|
||||
:
|
||||
runTimeCondition(name, obr, dict, state),
|
||||
functionObjectName_(dict.lookup("functionObjectName")),
|
||||
functionObjectName_(dict.lookup("functionObject")),
|
||||
mode_(modeTypeNames_.read(dict.lookup("mode"))),
|
||||
fieldNames_(dict.lookup("fields")),
|
||||
value_(readScalar(dict.lookup("value")))
|
||||
|
||||
@ -64,8 +64,8 @@ public:
|
||||
// Mode type
|
||||
enum modeType
|
||||
{
|
||||
mdMin, //< Minimum
|
||||
mdMax //< Maximum
|
||||
mdMin, //!< Minimum
|
||||
mdMax //!< Maximum
|
||||
};
|
||||
|
||||
static const NamedEnum<modeType, 2> modeTypeNames_;
|
||||
|
||||
@ -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