From d83d943ffeacf072cca26a13d2994c7ac69c6cf0 Mon Sep 17 00:00:00 2001 From: Henry Weller Date: Fri, 30 Nov 2018 15:09:43 +0000 Subject: [PATCH] decomposePar: Added -noFields option Patch contributed by Mattijs Janssens --- .../decomposePar/decomposePar.C | 24 ++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/applications/utilities/parallelProcessing/decomposePar/decomposePar.C b/applications/utilities/parallelProcessing/decomposePar/decomposePar.C index 976141049f..b06b1e7f6b 100644 --- a/applications/utilities/parallelProcessing/decomposePar/decomposePar.C +++ b/applications/utilities/parallelProcessing/decomposePar/decomposePar.C @@ -240,6 +240,11 @@ int main(int argc, char *argv[]) "use existing geometry decomposition and convert fields only" ); argList::addBoolOption + ( + "noFields", + "opposite of -fields; only decompose geometry" + ); + argList::addBoolOption ( "noSets", "skip decomposing cellSets, faceSets, pointSets" @@ -272,12 +277,29 @@ int main(int argc, char *argv[]) bool copyZero = args.optionFound("copyZero"); bool copyUniform = args.optionFound("copyUniform"); bool decomposeFieldsOnly = args.optionFound("fields"); + bool decomposeGeomOnly = args.optionFound("noFields"); bool decomposeSets = !args.optionFound("noSets"); bool forceOverwrite = args.optionFound("force"); bool ifRequiredDecomposition = args.optionFound("ifRequired"); const word dictName("decomposeParDict"); + + if (decomposeGeomOnly) + { + Info<< "Skipping decomposing fields" + << nl << endl; + + if (decomposeFieldsOnly || copyZero) + { + FatalErrorInFunction + << "Cannot combine geometry-only decomposition (-noFields)" + << " with field decomposition (-noFields or -copyZero)" + << exit(FatalError); + } + } + + // Set time from database #include "createTime.H" @@ -561,7 +583,7 @@ int main(int argc, char *argv[]) } } } - else + else if (!decomposeGeomOnly) { // Decompose the field files