1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright (C) 1991-2008 OpenCFD Ltd.
7 -------------------------------------------------------------------------------
9 This file is part of OpenFOAM.
11 OpenFOAM is free software; you can redistribute it and/or modify it
12 under the terms of the GNU General Public License as published by the
13 Free Software Foundation; either version 2 of the License, or (at your
14 option) any later version.
16 OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
17 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21 You should have received a copy of the GNU General Public License
22 along with OpenFOAM; if not, write to the Free Software Foundation,
23 Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
29 Particle class that marks cells it passes through. Used to mark cells
30 visited by feature edges. Uses ExactParticle tracking class so
31 will work on concave cells.
36 \*---------------------------------------------------------------------------*/
38 #ifndef trackedParticle_H
39 #define trackedParticle_H
41 #include "ExactParticle.H"
44 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
49 class trackedParticleCloud;
51 /*---------------------------------------------------------------------------*\
52 Class trackedParticle Declaration
53 \*---------------------------------------------------------------------------*/
57 public ExactParticle<trackedParticle>
61 //- end point to track to
64 //- level of this particle
75 friend class Cloud<trackedParticle>;
77 //- Class used to pass tracking data to the trackToFace function
80 //- Reference to the cloud containing this particle
81 Cloud<trackedParticle>& cloud_;
93 trackData(Cloud<trackedParticle>& cloud, labelList& maxLevel)
102 Cloud<trackedParticle>& cloud()
107 labelList& maxLevel()
117 //- Construct from components
120 const Cloud<trackedParticle>& c,
121 const vector& position,
129 //- Construct from Istream
132 const Cloud<trackedParticle>& c,
134 bool readFields = true
137 //- Construct and return a clone
138 autoPtr<trackedParticle> clone() const
140 return autoPtr<trackedParticle>(new trackedParticle(*this));
146 //- point to track to
152 //- transported label
158 //- transported label
168 //- Track all particles to their end point
169 bool move(trackData&);
172 //- Overridable function to handle the particle hitting a wedge
175 const wedgePolyPatch&,
176 trackedParticle::trackData& td
180 const wedgePolyPatch&,
184 //- Overridable function to handle the particle hitting a
186 void hitSymmetryPatch
188 const symmetryPolyPatch&,
189 trackedParticle::trackData& td
191 void hitSymmetryPatch
193 const symmetryPolyPatch&,
197 //- Overridable function to handle the particle hitting a cyclic
200 const cyclicPolyPatch&,
201 trackedParticle::trackData& td
205 const cyclicPolyPatch&,
209 //- Overridable function to handle the particle hitting a
211 void hitProcessorPatch
213 const processorPolyPatch&,
214 trackedParticle::trackData& td
216 void hitProcessorPatch
218 const processorPolyPatch&,
222 //- Overridable function to handle the particle hitting a wallPatch
225 const wallPolyPatch&,
226 trackedParticle::trackData& td
230 const wallPolyPatch&,
234 //- Overridable function to handle the particle hitting a polyPatch
238 trackedParticle::trackData& td
249 friend Ostream& operator<<(Ostream&, const trackedParticle&);
256 inline bool contiguous<trackedParticle>()
262 //void Cloud<trackedParticle>::readFields();
265 //void Cloud<trackedParticle>::writeFields() const;
268 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
270 } // End namespace Foam
272 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
276 // ************************************************************************* //