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 | www.openfoam.com
6 \\/ M anipulation |
7-------------------------------------------------------------------------------
8 Copyright (C) 2011-2017 OpenFOAM Foundation
9 Copyright (C) 2020 OpenCFD Ltd.
10-------------------------------------------------------------------------------
11License
12 This file is part of OpenFOAM.
13
14 OpenFOAM is free software: you can redistribute it and/or modify it
15 under the terms of the GNU General Public License as published by
16 the Free Software Foundation, either version 3 of the License, or
17 (at your option) any later version.
18
19 OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
20 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
21 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
22 for more details.
23
24 You should have received a copy of the GNU General Public License
25 along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
26
27Class
28 Foam::CloudFunctionObjectList
29
30Description
31 List of cloud function objects
32
33SourceFiles
34 CloudFunctionObjectListI.H
35 CloudFunctionObjectList.C
36
37\*---------------------------------------------------------------------------*/
38
39#ifndef CloudFunctionObjectList_H
40#define CloudFunctionObjectList_H
41
42#include "PtrList.H"
43#include "CloudFunctionObject.H"
44
45// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
46
47namespace Foam
48{
49
50/*---------------------------------------------------------------------------*\
51 Class CloudFunctionObjectList Declaration
52\*---------------------------------------------------------------------------*/
53
54template<class CloudType>
56:
57 public PtrList<CloudFunctionObject<CloudType>>
58{
59private:
60
61 //- Convenience typedef for parcel type
62 typedef typename CloudType::parcelType parcelType;
63
64
65protected:
66
67 // Protected Data
68
69 //- Reference to the owner cloud
70 const CloudType& owner_;
71
72 //- Dictionary
73 const dictionary dict_;
74
75
76public:
77
78 // Constructors
79
80 //- Null constructor
82
83 //- Construct from mesh
85 (
87 const dictionary& dict,
88 const bool readFields
89 );
90
91 //- Construct copy
93
94
95 //- Destructor
96 virtual ~CloudFunctionObjectList() = default;
97
98
99 // Member Functions
100
101 // Access
102
103 //- Return const access to the cloud owner
104 inline const CloudType& owner() const;
105
106 //- Return reference to the cloud owner
107 inline CloudType& owner();
108
109 //- Return the forces dictionary
110 inline const dictionary& dict() const;
111
112
113 // Evaluation
114
115 //- Pre-evolve hook
116 virtual void preEvolve
117 (
118 const typename parcelType::trackingData& td
119 );
120
121 //- Post-evolve hook
122 virtual void postEvolve
123 (
124 const typename parcelType::trackingData& td
125 );
126
127 //- Post-move hook
128 virtual void postMove
129 (
130 parcelType& p,
131 const scalar dt,
132 const point& position0,
133 bool& keepParticle
134 );
135
136 //- Post-patch hook
137 virtual void postPatch
138 (
139 const parcelType& p,
140 const polyPatch& pp,
141 bool& keepParticle
142 );
143
144 //- Post-face hook
145 virtual void postFace
146 (
147 const parcelType& p,
148 bool& keepParticle
149 );
150};
151
152
153// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
154
155} // End namespace Foam
156
157// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
158
160
161#ifdef NoRepository
163#endif
164
165// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
166
167#endif
168
169// ************************************************************************* //
List of cloud function objects.
const CloudType & owner_
Reference to the owner cloud.
virtual void postMove(parcelType &p, const scalar dt, const point &position0, bool &keepParticle)
Post-move hook.
virtual void postPatch(const parcelType &p, const polyPatch &pp, bool &keepParticle)
Post-patch hook.
virtual void postEvolve(const typename parcelType::trackingData &td)
Post-evolve 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(const typename parcelType::trackingData &td)
Pre-evolve hook.
virtual ~CloudFunctionObjectList()=default
Destructor.
virtual void postFace(const parcelType &p, bool &keepParticle)
Post-face hook.
Templated base class for dsmc cloud.
Definition: DSMCCloud.H:75
ParcelType parcelType
Type of parcel the cloud was instantiated for.
Definition: DSMCCloud.H:220
A list of pointers to objects of type <T>, with allocation/deallocation management of the pointers....
Definition: PtrList.H:73
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:126
Class used to pass data into container.
A patch is a list of labels that address the faces in the global face list.
Definition: polyPatch.H:75
volScalarField & p
Namespace for OpenFOAM.
void readFields(const typename GeoFieldType::Mesh &mesh, const IOobjectList &objects, const wordHashSet &selectedFields, LIFOStack< regIOobject * > &storedObjects)
Read the selected GeometricFields of the templated type.