CloudFunctionObjectList.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration |
5  \\ / A nd | Copyright (C) 2011-2016 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 refernce 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 label celli,
117  const scalar dt,
118  const point& position0,
119  bool& keepParticle
120  );
121 
122  //- Post-patch hook
123  virtual void postPatch
124  (
125  const typename CloudType::parcelType& p,
126  const polyPatch& pp,
127  const scalar trackFraction,
128  const tetIndices& tetIs,
129  bool& keepParticle
130  );
131 
132  //- Post-face hook
133  virtual void postFace
134  (
135  const typename CloudType::parcelType& p,
136  const label facei,
137  bool& keepParticle
138  );
139 };
140 
141 
142 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
143 
144 } // End namespace Foam
145 
146 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
147 
149 
150 #ifdef NoRepository
151  #include "CloudFunctionObjectList.C"
152 #endif
153 
154 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
155 
156 #endif
157 
158 // ************************************************************************* //
const dictionary & dict() const
Return the forces dictionary.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Definition: label.H:59
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:137
virtual void postEvolve()
Post-evolve hook.
virtual ~CloudFunctionObjectList()
Destructor.
CloudFunctionObjectList(CloudType &owner)
Null constructor.
virtual void preEvolve()
Pre-evolve hook.
Storage and named access for the indices of a tet which is part of the decomposition of a cell...
Definition: tetIndices.H:81
virtual void postPatch(const typename CloudType::parcelType &p, const polyPatch &pp, const scalar trackFraction, const tetIndices &tetIs, bool &keepParticle)
Post-patch hook.
ParcelType parcelType
Type of parcel the cloud was instantiated for.
Definition: DSMCCloud.H:218
A templated 1D list of pointers to objects of type <T>, where the size of the array is known and used...
Definition: List.H:63
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.
virtual void postFace(const typename CloudType::parcelType &p, const label facei, bool &keepParticle)
Post-face hook.
const CloudType & owner_
Reference to the owner cloud.
virtual void postMove(typename CloudType::parcelType &p, const label celli, const scalar dt, const point &position0, bool &keepParticle)
Post-move hook.
Templated base class for dsmc cloud.
Definition: DSMCCloud.H:69
Namespace for OpenFOAM.