mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: foamToEnsight: cellZone support
This commit is contained in:
@ -135,6 +135,12 @@ int main(int argc, char *argv[])
|
||||
"specify faceZones to write - eg '( slice \"mfp-.*\" )'."
|
||||
);
|
||||
argList::addOption
|
||||
(
|
||||
"fields",
|
||||
"wordReList",
|
||||
"specify fields to export (all by default) - eg '( \"U.*\" )'."
|
||||
);
|
||||
argList::addOption
|
||||
(
|
||||
"cellZone",
|
||||
"word",
|
||||
@ -224,6 +230,13 @@ int main(int argc, char *argv[])
|
||||
zonePatterns = wordReList(args.optionLookup("faceZones")());
|
||||
}
|
||||
|
||||
const bool selectedFields = args.optionFound("fields");
|
||||
wordReList fieldPatterns;
|
||||
if (selectedFields)
|
||||
{
|
||||
fieldPatterns = wordReList(args.optionLookup("fields")());
|
||||
}
|
||||
|
||||
word cellZoneName;
|
||||
const bool doCellZone = args.optionReadIfPresent("cellZone", cellZoneName);
|
||||
|
||||
@ -430,6 +443,15 @@ int main(int argc, char *argv[])
|
||||
{
|
||||
const word& fieldName = fieldNames[j];
|
||||
|
||||
// Check if the field has to be exported
|
||||
if (selectedFields)
|
||||
{
|
||||
if (!findStrings(fieldPatterns, fieldName))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
#include "checkData.H"
|
||||
|
||||
if (!variableGood)
|
||||
|
||||
Reference in New Issue
Block a user