1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright held by original author
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 patch
173 // Executed before other patch-hitting functions
177 trackedParticle::trackData& td,
187 //- Overridable function to handle the particle hitting a wedge
190 const wedgePolyPatch&,
191 trackedParticle::trackData& td
195 const wedgePolyPatch&,
199 //- Overridable function to handle the particle hitting a
201 void hitSymmetryPatch
203 const symmetryPolyPatch&,
204 trackedParticle::trackData& td
206 void hitSymmetryPatch
208 const symmetryPolyPatch&,
212 //- Overridable function to handle the particle hitting a cyclic
215 const cyclicPolyPatch&,
216 trackedParticle::trackData& td
220 const cyclicPolyPatch&,
224 //- Overridable function to handle the particle hitting a
226 void hitProcessorPatch
228 const processorPolyPatch&,
229 trackedParticle::trackData& td
231 void hitProcessorPatch
233 const processorPolyPatch&,
237 //- Overridable function to handle the particle hitting a wallPatch
240 const wallPolyPatch&,
241 trackedParticle::trackData& td
245 const wallPolyPatch&,
249 //- Overridable function to handle the particle hitting a polyPatch
253 trackedParticle::trackData& td
264 friend Ostream& operator<<(Ostream&, const trackedParticle&);
271 inline bool contiguous<trackedParticle>()
277 //void Cloud<trackedParticle>::readFields();
280 //void Cloud<trackedParticle>::writeFields() const;
283 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
285 } // End namespace Foam
287 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
291 // ************************************************************************* //