foamToGMV.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 #include "fvCFD.H"
00034 #include "OFstream.H"
00035 #include "instantList.H"
00036 #include "IOobjectList.H"
00037 #include "itoa.H"
00038 #include "Cloud.H"
00039 #include "passiveParticle.H"
00040
00041
00042
00043
00044
00045 int main(int argc, char *argv[])
00046 {
00047 const label nTypes = 4;
00048 const word fieldTypes[] =
00049 {
00050 "volScalarField",
00051 "volVectorField",
00052 "surfaceScalarField",
00053 cloud::prefix
00054 };
00055
00056 # include "setRootCase.H"
00057
00058 # include "createTime.H"
00059 # include "createMesh.H"
00060
00061 # include "readConversionProperties.H"
00062
00063
00064 instantList TimeList = runTime.times();
00065 Info << TimeList << endl;
00066 label nTimes = TimeList.size();
00067
00068 for(label n=1; n < nTimes; n++)
00069 {
00070 if (TimeList[n].value() > startTime)
00071 {
00072 Info << "Time = " << TimeList[n].value() << nl;
00073
00074
00075 runTime.setTime(TimeList[n], n);
00076 word CurTime = runTime.timeName();
00077
00078 IOobjectList objects(mesh, runTime.timeName());
00079
00080 # include "moveMesh.H"
00081
00082
00083 fileName gmvFileName = "plotGMV." + itoa(n);
00084 OFstream gmvFile(args.rootPath()/args.caseName()/gmvFileName);
00085
00086 # include "gmvOutputHeader.H"
00087 # include "gmvOutput.H"
00088 # include "gmvOutputTail.H"
00089 }
00090 }
00091
00092 Info<< "\nEnd\n" << endl;
00093
00094 return 0;
00095 }
00096
00097
00098
00099
Copyright © 2000-2009 OpenCFD Ltd