diff --git a/applications/utilities/postProcessing/foamPostProcess/foamPostProcess.C b/applications/utilities/postProcessing/foamPostProcess/foamPostProcess.C index 5d22d3cf2d..c277d35244 100644 --- a/applications/utilities/postProcessing/foamPostProcess/foamPostProcess.C +++ b/applications/utilities/postProcessing/foamPostProcess/foamPostProcess.C @@ -259,6 +259,30 @@ int main(int argc, char *argv[]) const instantList timeDirs = timeSelector::select0(runTime, args); + // Either the solver name is specified... + word solverName; + + // ...or the fields are specified on the command-line + // or later inferred from the function arguments + HashSet requiredFields; + + if (args.optionReadIfPresent("solver", solverName)) + { + libs.open("lib" + solverName + ".so"); + } + else + { + // Initialise the set of selected fields from the command-line options + if (args.optionFound("fields")) + { + args.optionLookup("fields")() >> requiredFields; + } + if (args.optionFound("field")) + { + requiredFields.insert(word(args.optionLookup("field")())); + } + } + word regionName = fvMesh::defaultRegion; if (args.optionReadIfPresent("region", regionName)) @@ -285,30 +309,6 @@ int main(int argc, char *argv[]) ) ); - // Either the solver name is specified... - word solverName; - - // ...or the fields are specified on the command-line - // or later inferred from the function arguments - HashSet requiredFields; - - if (args.optionReadIfPresent("solver", solverName)) - { - libs.open("lib" + solverName + ".so"); - } - else - { - // Initialise the set of selected fields from the command-line options - if (args.optionFound("fields")) - { - args.optionLookup("fields")() >> requiredFields; - } - if (args.optionFound("field")) - { - requiredFields.insert(word(args.optionLookup("field")())); - } - } - // Construct functionObjectList autoPtr functionsPtr (