patchSummary.C
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034 #include "fvCFD.H"
00035 #include "volFields.H"
00036 #include "IOobjectList.H"
00037 #include "patchSummaryTemplates.H"
00038
00039
00040
00041 int main(int argc, char *argv[])
00042 {
00043 timeSelector::addOptions();
00044
00045 # include "addRegionOption.H"
00046 # include "setRootCase.H"
00047 # include "createTime.H"
00048
00049 instantList timeDirs = timeSelector::select0(runTime, args);
00050
00051 # include "createNamedMesh.H"
00052
00053 forAll(timeDirs, timeI)
00054 {
00055 runTime.setTime(timeDirs[timeI], timeI);
00056
00057 Info<< "Time = " << runTime.timeName() << nl << endl;
00058
00059 const IOobjectList fieldObjs(mesh, runTime.timeName());
00060 const wordList objNames = fieldObjs.names();
00061
00062 PtrList<volScalarField> vsf(objNames.size());
00063 PtrList<volVectorField> vvf(objNames.size());
00064 PtrList<volSphericalTensorField> vsptf(objNames.size());
00065 PtrList<volSymmTensorField> vsytf(objNames.size());
00066 PtrList<volTensorField> vtf(objNames.size());
00067
00068 Info<< "Valid fields:" << endl;
00069
00070 forAll(objNames, objI)
00071 {
00072 IOobject obj
00073 (
00074 objNames[objI],
00075 runTime.timeName(),
00076 mesh,
00077 IOobject::MUST_READ
00078 );
00079
00080 if (obj.headerOk())
00081 {
00082 addToFieldList<scalar>(vsf, obj, objI, mesh);
00083 addToFieldList<vector>(vvf, obj, objI, mesh);
00084 addToFieldList<sphericalTensor>(vsptf, obj, objI, mesh);
00085 addToFieldList<symmTensor>(vsytf, obj, objI, mesh);
00086 addToFieldList<tensor>(vtf, obj, objI, mesh);
00087 }
00088 }
00089
00090 Info<< endl;
00091
00092 const polyBoundaryMesh& bm = mesh.boundaryMesh();
00093 forAll(bm, patchI)
00094 {
00095 Info<< bm[patchI].type() << ": " << bm[patchI].name() << nl;
00096 outputFieldList<scalar>(vsf, patchI);
00097 outputFieldList<vector>(vvf, patchI);
00098 outputFieldList<sphericalTensor>(vsptf, patchI);
00099 outputFieldList<symmTensor>(vsytf, patchI);
00100 outputFieldList<tensor>(vtf, patchI);
00101 Info << endl;
00102 }
00103 }
00104
00105 Info << "End\n" << endl;
00106
00107 return 0;
00108 }
00109
00110
00111
Copyright © 2000-2009 OpenCFD Ltd