cloudLagrangianModel.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) 2025 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::cloudLagrangianModel
26 
27 Description
28  Base class for Lagrangian models that refer to a cloud. Not a Lagrangian
29  model in itself. Must be mixed in.
30 
31 SourceFiles
32  cloudLagrangianModel.C
33 
34 \*---------------------------------------------------------------------------*/
35 
36 #ifndef cloudLagrangianModel_H
37 #define cloudLagrangianModel_H
38 
39 #include "LagrangianModel.H"
40 
41 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
42 
43 namespace Foam
44 {
45 
46 class cloud;
47 
48 /*---------------------------------------------------------------------------*\
49  Class cloudLagrangianModel Declaration
50 \*---------------------------------------------------------------------------*/
51 
53 {
54 private:
55 
56  // Private Data
57 
58  //- Name of the model
59  const word& name_;
60 
61  //- Reference to the cloud
62  const Foam::cloud& cloud_;
63 
64 
65 protected:
66 
67  // Protected Member Functions
68 
69  //- Determine whether the cloud is one of the given types
70  template<class Cloud, class ... Clouds>
71  bool isCloud() const;
72 
73  //- Generate an error if the cloud is not one of the given types
74  template<class Cloud, class ... Clouds>
75  void assertCloud() const;
76 
77  //- Get a reference to the cloud
78  template<class Cloud = Foam::cloud>
79  const Cloud& cloud() const;
80 
81 
82 public:
83 
84  //- Runtime type information
85  TypeName("cloudLagrangianModel");
86 
87 
88  // Constructors
89 
90  //- Construct from a Lagrangian model
92 
93 
94  //- Destructor
95  virtual ~cloudLagrangianModel();
96 };
97 
98 
99 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
100 
101 } // End namespace Foam
102 
103 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
104 
105 #ifdef NoRepository
107 #endif
108 
109 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
110 
111 #endif
112 
113 // ************************************************************************* //
Base cloud calls templated on particle type.
Base class for Lagrangian models.
Base class for Lagrangian models that refer to a cloud. Not a Lagrangian model in itself....
TypeName("cloudLagrangianModel")
Runtime type information.
void assertCloud() const
Generate an error if the cloud is not one of the given types.
bool isCloud() const
Determine whether the cloud is one of the given types.
cloudLagrangianModel(const LagrangianModel &)
Construct from a Lagrangian model.
virtual ~cloudLagrangianModel()
Destructor.
const Cloud & cloud() const
Get a reference to the cloud.
Base class for clouds. Provides a basic evolution algorithm, models, and a database for caching deriv...
Definition: cloud.H:63
A class for handling words, derived from string.
Definition: word.H:62
Namespace for OpenFOAM.