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),
|
||||
codedBase(),
|
||||
dict_(dict),
|
||||
name_
|
||||
(
|
||||
dict.found("redirectType")
|
||||
? dict.lookup("redirectType")
|
||||
: dict.lookup("name")
|
||||
),
|
||||
name_(dict.getCompat<word>("name", {{"redirectType", 1706}})),
|
||||
redirectPatchFieldPtr_()
|
||||
{
|
||||
updateLibrary(name_);
|
||||
|
||||
@ -120,15 +120,7 @@ Foam::codedPoints0MotionSolver::codedPoints0MotionSolver
|
||||
motionSolver(mesh, dict, typeName),
|
||||
codedBase()
|
||||
{
|
||||
// Backward compatibility
|
||||
if (dict.found("redirectType"))
|
||||
{
|
||||
dict.lookup("redirectType") >> name_;
|
||||
}
|
||||
else
|
||||
{
|
||||
dict.lookup("name") >> name_;
|
||||
}
|
||||
dict.readCompat<word>("name", {{"redirectType", 1706}}, name_);
|
||||
|
||||
updateLibrary(name_);
|
||||
redirectMotionSolver();
|
||||
|
||||
@ -215,12 +215,7 @@ Foam::codedFixedValueFvPatchField<Type>::codedFixedValueFvPatchField
|
||||
fixedValueFvPatchField<Type>(p, iF, dict),
|
||||
codedBase(),
|
||||
dict_(dict),
|
||||
name_
|
||||
(
|
||||
dict.found("redirectType")
|
||||
? dict.lookup("redirectType")
|
||||
: dict.lookup("name")
|
||||
),
|
||||
name_(dict.getCompat<word>("name", {{"redirectType", 1706}})),
|
||||
redirectPatchFieldPtr_()
|
||||
{
|
||||
updateLibrary(name_);
|
||||
|
||||
@ -215,12 +215,7 @@ Foam::codedMixedFvPatchField<Type>::codedMixedFvPatchField
|
||||
mixedFvPatchField<Type>(p, iF, dict),
|
||||
codedBase(),
|
||||
dict_(dict),
|
||||
name_
|
||||
(
|
||||
dict.found("redirectType")
|
||||
? dict.lookup("redirectType")
|
||||
: dict.lookup("name")
|
||||
),
|
||||
name_(dict.getCompat<word>("name", {{"redirectType", 1706}})),
|
||||
redirectPatchFieldPtr_()
|
||||
{
|
||||
updateLibrary(name_);
|
||||
|
||||
@ -191,15 +191,7 @@ bool Foam::functionObjects::codedFunctionObject::read(const dictionary& dict)
|
||||
{
|
||||
functionObject::read(dict);
|
||||
|
||||
// Backward compatibility
|
||||
if (dict.found("redirectType"))
|
||||
{
|
||||
dict.lookup("redirectType") >> name_;
|
||||
}
|
||||
else
|
||||
{
|
||||
dict.lookup("name") >> name_;
|
||||
}
|
||||
dict.readCompat<word>("name", {{"redirectType", 1706}}, name_);
|
||||
|
||||
const entry* dataPtr = dict.lookupEntryPtr
|
||||
(
|
||||
|
||||
@ -36,15 +36,7 @@ bool Foam::fv::CodedSource<Type>::read(const dictionary& dict)
|
||||
coeffs_.lookup("fields") >> fieldNames_;
|
||||
applied_.setSize(fieldNames_.size(), false);
|
||||
|
||||
// Backward compatibility
|
||||
if (coeffs_.found("redirectType"))
|
||||
{
|
||||
coeffs_.lookup("redirectType") >> name_;
|
||||
}
|
||||
else
|
||||
{
|
||||
coeffs_.lookup("name") >> name_;
|
||||
}
|
||||
dict.readCompat<word>("name", {{"redirectType", 1706}}, name_);
|
||||
|
||||
// Code snippets
|
||||
{
|
||||
|
||||
@ -49,13 +49,9 @@ functions
|
||||
{
|
||||
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
|
||||
#{
|
||||
|
||||
@ -23,13 +23,13 @@ boundaryField
|
||||
{
|
||||
walls
|
||||
{
|
||||
type fixedValue;
|
||||
value $internalField;
|
||||
type fixedValue;
|
||||
value $internalField;
|
||||
}
|
||||
cylinder
|
||||
{
|
||||
type codedFixedValue;
|
||||
name pointDisplacementy_cylinder;
|
||||
name pointDisplacementy_cylinder;
|
||||
type codedFixedValue;
|
||||
code
|
||||
#{
|
||||
const scalar t = this->db().time().value();
|
||||
@ -37,21 +37,21 @@ boundaryField
|
||||
const scalar f = 200;
|
||||
operator==(a*sin(constant::mathematical::twoPi*f*t));
|
||||
#};
|
||||
value $internalField;
|
||||
value $internalField;
|
||||
}
|
||||
"inlet.*"
|
||||
{
|
||||
type fixedValue;
|
||||
value $internalField;
|
||||
type fixedValue;
|
||||
value $internalField;
|
||||
}
|
||||
outlet
|
||||
{
|
||||
type fixedValue;
|
||||
value $internalField;
|
||||
type fixedValue;
|
||||
value $internalField;
|
||||
}
|
||||
frontAndBack
|
||||
{
|
||||
type empty;
|
||||
type empty;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -55,9 +55,9 @@ functions
|
||||
{
|
||||
timeStep
|
||||
{
|
||||
type coded;
|
||||
libs ("libutilityFunctionObjects.so");
|
||||
name setDeltaT;
|
||||
name setDeltaT;
|
||||
type coded;
|
||||
libs ("libutilityFunctionObjects.so");
|
||||
|
||||
code
|
||||
#{
|
||||
|
||||
@ -19,10 +19,10 @@ functions
|
||||
{
|
||||
createVortex
|
||||
{
|
||||
type coded;
|
||||
libs ("libutilityFunctionObjects.so");
|
||||
name createVortices;
|
||||
enabled yes;
|
||||
name createVortices;
|
||||
type coded;
|
||||
libs ("libutilityFunctionObjects.so");
|
||||
enabled yes;
|
||||
|
||||
codeInclude
|
||||
#{
|
||||
|
||||
@ -24,8 +24,8 @@ boundaryField
|
||||
|
||||
inlet
|
||||
{
|
||||
type codedFixedValue;
|
||||
name swirl;
|
||||
type codedFixedValue;
|
||||
|
||||
code
|
||||
#{
|
||||
|
||||
@ -8,8 +8,8 @@
|
||||
|
||||
inletMassFlowRate
|
||||
{
|
||||
type surfaceFieldValue;
|
||||
libs ("libfieldFunctionObjects.so");
|
||||
type surfaceFieldValue;
|
||||
libs ("libfieldFunctionObjects.so");
|
||||
|
||||
fields
|
||||
(
|
||||
@ -31,8 +31,8 @@ inletMassFlowRate
|
||||
|
||||
outletMassFlowRate
|
||||
{
|
||||
type surfaceFieldValue;
|
||||
libs ("libfieldFunctionObjects.so");
|
||||
type surfaceFieldValue;
|
||||
libs ("libfieldFunctionObjects.so");
|
||||
|
||||
fields
|
||||
(
|
||||
@ -54,9 +54,9 @@ outletMassFlowRate
|
||||
|
||||
totalMass
|
||||
{
|
||||
type coded;
|
||||
libs ("libutilityFunctionObjects.so");
|
||||
name error;
|
||||
type coded;
|
||||
libs ("libutilityFunctionObjects.so");
|
||||
|
||||
code
|
||||
#{
|
||||
|
||||
Reference in New Issue
Block a user