ENH: verify manual input for labelToCell etc (issue #895)

DOC: document topo sources inputs in doxygen format

ENH: check for excess tokens in dictionary input (issue #762)

- various bits of code cleanup (modernization) in meshTool/sets.
This commit is contained in:
Mark Olesen
2018-07-07 00:22:58 +02:00
parent dda1c5f004
commit 322d642b57
114 changed files with 1478 additions and 1749 deletions

View File

@ -3,7 +3,7 @@
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation |
\\/ M anipulation | Copyright (C) 2018 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -29,7 +29,6 @@ License
#include "Time.H"
#include "IFstream.H"
#include "fieldDictionary.H"
#include "addToRunTimeSelectionTable.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
@ -115,9 +114,9 @@ Foam::fieldToCell::fieldToCell
)
:
topoSetSource(mesh),
fieldName_(dict.lookup("field")),
min_(readScalar(dict.lookup("min"))),
max_(readScalar(dict.lookup("max")))
fieldName_(dict.get<word>("field")),
min_(dict.get<scalar>("min")),
max_(dict.get<scalar>("max"))
{}
@ -134,12 +133,6 @@ Foam::fieldToCell::fieldToCell
{}
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
Foam::fieldToCell::~fieldToCell()
{}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
void Foam::fieldToCell::applyToSet
@ -170,22 +163,22 @@ void Foam::fieldToCell::applyToSet
// Note: should use volScalarField::typeName instead below
// but that would introduce linkage problems (finiteVolume needs
// meshTools)
else if (fieldObject.headerClassName() == "volScalarField")
else if ("volScalarField" == fieldObject.headerClassName())
{
IFstream str(typeFilePath<labelIOList>(fieldObject));
// Read dictionary
// Read as dictionary
fieldDictionary fieldDict(fieldObject, fieldObject.headerClassName());
scalarField internalVals("internalField", fieldDict, mesh().nCells());
applyToSet(action, internalVals, set);
}
else if (fieldObject.headerClassName() == "volVectorField")
else if ("volVectorField" == fieldObject.headerClassName())
{
IFstream str(typeFilePath<labelIOList>(fieldObject));
// Read dictionary
// Read as dictionary
fieldDictionary fieldDict(fieldObject, fieldObject.headerClassName());
vectorField internalVals("internalField", fieldDict, mesh().nCells());