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