/*---------------------------------------------------------------------------*\ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License This file is part of OpenFOAM. OpenFOAM is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. OpenFOAM is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenFOAM; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Application particleTracks Description \*---------------------------------------------------------------------------*/ #include "argList.H" #include "Cloud.H" #include "IOdictionary.H" #include "fvMesh.H" #include "Time.H" #include "timeSelector.H" #include "OFstream.H" #include "passiveParticle.H" #include "SortableList.H" using namespace Foam; Foam::label checkHeader(IOobject& io) { if (io.headerOk()) { return 0; } else { Info<< " no " << io.name() << " field" << endl; return 1; } } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // int main(int argc, char *argv[]) { # include "setRootCase.H" # include "createTime.H" instantList timeDirs = timeSelector::select0(runTime, args); # include "createMesh.H" # include "createFields.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // /* Parallel mode - nProcs known - scan through times to determine max id for each proc - scan through times to populate for each particle (indexed to procId): - id - time - construct single flat list from all procs of ids and times: - starting id = sum of ids of lower procs - sort particles according to time - join the dots... Serial mode - don't know if case was run in serial mode, or is a reconstructed parallel run - scan times to determine max origProcId and max id for each origProc - scan through times to populate for each particle (indexed to procId): - id - time - construct single flat list from all procs of ids and times: - starting id = sum of ids of lower procs - sort particles according to time - join the dots... */ DynamicList