functionObjects::fieldExpression: fieldName is now const as it cannot be changed after construction
This commit is contained in:
@ -78,8 +78,6 @@ bool Foam::functionObjects::blendingFactor::read(const dictionary& dict)
|
||||
{
|
||||
phiName_ = dict.lookupOrDefault<word>("phi", "phi");
|
||||
|
||||
resultName_ = "blendingFactor:" + fieldName_;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2016-2018 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2016-2019 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -41,10 +41,8 @@ bool Foam::functionObjects::components::calcFieldComponents()
|
||||
|
||||
for (direction i=0; i<Type::nComponents; i++)
|
||||
{
|
||||
resultName_ = fieldName_ + word(Type::componentNames[i]);
|
||||
resultNames_[i] = resultName_;
|
||||
|
||||
stored = stored && store(resultName_, field.component(i));
|
||||
resultNames_[i] = fieldName_ + word(Type::componentNames[i]);
|
||||
stored = stored && store(resultNames_[i], field.component(i));
|
||||
}
|
||||
|
||||
return stored;
|
||||
|
||||
@ -60,7 +60,7 @@ protected:
|
||||
// Protected member data
|
||||
|
||||
//- Name of field to process
|
||||
word fieldName_;
|
||||
const word fieldName_;
|
||||
|
||||
//- Name of result field
|
||||
word resultName_;
|
||||
|
||||
@ -63,7 +63,7 @@ Foam::functionObjects::randomise::randomise
|
||||
const dictionary& dict
|
||||
)
|
||||
:
|
||||
fieldExpression(name, runTime, dict, typeName)
|
||||
fieldExpression(name, runTime, dict, fieldName_ + "Random", fieldName_)
|
||||
{
|
||||
read(dict);
|
||||
}
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2016-2018 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2016-2019 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -37,8 +37,6 @@ bool Foam::functionObjects::randomise::calcRandomised()
|
||||
{
|
||||
const VolFieldType& field = lookupObject<VolFieldType>(fieldName_);
|
||||
|
||||
resultName_ = fieldName_ + "Random";
|
||||
|
||||
tmp<VolFieldType> rfieldt(new VolFieldType(field));
|
||||
VolFieldType& rfield = rfieldt.ref();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user