mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
STYLE: mark compatibility level for keyword redirectType (issue #912)
- was replaced with "name" in 1706
This commit is contained in:
@ -217,12 +217,7 @@ Foam::codedFixedValuePointPatchField<Type>::codedFixedValuePointPatchField
|
|||||||
fixedValuePointPatchField<Type>(p, iF, dict, valueRequired),
|
fixedValuePointPatchField<Type>(p, iF, dict, valueRequired),
|
||||||
codedBase(),
|
codedBase(),
|
||||||
dict_(dict),
|
dict_(dict),
|
||||||
name_
|
name_(dict.getCompat<word>("name", {{"redirectType", 1706}})),
|
||||||
(
|
|
||||||
dict.found("redirectType")
|
|
||||||
? dict.lookup("redirectType")
|
|
||||||
: dict.lookup("name")
|
|
||||||
),
|
|
||||||
redirectPatchFieldPtr_()
|
redirectPatchFieldPtr_()
|
||||||
{
|
{
|
||||||
updateLibrary(name_);
|
updateLibrary(name_);
|
||||||
|
|||||||
@ -120,15 +120,7 @@ Foam::codedPoints0MotionSolver::codedPoints0MotionSolver
|
|||||||
motionSolver(mesh, dict, typeName),
|
motionSolver(mesh, dict, typeName),
|
||||||
codedBase()
|
codedBase()
|
||||||
{
|
{
|
||||||
// Backward compatibility
|
dict.readCompat<word>("name", {{"redirectType", 1706}}, name_);
|
||||||
if (dict.found("redirectType"))
|
|
||||||
{
|
|
||||||
dict.lookup("redirectType") >> name_;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
dict.lookup("name") >> name_;
|
|
||||||
}
|
|
||||||
|
|
||||||
updateLibrary(name_);
|
updateLibrary(name_);
|
||||||
redirectMotionSolver();
|
redirectMotionSolver();
|
||||||
|
|||||||
@ -215,12 +215,7 @@ Foam::codedFixedValueFvPatchField<Type>::codedFixedValueFvPatchField
|
|||||||
fixedValueFvPatchField<Type>(p, iF, dict),
|
fixedValueFvPatchField<Type>(p, iF, dict),
|
||||||
codedBase(),
|
codedBase(),
|
||||||
dict_(dict),
|
dict_(dict),
|
||||||
name_
|
name_(dict.getCompat<word>("name", {{"redirectType", 1706}})),
|
||||||
(
|
|
||||||
dict.found("redirectType")
|
|
||||||
? dict.lookup("redirectType")
|
|
||||||
: dict.lookup("name")
|
|
||||||
),
|
|
||||||
redirectPatchFieldPtr_()
|
redirectPatchFieldPtr_()
|
||||||
{
|
{
|
||||||
updateLibrary(name_);
|
updateLibrary(name_);
|
||||||
|
|||||||
@ -215,12 +215,7 @@ Foam::codedMixedFvPatchField<Type>::codedMixedFvPatchField
|
|||||||
mixedFvPatchField<Type>(p, iF, dict),
|
mixedFvPatchField<Type>(p, iF, dict),
|
||||||
codedBase(),
|
codedBase(),
|
||||||
dict_(dict),
|
dict_(dict),
|
||||||
name_
|
name_(dict.getCompat<word>("name", {{"redirectType", 1706}})),
|
||||||
(
|
|
||||||
dict.found("redirectType")
|
|
||||||
? dict.lookup("redirectType")
|
|
||||||
: dict.lookup("name")
|
|
||||||
),
|
|
||||||
redirectPatchFieldPtr_()
|
redirectPatchFieldPtr_()
|
||||||
{
|
{
|
||||||
updateLibrary(name_);
|
updateLibrary(name_);
|
||||||
|
|||||||
@ -191,15 +191,7 @@ bool Foam::functionObjects::codedFunctionObject::read(const dictionary& dict)
|
|||||||
{
|
{
|
||||||
functionObject::read(dict);
|
functionObject::read(dict);
|
||||||
|
|
||||||
// Backward compatibility
|
dict.readCompat<word>("name", {{"redirectType", 1706}}, name_);
|
||||||
if (dict.found("redirectType"))
|
|
||||||
{
|
|
||||||
dict.lookup("redirectType") >> name_;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
dict.lookup("name") >> name_;
|
|
||||||
}
|
|
||||||
|
|
||||||
const entry* dataPtr = dict.lookupEntryPtr
|
const entry* dataPtr = dict.lookupEntryPtr
|
||||||
(
|
(
|
||||||
|
|||||||
@ -36,15 +36,7 @@ bool Foam::fv::CodedSource<Type>::read(const dictionary& dict)
|
|||||||
coeffs_.lookup("fields") >> fieldNames_;
|
coeffs_.lookup("fields") >> fieldNames_;
|
||||||
applied_.setSize(fieldNames_.size(), false);
|
applied_.setSize(fieldNames_.size(), false);
|
||||||
|
|
||||||
// Backward compatibility
|
dict.readCompat<word>("name", {{"redirectType", 1706}}, name_);
|
||||||
if (coeffs_.found("redirectType"))
|
|
||||||
{
|
|
||||||
coeffs_.lookup("redirectType") >> name_;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
coeffs_.lookup("name") >> name_;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Code snippets
|
// Code snippets
|
||||||
{
|
{
|
||||||
|
|||||||
@ -49,13 +49,9 @@ functions
|
|||||||
{
|
{
|
||||||
error
|
error
|
||||||
{
|
{
|
||||||
// Load the library containing the 'coded' functionObject
|
|
||||||
libs ("libutilityFunctionObjects.so");
|
|
||||||
|
|
||||||
type coded;
|
|
||||||
|
|
||||||
// Name of on-the-fly generated functionObject
|
|
||||||
name error;
|
name error;
|
||||||
|
type coded;
|
||||||
|
libs ("libutilityFunctionObjects.so");
|
||||||
|
|
||||||
codeEnd
|
codeEnd
|
||||||
#{
|
#{
|
||||||
|
|||||||
@ -28,8 +28,8 @@ boundaryField
|
|||||||
}
|
}
|
||||||
cylinder
|
cylinder
|
||||||
{
|
{
|
||||||
type codedFixedValue;
|
|
||||||
name pointDisplacementy_cylinder;
|
name pointDisplacementy_cylinder;
|
||||||
|
type codedFixedValue;
|
||||||
code
|
code
|
||||||
#{
|
#{
|
||||||
const scalar t = this->db().time().value();
|
const scalar t = this->db().time().value();
|
||||||
|
|||||||
@ -55,9 +55,9 @@ functions
|
|||||||
{
|
{
|
||||||
timeStep
|
timeStep
|
||||||
{
|
{
|
||||||
|
name setDeltaT;
|
||||||
type coded;
|
type coded;
|
||||||
libs ("libutilityFunctionObjects.so");
|
libs ("libutilityFunctionObjects.so");
|
||||||
name setDeltaT;
|
|
||||||
|
|
||||||
code
|
code
|
||||||
#{
|
#{
|
||||||
|
|||||||
@ -19,9 +19,9 @@ functions
|
|||||||
{
|
{
|
||||||
createVortex
|
createVortex
|
||||||
{
|
{
|
||||||
|
name createVortices;
|
||||||
type coded;
|
type coded;
|
||||||
libs ("libutilityFunctionObjects.so");
|
libs ("libutilityFunctionObjects.so");
|
||||||
name createVortices;
|
|
||||||
enabled yes;
|
enabled yes;
|
||||||
|
|
||||||
codeInclude
|
codeInclude
|
||||||
|
|||||||
@ -24,8 +24,8 @@ boundaryField
|
|||||||
|
|
||||||
inlet
|
inlet
|
||||||
{
|
{
|
||||||
type codedFixedValue;
|
|
||||||
name swirl;
|
name swirl;
|
||||||
|
type codedFixedValue;
|
||||||
|
|
||||||
code
|
code
|
||||||
#{
|
#{
|
||||||
|
|||||||
@ -54,9 +54,9 @@ outletMassFlowRate
|
|||||||
|
|
||||||
totalMass
|
totalMass
|
||||||
{
|
{
|
||||||
|
name error;
|
||||||
type coded;
|
type coded;
|
||||||
libs ("libutilityFunctionObjects.so");
|
libs ("libutilityFunctionObjects.so");
|
||||||
name error;
|
|
||||||
|
|
||||||
code
|
code
|
||||||
#{
|
#{
|
||||||
|
|||||||
Reference in New Issue
Block a user