1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright (C) 2004-2011 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
13 the Free Software Foundation, either version 3 of the License, or
14 (at your 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, see <http://www.gnu.org/licenses/>.
24 \*---------------------------------------------------------------------------*/
27 #include "transform.H"
29 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
31 Foam::label Foam::particle::particleCount_ = 0;
33 const Foam::scalar Foam::particle::trackingCorrectionTol = 1e-5;
35 const Foam::scalar Foam::particle::lambdaDistanceToleranceCoeff = 1e3*SMALL;
39 defineTypeNameAndDebug(particle, 0);
43 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
45 Foam::particle::particle
48 const vector& position,
61 origProc_(Pstream::myProcNo()),
62 origId_(getNewParticleID())
66 Foam::particle::particle
69 const vector& position,
81 origProc_(Pstream::myProcNo()),
82 origId_(getNewParticleID())
91 Foam::particle::particle(const particle& p)
94 position_(p.position_),
97 stepFraction_(p.stepFraction_),
98 tetFaceI_(p.tetFaceI_),
100 origProc_(p.origProc_),
105 Foam::particle::particle(const particle& p, const polyMesh& mesh)
108 position_(p.position_),
111 stepFraction_(p.stepFraction_),
112 tetFaceI_(p.tetFaceI_),
114 origProc_(p.origProc_),
119 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
121 void Foam::particle::transformProperties(const tensor&)
125 void Foam::particle::transformProperties(const vector&)
129 Foam::scalar Foam::particle::wallImpactDistance(const vector&) const
131 Info<< "particle::wallImpactDistance" << endl;
137 // * * * * * * * * * * * * * * Friend Operators * * * * * * * * * * * * * * //
139 bool Foam::operator==(const particle& pA, const particle& pB)
141 return (pA.origProc() == pB.origProc() && pA.origId() == pB.origId());
145 bool Foam::operator!=(const particle& pA, const particle& pB)
151 // ************************************************************************* //