functionObjects: Emit warning messages only for field names which do not exist for any type

Resolves bug-report https://bugs.openfoam.org/view.php?id=3583
This commit is contained in:
Henry Weller
2020-10-27 20:03:19 +00:00
parent efbf198022
commit f7848e62a1
27 changed files with 140 additions and 123 deletions

View File

@ -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-2020 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -69,11 +69,9 @@ bool Foam::functionObjects::fieldsExpression::calcAllTypes(FOType& fo)
{
bool processed = false;
processed = processed || fo.template calcType<scalar>(fo);
processed = processed || fo.template calcType<vector>(fo);
processed = processed || fo.template calcType<sphericalTensor>(fo);
processed = processed || fo.template calcType<symmTensor>(fo);
processed = processed || fo.template calcType<tensor>(fo);
#define processType(fieldType, none) \
processed = processed || fo.template calcType<fieldType>(fo);
FOR_ALL_FIELD_TYPES(processType)
return processed;
}