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
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[])
44 # include "addTimeOptions.H"
45 # include "setRootCase.H"
46 # include "createTime.H"
49 instantList Times = runTime.times();
51 // set startTime and endTime depending on -time and -latestTime options
52 # include "checkTimeOptions.H"
54 runTime.setTime(Times[startTime], startTime);
56 # include "createMesh.H"
58 for (label i=startTime; i<endTime; i++)
60 runTime.setTime(Times[i], i);
62 Info<< "Time = " << runTime.timeName() << nl << endl;
64 const IOobjectList fieldObjs(mesh, runTime.timeName());
66 const wordList objNames = fieldObjs.names();
68 PtrList<volScalarField> vsf(objNames.size());
69 PtrList<volVectorField> vvf(objNames.size());
70 PtrList<volSphericalTensorField> vsptf(objNames.size());
71 PtrList<volSymmTensorField> vsytf(objNames.size());
72 PtrList<volTensorField> vtf(objNames.size());
74 Info<< "Valid fields:" << endl;
76 forAll(objNames, objI)
88 addToFieldList<scalar>(vsf, obj, objI, mesh);
89 addToFieldList<vector>(vvf, obj, objI, mesh);
90 addToFieldList<sphericalTensor>(vsptf, obj, objI, mesh);
91 addToFieldList<symmTensor>(vsytf, obj, objI, mesh);
92 addToFieldList<tensor>(vtf, obj, objI, mesh);
98 const polyBoundaryMesh& bm = mesh.boundaryMesh();
101 Info<< "Patch: " << bm[patchI].name() << nl;
102 outputFieldList<scalar>(vsf, patchI);
103 outputFieldList<vector>(vvf, patchI);
104 outputFieldList<sphericalTensor>(vsptf, patchI);
105 outputFieldList<symmTensor>(vsytf, patchI);
106 outputFieldList<tensor>(vtf, patchI);
111 Info << "End\n" << endl;
117 // ************************************************************************* //