From 3e12a89a041f728471846cbc7828bbd4d837ea8b Mon Sep 17 00:00:00 2001 From: Henry Date: Mon, 2 Sep 2013 22:51:15 +0100 Subject: [PATCH] Check mesh is 2D and scale resulting steam-function by the thickness --- .../streamFunction/streamFunction.C | 23 +++++++++++++++---- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/applications/utilities/postProcessing/velocityField/streamFunction/streamFunction.C b/applications/utilities/postProcessing/velocityField/streamFunction/streamFunction.C index aa56086c90..de9af38b87 100644 --- a/applications/utilities/postProcessing/velocityField/streamFunction/streamFunction.C +++ b/applications/utilities/postProcessing/velocityField/streamFunction/streamFunction.C @@ -42,14 +42,26 @@ Description int main(int argc, char *argv[]) { timeSelector::addOptions(); -# include "addRegionOption.H" + #include "addRegionOption.H" -# include "setRootCase.H" -# include "createTime.H" + #include "setRootCase.H" + #include "createTime.H" instantList timeDirs = timeSelector::select0(runTime, args); -# include "createNamedMesh.H" + #include "createNamedMesh.H" + + label nD = mesh.nGeometricD(); + + if (nD != 2) + { + FatalErrorIn(args.executable()) + << "Case is not 2D, stream-function cannot be computed" + << exit(FatalError); + } + + const vector slabDir((Vector