1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright (C) 1991-2008 OpenCFD Ltd.
7 -------------------------------------------------------------------------------
9 This file is part of OpenFOAM.
11 OpenFOAM is free software; you can redistribute it and/or modify it
12 under the terms of the GNU General Public License as published by the
13 Free Software Foundation; either version 2 of the License, or (at your
14 option) any later version.
16 OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
17 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21 You should have received a copy of the GNU General Public License
22 along with OpenFOAM; if not, write to the Free Software Foundation,
23 Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
26 Calculate distance to wall.
28 \*---------------------------------------------------------------------------*/
33 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
36 int main(int argc, char *argv[])
38 # include "setRootCase.H"
39 # include "createTime.H"
40 # include "createMesh.H"
42 Info<< "Mesh read in = "
43 << runTime.cpuTimeIncrement()
44 << " s\n" << endl << endl;
47 Info<< "Time now = " << runTime.timeName() << endl;
51 wallDist y(mesh, true);
55 WarningIn(args.executable())
56 << "There are " << y.nUnset()
57 << " remaining unset cells and/or boundary values" << endl;
67 Info<< "Time now = " << runTime.timeName() << endl;
72 boundBox meshBb(mesh.points());
74 pointField newPoints(mesh.points());
76 const point half(0.5*(meshBb.min() + meshBb.max()));
78 forAll(newPoints, pointI)
80 point& pt = newPoints[pointI];
83 pt.y() += pt.y() - half.y();
86 mesh.movePoints(newPoints);
95 Info<< "End\n" << endl;
104 // ************************************************************************* //