ENH: more consistent use of good() or direct testing instead valid()

This commit is contained in:
Mark Olesen
2023-07-19 13:47:19 +02:00
parent 76efcba4c7
commit 945e3e41b1
72 changed files with 139 additions and 148 deletions

View File

@ -453,7 +453,7 @@ Foam::functionObjects::extractEulerianParticles::extractEulerianParticles
fvMeshFunctionObject(name, runTime, dict),
writeFile(runTime, name),
cloud_(mesh_, "eulerianParticleCloud"),
faceZoneName_(word::null),
faceZoneName_(),
zoneID_(-1),
patchIDs_(),
patchFaceIDs_(),

View File

@ -126,7 +126,7 @@ Foam::histogramModel::histogramModel
:
writeFile(mesh, name, "histogram", dict),
mesh_(mesh),
fieldName_(word::null)
fieldName_()
{}

View File

@ -88,7 +88,7 @@ Foam::functionObjects::norm::norm
fieldExpression(name, runTime, dict),
norm_(normType::L1),
divisorPtr_(nullptr),
divisorFieldName_(word::null),
divisorFieldName_(),
p_(-1)
{
read(dict);
@ -127,7 +127,7 @@ bool Foam::functionObjects::norm::read(const dictionary& dict)
{
divisorFieldName_ = dict.get<word>("divisorField");
if (divisorFieldName_ == word::null)
if (divisorFieldName_.empty())
{
FatalIOErrorInFunction(dict)
<< "The norm 'field' needs the input entry 'divisorField'."

View File

@ -78,7 +78,7 @@ Foam::resolutionIndexModel::resolutionIndexModel
)
:
mesh_(mesh),
resultName_(word::null)
resultName_()
{}