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
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062
00063
00064 #include <finiteVolume/fvCFD.H>
00065 #include <finiteVolume/volFields.H>
00066 #include <OpenFOAM/IOobjectList.H>
00067 #include "patchSummaryTemplates.H"
00068
00069
00070
00071 int main(int argc, char *argv[])
00072 {
00073 timeSelector::addOptions();
00074
00075 # include <OpenFOAM/addRegionOption.H>
00076 # include <OpenFOAM/setRootCase.H>
00077 # include <OpenFOAM/createTime.H>
00078
00079 instantList timeDirs = timeSelector::select0(runTime, args);
00080
00081 # include <OpenFOAM/createNamedMesh.H>
00082
00083 forAll(timeDirs, timeI)
00084 {
00085 runTime.setTime(timeDirs[timeI], timeI);
00086
00087 Info<< "Time = " << runTime.timeName() << nl << endl;
00088
00089 const IOobjectList fieldObjs(mesh, runTime.timeName());
00090 const wordList objNames = fieldObjs.names();
00091
00092 PtrList<volScalarField> vsf(objNames.size());
00093 PtrList<volVectorField> vvf(objNames.size());
00094 PtrList<volSphericalTensorField> vsptf(objNames.size());
00095 PtrList<volSymmTensorField> vsytf(objNames.size());
00096 PtrList<volTensorField> vtf(objNames.size());
00097
00098 Info<< "Valid fields:" << endl;
00099
00100 forAll(objNames, objI)
00101 {
00102 IOobject obj
00103 (
00104 objNames[objI],
00105 runTime.timeName(),
00106 mesh,
00107 IOobject::MUST_READ
00108 );
00109
00110 if (obj.headerOk())
00111 {
00112 addToFieldList<scalar>(vsf, obj, objI, mesh);
00113 addToFieldList<vector>(vvf, obj, objI, mesh);
00114 addToFieldList<sphericalTensor>(vsptf, obj, objI, mesh);
00115 addToFieldList<symmTensor>(vsytf, obj, objI, mesh);
00116 addToFieldList<tensor>(vtf, obj, objI, mesh);
00117 }
00118 }
00119
00120 Info<< endl;
00121
00122 const polyBoundaryMesh& bm = mesh.boundaryMesh();
00123 forAll(bm, patchI)
00124 {
00125 Info<< bm[patchI].type() << ": " << bm[patchI].name() << nl;
00126 outputFieldList<scalar>(vsf, patchI);
00127 outputFieldList<vector>(vvf, patchI);
00128 outputFieldList<sphericalTensor>(vsptf, patchI);
00129 outputFieldList<symmTensor>(vsytf, patchI);
00130 outputFieldList<tensor>(vtf, patchI);
00131 Info << endl;
00132 }
00133 }
00134
00135 Info << "End\n" << endl;
00136
00137 return 0;
00138 }
00139
00140
00141