ENH: add nodeValues option for ensightWrite function object (closes #734)

This commit is contained in:
Mark Olesen
2018-05-08 09:51:15 +02:00
parent b24bd516ae
commit f99880cbea
4 changed files with 15 additions and 9 deletions

View File

@ -111,30 +111,32 @@ bool Foam::functionObjects::ensightWrite::read(const dictionary& dict)
if (dict.found("patches")) if (dict.found("patches"))
{ {
wordRes lst(dict.lookup("patches")); wordRes list(dict.lookup("patches"));
lst.uniq(); list.uniq();
writeOpts_.patchSelection(lst); writeOpts_.patchSelection(list);
} }
if (dict.found("faceZones")) if (dict.found("faceZones"))
{ {
wordRes lst(dict.lookup("faceZones")); wordRes list(dict.lookup("faceZones"));
lst.uniq(); list.uniq();
writeOpts_.faceZoneSelection(lst); writeOpts_.faceZoneSelection(list);
} }
// //
// case options // case options
// //
caseOpts_.nodeValues(dict.lookupOrDefault("nodeValues", false));
caseOpts_.width(dict.lookupOrDefault<label>("width", 8)); caseOpts_.width(dict.lookupOrDefault<label>("width", 8));
// remove existing output directory // remove existing output directory
caseOpts_.overwrite(dict.lookupOrDefault("overwrite", false)); caseOpts_.overwrite(dict.lookupOrDefault("overwrite", false));
// //
// other options // other options
// //

View File

@ -66,6 +66,7 @@ Description
patches | Select patches to write | no | patches | Select patches to write | no |
faceZones | Select faceZones to write | no | faceZones | Select faceZones to write | no |
consecutive | Consecutive output numbering | no | false consecutive | Consecutive output numbering | no | false
nodeValues | Write values at nodes | no | false
\endtable \endtable
Note that if the \c patches entry is an empty list, this will select all Note that if the \c patches entry is an empty list, this will select all

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2016 OpenCFD Ltd. \\ / A nd | Copyright (C) 2016-2018 OpenCFD Ltd.
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -49,7 +49,8 @@ int Foam::functionObjects::ensightWrite::writeVolField
( (
lookupObject<VolFieldType>(inputName), lookupObject<VolFieldType>(inputName),
ensMesh(), ensMesh(),
os os,
caseOpts_.nodeValues()
); );
Log << " " << inputName; Log << " " << inputName;

View File

@ -7,6 +7,8 @@ ensightWrite
libs ("libutilityFunctionObjects.so"); libs ("libutilityFunctionObjects.so");
log true; log true;
nodeValues true;
// Fields to output (words or regex) // Fields to output (words or regex)
fields (U p "(k|epsilon|omega)"); fields (U p "(k|epsilon|omega)");