From 24084582b4faae4bac0a9174245ec278a77c0e4f Mon Sep 17 00:00:00 2001 From: andy Date: Fri, 20 Jan 2012 13:04:44 +0000 Subject: [PATCH] ENH: Adding updates to Ensight converter (Mark Olesen) --- .../foamToEnsightParts/foamToEnsightParts.C | 37 +++++++++- src/conversion/ensight/file/ensightFile.C | 68 +++++++++++++------ src/conversion/ensight/file/ensightFile.H | 19 +++++- 3 files changed, 100 insertions(+), 24 deletions(-) diff --git a/applications/utilities/postProcessing/dataConversion/foamToEnsightParts/foamToEnsightParts.C b/applications/utilities/postProcessing/dataConversion/foamToEnsightParts/foamToEnsightParts.C index a96179e970..cb7f5705aa 100644 --- a/applications/utilities/postProcessing/dataConversion/foamToEnsightParts/foamToEnsightParts.C +++ b/applications/utilities/postProcessing/dataConversion/foamToEnsightParts/foamToEnsightParts.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -35,6 +35,9 @@ Usage \param -ascii \n Write Ensight data in ASCII format instead of "C Binary" + \parm -name \\n + define sub-directory name to use for Ensight data (default: "Ensight") + \param -noZero \n Exclude the often incomplete initial conditions. @@ -46,6 +49,9 @@ Usage Suppress writing the geometry. Can be useful for converting partial results for a static geometry. + \param -width \\n + width of Ensight data subdir + Note - no parallel data. - writes to \a Ensight directory to avoid collisions with foamToEnsight. @@ -96,6 +102,19 @@ int main(int argc, char *argv[]) "suppress writing the geometry. " "Can be useful for converting partial results for a static geometry" ); + argList::addOption + ( + "name", + "subdir", + "define sub-directory name to use for Ensight data " + "(default: \"Ensight\")" + ); + argList::addOption + ( + "width", + "n", + "width of Ensight data subdir" + ); // the volume field types that we handle wordHashSet volFieldTypes; @@ -133,7 +152,21 @@ int main(int argc, char *argv[]) // always write the geometry, unless the -noMesh option is specified bool optNoMesh = args.optionFound("noMesh"); - fileName ensightDir = args.rootPath()/args.globalCaseName()/"Ensight"; + // adjust output width + if (args.optionFound("width")) + { + ensightFile::subDirWidth(args.optionRead