passiveParticle.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration | Website: https://openfoam.org
5  \\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8 License
9  This file is part of OpenFOAM.
10 
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.
15 
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
19  for more details.
20 
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/>.
23 
24 Class
25  Foam::passiveParticle
26 
27 Description
28  Copy of base particle
29 
30 SourceFiles
31  passiveParticle.H
32 
33 \*---------------------------------------------------------------------------*/
34 
35 #ifndef passiveParticle_H
36 #define passiveParticle_H
37 
38 #include "particle.H"
39 #include "IOstream.H"
40 #include "autoPtr.H"
41 
42 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
43 
44 namespace Foam
45 {
46 
47 /*---------------------------------------------------------------------------*\
48  Class passiveParticle Declaration
49 \*---------------------------------------------------------------------------*/
50 
51 class passiveParticle
52 :
53  public particle
54 {
55 
56 public:
57 
58  // Constructors
59 
60  //- Construct from components
62  (
63  const polyMesh& mesh,
64  const barycentric& coordinates,
65  const label celli,
66  const label tetFacei,
67  const label tetPti
68  )
69  :
70  particle(mesh, coordinates, celli, tetFacei, tetPti)
71  {}
72 
73 
74  //- Construct from a position and a cell, searching for the rest of the
75  // required topology
77  (
78  const polyMesh& mesh,
79  const vector& position,
80  const label celli
81  )
82  :
83  particle(mesh, position, celli)
84  {}
85 
86  //- Construct from Istream
88  (
89  const polyMesh& mesh,
90  Istream& is,
91  bool readFields = true
92  )
93  :
94  particle(mesh, is, readFields)
95  {}
96 
97  //- Copy constructor
99  :
100  particle(p)
101  {}
102 
103  //- Construct and return a clone
104  virtual autoPtr<particle> clone() const
105  {
106  return autoPtr<particle>(new passiveParticle(*this));
107  }
108 };
109 
110 
111 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
112 
113 } // End namespace Foam
114 
115 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
116 
117 #endif
118 
119 // ************************************************************************* //
An Istream is an abstract base class for all input systems (streams, files, token lists etc)...
Definition: Istream.H:57
virtual autoPtr< particle > clone() const
Construct and return a clone.
Base particle class.
Definition: particle.H:81
static void readFields(TrackCloudType &c)
Read the fields associated with the owner cloud.
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Definition: PtrList.H:52
Mesh consisting of general polyhedral cells.
Definition: polyMesh.H:76
volScalarField & p
Copy of base particle.
vector position() const
Return current particle position.
Definition: particleI.H:278
passiveParticle(const polyMesh &mesh, const barycentric &coordinates, const label celli, const label tetFacei, const label tetPti)
Construct from components.
Namespace for OpenFOAM.