1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright (C) 1991-2009 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
29 Writes fields and boundary condition info for each patch at each requested
32 \*---------------------------------------------------------------------------*/
35 #include "volFields.H"
36 #include "IOobjectList.H"
37 #include "patchSummaryTemplates.H"
39 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
41 int main(int argc, char *argv[])
43 timeSelector::addOptions();
45 # include "addRegionOption.H"
46 # include "setRootCase.H"
47 # include "createTime.H"
49 instantList timeDirs = timeSelector::select0(runTime, args);
51 # include "createNamedMesh.H"
53 forAll(timeDirs, timeI)
55 runTime.setTime(timeDirs[timeI], timeI);
57 Info<< "Time = " << runTime.timeName() << nl << endl;
59 const IOobjectList fieldObjs(mesh, runTime.timeName());
60 const wordList objNames = fieldObjs.names();
62 PtrList<volScalarField> vsf(objNames.size());
63 PtrList<volVectorField> vvf(objNames.size());
64 PtrList<volSphericalTensorField> vsptf(objNames.size());
65 PtrList<volSymmTensorField> vsytf(objNames.size());
66 PtrList<volTensorField> vtf(objNames.size());
68 Info<< "Valid fields:" << endl;
70 forAll(objNames, objI)
82 addToFieldList<scalar>(vsf, obj, objI, mesh);
83 addToFieldList<vector>(vvf, obj, objI, mesh);
84 addToFieldList<sphericalTensor>(vsptf, obj, objI, mesh);
85 addToFieldList<symmTensor>(vsytf, obj, objI, mesh);
86 addToFieldList<tensor>(vtf, obj, objI, mesh);
92 const polyBoundaryMesh& bm = mesh.boundaryMesh();
95 Info<< bm[patchI].type() << ": " << bm[patchI].name() << nl;
96 outputFieldList<scalar>(vsf, patchI);
97 outputFieldList<vector>(vvf, patchI);
98 outputFieldList<sphericalTensor>(vsptf, patchI);
99 outputFieldList<symmTensor>(vsytf, patchI);
100 outputFieldList<tensor>(vtf, patchI);
105 Info << "End\n" << endl;
111 // ************************************************************************* //