STYLE: adjust logic names for point-values in foamToVTK

This commit is contained in:
Mark Olesen
2020-02-12 17:59:34 +01:00
parent f90de02159
commit ec3de7128c
2 changed files with 13 additions and 13 deletions

View File

@ -5,7 +5,7 @@
\\ / A nd | www.openfoam.com
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2018 OpenCFD Ltd.
Copyright (C) 2018-2020 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -50,9 +50,9 @@ Description
const label nPointFields =
(
noPointValues
? 0
: objects.count(stringListOps::foundOp<word>(fieldTypes::point))
doPointValues
? objects.count(stringListOps::foundOp<word>(fieldTypes::point))
: 0
);
@ -82,7 +82,7 @@ Description
if (doInternal)
{
if (!noPointValues)
if (doPointValues)
{
pInterp.reset(new volPointInterpolation(mesh));
}
@ -180,7 +180,7 @@ Description
else if (patchIds.size())
{
patchWriters.resize(patchIds.size());
if (!noPointValues)
if (doPointValues)
{
patchInterps.resize(patchIds.size());
}
@ -320,7 +320,7 @@ Description
// PointData
// - only construct pointMesh on request since it constructs
// edge addressing
if (!noPointValues)
if (doPointValues)
{
// Begin PointData
if (internalWriter.valid())

View File

@ -6,7 +6,7 @@
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2011-2016 OpenFOAM Foundation
Copyright (C) 2016-2019 OpenCFD Ltd.
Copyright (C) 2016-2020 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -510,8 +510,8 @@ int main(int argc, char *argv[])
<< nl << endl;
}
const bool noPointValues = args.found("no-point-data");
if (noPointValues)
const bool doPointValues = !args.found("no-point-data");
if (!doPointValues)
{
Info<< "Point fields and interpolated point data"
<< " disabled with the '-no-point-data' option"
@ -523,7 +523,7 @@ int main(int argc, char *argv[])
{
Info<< "Write point ids requested";
if (noPointValues)
if (!doPointValues)
{
Info<< ", but ignored due to the '-no-point-data' option";
}
@ -801,9 +801,9 @@ int main(int argc, char *argv[])
// Prune restart fields
objects.prune_0();
if (noPointValues)
if (!doPointValues)
{
// Prune point fields unless specifically requested
// Prune point fields if disabled
objects.filterClasses
(
[](const word& clsName)