diff --git a/applications/utilities/postProcessing/dataConversion/foamToEnsight/foamToEnsight.C b/applications/utilities/postProcessing/dataConversion/foamToEnsight/foamToEnsight.C index 705c8e6650438da90a436c50c5a3f7410ebe6de2..bf15ffef0aa542b36f3e73cd1e86a235c159ab04 100644 --- a/applications/utilities/postProcessing/dataConversion/foamToEnsight/foamToEnsight.C +++ b/applications/utilities/postProcessing/dataConversion/foamToEnsight/foamToEnsight.C @@ -173,8 +173,7 @@ int main(int argc, char *argv[]) ( "name", "subdir", - "define sub-directory name to use for ensight data " - "(default: 'EnSight')" + "sub-directory name for ensight output (default: 'EnSight')" ); argList::addOption ( diff --git a/applications/utilities/postProcessing/dataConversion/foamToEnsightParts/foamToEnsightParts.C b/applications/utilities/postProcessing/dataConversion/foamToEnsightParts/foamToEnsightParts.C index ab2e67e855e76b05d0753575cb18d612c93dee74..f6fdfae977fa30a64eb97c7af50d9c4b90628d5c 100644 --- a/applications/utilities/postProcessing/dataConversion/foamToEnsightParts/foamToEnsightParts.C +++ b/applications/utilities/postProcessing/dataConversion/foamToEnsightParts/foamToEnsightParts.C @@ -128,8 +128,7 @@ int main(int argc, char *argv[]) ( "name", "subdir", - "define sub-directory name to use for Ensight data " - "(default: \"Ensight\")" + "sub-directory name for ensight output (default: 'Ensight')" ); argList::addOption ( diff --git a/applications/utilities/postProcessing/dataConversion/foamToVTK/foamToVTK.C b/applications/utilities/postProcessing/dataConversion/foamToVTK/foamToVTK.C index 4ea7887a59eb2ae5aaf14fed85954afbd3e3a529..a012136f01328080fe6f2b3ecb56c829c5fea2ea 100644 --- a/applications/utilities/postProcessing/dataConversion/foamToVTK/foamToVTK.C +++ b/applications/utilities/postProcessing/dataConversion/foamToVTK/foamToVTK.C @@ -302,10 +302,7 @@ fileName relativeName(const Time& runTime, const fileName& file) int main(int argc, char *argv[]) { - argList::addNote - ( - "legacy VTK file format writer" - ); + argList::addNote("VTK file format writer"); timeSelector::addOptions(); #include "addRegionOption.H" @@ -398,7 +395,13 @@ int main(int argc, char *argv[]) argList::addBoolOption ( "useTimeName", - "use the time name instead of the time index when naming the files" + "use time name instead of the time index when naming files" + ); + argList::addOption + ( + "name", + "subdir", + "sub-directory name for VTK output (default: 'VTK')" ); #include "setRootCase.H" @@ -470,10 +473,13 @@ int main(int argc, char *argv[]) word pointSetName; args.optionReadIfPresent("pointSet", pointSetName); + // Define sub-directory name to use for VTK data. + const word vtkDirName = args.optionLookupOrDefault<word>("name", "VTK"); + #include "createNamedMesh.H" // VTK/ directory in the case - fileName fvPath(runTime.path()/"VTK"); + fileName fvPath(runTime.path()/vtkDirName); // Directory of mesh (region0 gets filtered out) fileName regionPrefix; @@ -1340,10 +1346,11 @@ int main(int argc, char *argv[]) if (Pstream::parRun() && doLinks) { - mkDir(runTime.path()/".."/"VTK"); - chDir(runTime.path()/".."/"VTK"); + mkDir(runTime.path()/".."/vtkDirName); + chDir(runTime.path()/".."/vtkDirName); - Info<< "Linking all processor files to " << runTime.path()/".."/"VTK" + Info<< "Linking all processor files to " + << runTime.path()/".."/vtkDirName << endl; // Get list of vtk files @@ -1351,7 +1358,7 @@ int main(int argc, char *argv[]) ( fileName("..") / "processor" + Foam::name(Pstream::myProcNo()) - / "VTK" + / vtkDirName ); fileNameList dirs(readDir(procVTK, fileName::DIRECTORY)); diff --git a/etc/config.sh/bashcompletion b/etc/config.sh/bashcompletion index b7b919e15d5f7f4d3be431880c5bd3594b2e12c7..464fb2f1ef7c5ea5028874b67e1b5a9b593865cc 100644 --- a/etc/config.sh/bashcompletion +++ b/etc/config.sh/bashcompletion @@ -2563,8 +2563,8 @@ _of_foamToVTK() local cur="${COMP_WORDS[COMP_CWORD]}" local prev="${COMP_WORDS[COMP_CWORD-1]}" - local opts="-allPatches -ascii -constant -latestTime -nearCellValue -newTimes -noFaceZones -noFunctionObjects -noInternal -noLagrangian -noLinks -noPointValues -noZero -parallel -poly -surfaceFields -useTimeName -srcDoc -doc -help " - local optsWithArgs="-case -cellSet -decomposeParDict -excludePatches -faceSet -fields -pointSet -region -roots -time " + local opts="-allPatches -ascii -constant -latestTime -nearCellValue -newTimes -noFaceZones -noFunctionObjects -noInternal -noLagrangian -noLinks -noPointValues -noZero -parallel -poly -surfaceFields -useTimeName -xml -srcDoc -doc -help " + local optsWithArgs="-case -cellSet -decomposeParDict -excludePatches -faceSet -fields -name -pointSet -region -roots -time " case ${prev} in -case)