CloudFunctionObjectList.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-2018 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::CloudFunctionObjectList
26 
27 Description
28  List of cloud function objects
29 
30 SourceFiles
31  CloudFunctionObjectListI.H
32  CloudFunctionObjectList.C
33 
34 \*---------------------------------------------------------------------------*/
35 
36 #ifndef CloudFunctionObjectList_H
37 #define CloudFunctionObjectList_H
38 
39 #include "PtrList.H"
40 #include "CloudFunctionObject.H"
41 
42 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
43 
44 namespace Foam
45 {
46 
47 /*---------------------------------------------------------------------------*\
48  Class CloudFunctionObjectList Declaration
49 \*---------------------------------------------------------------------------*/
50 
51 template<class CloudType>
53 :
54  public PtrList<CloudFunctionObject<CloudType>>
55 {
56 protected:
57 
58  // Protected Data
59 
60  //- Reference to the owner cloud
61  const CloudType& owner_;
62 
63  //- Dictionary
64  const dictionary dict_;
65 
66 
67 public:
68 
69  // Constructors
70 
71  //- Null constructor
73 
74  //- Construct from mesh
76  (
78  const dictionary& dict,
79  const bool readFields
80  );
81 
82  //- Construct copy
84 
85 
86  //- Destructor
87  virtual ~CloudFunctionObjectList();
88 
89 
90  // Member Functions
91 
92  // Access
93 
94  //- Return const access to the cloud owner
95  inline const CloudType& owner() const;
96 
97  //- Return references to the cloud owner
98  inline CloudType& owner();
99 
100  //- Return the forces dictionary
101  inline const dictionary& dict() const;
102 
103 
104  // Evaluation
105 
106  //- Pre-evolve hook
107  virtual void preEvolve();
108 
109  //- Post-evolve hook
110  virtual void postEvolve();
111 
112  //- Post-move hook
113  virtual void postMove
114  (
115  typename CloudType::parcelType& p,
116  const scalar dt,
117  const point& position0,
118  bool& keepParticle
119  );
120 
121  //- Post-patch hook
122  virtual void postPatch
123  (
124  const typename CloudType::parcelType& p,
125  const polyPatch& pp,
126  bool& keepParticle
127  );
128 
129  //- Post-face hook
130  virtual void postFace
131  (
132  const typename CloudType::parcelType& p,
133  bool& keepParticle
134  );
135 };
136 
137 
138 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
139 
140 } // End namespace Foam
141 
142 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
143 
145 
146 #ifdef NoRepository
147  #include "CloudFunctionObjectList.C"
148 #endif
149 
150 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
151 
152 #endif
153 
154 // ************************************************************************* //
virtual void postPatch(const typename CloudType::parcelType &p, const polyPatch &pp, bool &keepParticle)
Post-patch hook.
const dictionary & dict() const
Return the forces dictionary.
const dictionary dict_
Dictionary.
void readFields(const typename GeoFieldType::Mesh &mesh, const IOobjectList &objects, const HashSet< word > &selectedFields, LIFOStack< regIOobject *> &storedObjects)
Read the selected GeometricFields of the specified type.
Definition: ReadFields.C:244
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:158
virtual void postEvolve()
Post-evolve hook.
virtual ~CloudFunctionObjectList()
Destructor.
CloudFunctionObjectList(CloudType &owner)
Null constructor.
virtual void postFace(const typename CloudType::parcelType &p, bool &keepParticle)
Post-face hook.
virtual void preEvolve()
Pre-evolve hook.
ParcelType parcelType
Type of parcel the cloud was instantiated for.
Definition: DSMCCloud.H:215
A templated 1D list of pointers to objects of type <T>, where the size of the array is known and used...
Definition: List.H:70
virtual void postMove(typename CloudType::parcelType &p, const scalar dt, const point &position0, bool &keepParticle)
Post-move hook.
List of cloud function objects.
volScalarField & p
A patch is a list of labels that address the faces in the global face list.
Definition: polyPatch.H:66
const CloudType & owner() const
Return const access to the cloud owner.
const CloudType & owner_
Reference to the owner cloud.
Templated base class for dsmc cloud.
Definition: DSMCCloud.H:69
Namespace for OpenFOAM.