ENH: foamToEnsight: cellZone support

This commit is contained in:
mattijs
2013-09-11 09:31:20 +01:00
parent db22ecdc26
commit 198d0ebc6f
4 changed files with 119 additions and 43 deletions

View File

@ -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)