probeLocations.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 #include "argList.H"
00031 #include "timeSelector.H"
00032 #include "IOprobes.H"
00033
00034 using namespace Foam;
00035
00036
00037
00038
00039 int main(int argc, char *argv[])
00040 {
00041 timeSelector::addOptions();
00042 # include "addRegionOption.H"
00043
00044 # include "setRootCase.H"
00045 # include "createTime.H"
00046 instantList timeDirs = timeSelector::select0(runTime, args);
00047 # include "createNamedMesh.H"
00048
00049 IOprobes sniff
00050 (
00051 probes::typeName,
00052 mesh,
00053 "probesDict",
00054 IOobject::MUST_READ,
00055 true
00056 );
00057
00058 forAll(timeDirs, timeI)
00059 {
00060 runTime.setTime(timeDirs[timeI], timeI);
00061 Info<< "Time = " << runTime.timeName() << endl;
00062
00063
00064 polyMesh::readUpdateState state = mesh.readUpdate();
00065
00066 if
00067 (
00068 state == polyMesh::POINTS_MOVED
00069 || state == polyMesh::TOPO_CHANGE
00070 )
00071 {
00072 sniff.read();
00073 }
00074
00075 sniff.write();
00076
00077 Info<< endl;
00078 }
00079
00080 Info<< "End\n" << endl;
00081
00082 return 0;
00083 }
00084
00085
00086
Copyright © 2000-2009 OpenCFD Ltd