mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: new foamToVTK output option -processor-fields
- write values of processor boundaries only, for diagnostic purposes. - parallel only, and non-legacy format only
This commit is contained in:
@ -3,7 +3,7 @@
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
\\/ M anipulation | Copyright (C) 2016-2018 OpenCFD Ltd.
|
||||
\\/ M anipulation | Copyright (C) 2016-2019 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -329,6 +329,12 @@ int main(int argc, char *argv[])
|
||||
"Eg, 'T' or '(p T U \"alpha.*\")'"
|
||||
);
|
||||
|
||||
argList::addBoolOption
|
||||
(
|
||||
"processor-fields",
|
||||
"Write field values on processor boundaries only",
|
||||
true // mark as an advanced option
|
||||
);
|
||||
argList::addBoolOption
|
||||
(
|
||||
"surfaceFields",
|
||||
@ -450,6 +456,29 @@ int main(int argc, char *argv[])
|
||||
|
||||
const vtk::outputOptions writeOpts = getOutputOptions(args);
|
||||
|
||||
bool processorFieldsOnly = false;
|
||||
|
||||
if (args.found("processor-fields"))
|
||||
{
|
||||
if (!Pstream::parRun())
|
||||
{
|
||||
Info<< "Ignoring processor patch writing in serial"
|
||||
<< nl << endl;
|
||||
}
|
||||
else if (writeOpts.legacy())
|
||||
{
|
||||
Info<< "Ignoring processor patch writing in legacy format"
|
||||
<< nl << endl;
|
||||
}
|
||||
else
|
||||
{
|
||||
processorFieldsOnly = true;
|
||||
|
||||
Info<< "Writing processor patch fields only"
|
||||
<< nl << endl;
|
||||
}
|
||||
}
|
||||
|
||||
if (nearCellValue)
|
||||
{
|
||||
Info<< "Using neighbouring cell value instead of patch value"
|
||||
@ -741,6 +770,13 @@ int main(int argc, char *argv[])
|
||||
);
|
||||
}
|
||||
|
||||
if (processorFieldsOnly)
|
||||
{
|
||||
// Processor-patches only and continue
|
||||
#include "convertProcessorPatches.H"
|
||||
continue;
|
||||
}
|
||||
|
||||
// Volume, internal, point fields
|
||||
#include "convertVolumeFields.H"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user