Commit f5ce4306 authored by Henry Weller's avatar Henry Weller
Browse files

functionObjects, foamCalcFunctions, fvOptions: Standardized keywords for...

functionObjects, foamCalcFunctions, fvOptions: Standardized keywords for selecting fields and objects

Generally fields and objects are selected using the 'field[s]' and
'object[s]' keywords but this was not consistent between all
functionObject, fvOptions etc. and now fixed by applying the following
renaming:

fieldName -> field
fieldNames -> fields
objectName -> object
objectNames -> objects
parent 546159a8
......@@ -68,7 +68,7 @@ Foam::functionObjects::writeVTK::~writeVTK()
bool Foam::functionObjects::writeVTK::read(const dictionary& dict)
{
dict.lookup("objectNames") >> objectNames_;
dict.lookup("objects") >> objectNames_;
return true;
}
......
......@@ -95,7 +95,7 @@ Foam::fv::actuationDiskSource::actuationDiskSource
upstreamPoint_(coeffs_.lookup("upstreamPoint")),
upstreamCellId_(-1)
{
coeffs_.lookup("fieldNames") >> fieldNames_;
coeffs_.lookup("fields") >> fieldNames_;
applied_.setSize(fieldNames_.size(), false);
Info<< " - creating actuation disk zone: "
......
......@@ -33,7 +33,7 @@ bool Foam::fv::CodedSource<Type>::read(const dictionary& dict)
{
if (cellSetOption::read(dict))
{
coeffs_.lookup("fieldNames") >> fieldNames_;
coeffs_.lookup("fields") >> fieldNames_;
applied_.setSize(fieldNames_.size(), false);
// Backward compatibility
......
......@@ -36,13 +36,9 @@ License
namespace Foam
{
defineTypeNameAndDebug(fieldToCell, 0);
addToRunTimeSelectionTable(topoSetSource, fieldToCell, word);
addToRunTimeSelectionTable(topoSetSource, fieldToCell, istream);
defineTypeNameAndDebug(fieldToCell, 0);
addToRunTimeSelectionTable(topoSetSource, fieldToCell, word);
addToRunTimeSelectionTable(topoSetSource, fieldToCell, istream);
}
......@@ -121,7 +117,7 @@ Foam::fieldToCell::fieldToCell
)
:
topoSetSource(mesh),
fieldName_(dict.lookup("fieldName")),
fieldName_(dict.lookup("field")),
min_(readScalar(dict.lookup("min"))),
max_(readScalar(dict.lookup("max")))
{}
......
......@@ -199,9 +199,9 @@ void Foam::calcTypes::addSubtract::init()
argList::validArgs.append("add");
argList::validArgs.append("baseField");
argList::validArgs.append("calcMode");
argList::validOptions.insert("field", "fieldName");
argList::validOptions.insert("field", "field");
argList::validOptions.insert("value", "valueString");
argList::validOptions.insert("resultName", "fieldName");
argList::validOptions.insert("result", "field");
}
......
......@@ -57,7 +57,7 @@ Foam::calcTypes::components::~components()
void Foam::calcTypes::components::init()
{
argList::validArgs.append("components");
argList::validArgs.append("fieldName");
argList::validArgs.append("field");
}
......
......@@ -57,7 +57,7 @@ Foam::calcTypes::div::~div()
void Foam::calcTypes::div::init()
{
argList::validArgs.append("div");
argList::validArgs.append("fieldName");
argList::validArgs.append("field");
}
......@@ -112,4 +112,3 @@ void Foam::calcTypes::div::calc
// ************************************************************************* //
......@@ -57,7 +57,7 @@ Foam::calcTypes::interpolate::~interpolate()
void Foam::calcTypes::interpolate::init()
{
Foam::argList::validArgs.append("interpolate");
argList::validArgs.append("fieldName");
argList::validArgs.append("field");
}
......@@ -115,4 +115,3 @@ void Foam::calcTypes::interpolate::calc
// ************************************************************************* //
......@@ -57,7 +57,7 @@ Foam::calcTypes::mag::~mag()
void Foam::calcTypes::mag::init()
{
argList::validArgs.append("mag");
argList::validArgs.append("fieldName");
argList::validArgs.append("field");
}
......@@ -115,4 +115,3 @@ void Foam::calcTypes::mag::calc
// ************************************************************************* //
......@@ -57,7 +57,7 @@ Foam::calcTypes::magGrad::~magGrad()
void Foam::calcTypes::magGrad::init()
{
argList::validArgs.append("magGrad");
argList::validArgs.append("fieldName");
argList::validArgs.append("field");
}
......@@ -112,4 +112,3 @@ void Foam::calcTypes::magGrad::calc
// ************************************************************************* //
......@@ -57,7 +57,7 @@ Foam::calcTypes::magSqr::~magSqr()
void Foam::calcTypes::magSqr::init()
{
argList::validArgs.append("magSqr");
argList::validArgs.append("fieldName");
argList::validArgs.append("field");
}
......@@ -116,4 +116,3 @@ void Foam::calcTypes::magSqr::calc
// ************************************************************************* //
......@@ -58,7 +58,7 @@ void Foam::calcTypes::randomise::init()
{
argList::validArgs.append("randomise");
argList::validArgs.append("perturbation");
argList::validArgs.append("fieldName");
argList::validArgs.append("field");
}
......
......@@ -120,7 +120,7 @@ protected:
virtual dlLibraryTable& libs() const;
//- Adapt the context for the current object
virtual void prepare(dynamicCode &,const dynamicCodeContext&) const;
virtual void prepare(dynamicCode&, const dynamicCodeContext&) const;
// Return a description (type + name) for the output
virtual string description() const;
......
......@@ -79,7 +79,7 @@ Foam::functionObjects::removeRegisteredObject::~removeRegisteredObject()
bool Foam::functionObjects::removeRegisteredObject::read(const dictionary& dict)
{
dict.lookup("objectNames") >> objectNames_;
dict.lookup("objects") >> objectNames_;
return true;
}
......
......@@ -80,7 +80,7 @@ Foam::functionObjects::writeRegisteredObject::~writeRegisteredObject()
bool Foam::functionObjects::writeRegisteredObject::read(const dictionary& dict)
{
dict.lookup("objectNames") >> objectNames_;
dict.lookup("objects") >> objectNames_;
dict.readIfPresent("exclusiveWriting", exclusiveWriting_);
return true;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment