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-2024 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 owner and dictionary
76 
77  //- Construct copy
79 
80 
81  //- Destructor
82  virtual ~CloudFunctionObjectList();
83 
84 
85  // Member Functions
86 
87  // Access
88 
89  //- Return const access to the cloud owner
90  inline const CloudType& owner() const;
91 
92  //- Return references to the cloud owner
93  inline CloudType& owner();
94 
95  //- Return the forces dictionary
96  inline const dictionary& dict() const;
97 
98 
99  // Evaluation
100 
101  //- Pre-evolve hook
102  virtual void preEvolve();
103 
104  //- Post-evolve hook
105  virtual void postEvolve();
106 
107  //- Post-move hook
108  virtual void postMove
109  (
110  typename CloudType::parcelType& p,
111  const scalar dt,
112  const point& position0,
113  bool& keepParticle
114  );
115 
116  //- Post-patch hook
117  virtual void postPatch
118  (
119  const typename CloudType::parcelType& p,
120  const polyPatch& pp
121  );
122 
123  //- Pre-face hook
124  virtual void preFace(const typename CloudType::parcelType& p);
125 
126  //- Post-face hook
127  virtual void postFace(const typename CloudType::parcelType& p);
128 };
129 
130 
131 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
132 
133 } // End namespace Foam
134 
135 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
136 
138 
139 #ifdef NoRepository
140  #include "CloudFunctionObjectList.C"
141 #endif
142 
143 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
144 
145 #endif
146 
147 // ************************************************************************* //
List of cloud function objects.
virtual void postEvolve()
Post-evolve hook.
const CloudType & owner_
Reference to the owner cloud.
virtual void postMove(typename CloudType::parcelType &p, const scalar dt, const point &position0, bool &keepParticle)
Post-move hook.
virtual void postFace(const typename CloudType::parcelType &p)
Post-face hook.
const dictionary dict_
Dictionary.
const dictionary & dict() const
Return the forces dictionary.
const CloudType & owner() const
Return const access to the cloud owner.
virtual void preEvolve()
Pre-evolve hook.
virtual void postPatch(const typename CloudType::parcelType &p, const polyPatch &pp)
Post-patch hook.
virtual ~CloudFunctionObjectList()
Destructor.
CloudFunctionObjectList(CloudType &owner)
Null constructor.
virtual void preFace(const typename CloudType::parcelType &p)
Pre-face hook.
Templated base class for dsmc cloud.
Definition: DSMCCloud.H:80
ParcelType parcelType
Type of parcel the cloud was instantiated for.
Definition: DSMCCloud.H:225
A templated 1D list of pointers to objects of type <T>, where the size of the array is known and used...
Definition: PtrList.H:75
A list of keyword definitions, which are a keyword followed by any number of values (e....
Definition: dictionary.H:162
A patch is a list of labels that address the faces in the global face list.
Definition: polyPatch.H:70
Namespace for OpenFOAM.
volScalarField & p