LagrangianSchemes.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-2026 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::LagrangianSchemes
26 
27 Description
28  Selector class for Lagrangian schemes
29 
30 SourceFiles
31  LagrangianSchemes.C
32 
33 \*---------------------------------------------------------------------------*/
34 
35 #ifndef LagrangianSchemes_H
36 #define LagrangianSchemes_H
37 
38 #include "IOdictionary.H"
39 
40 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
41 
42 namespace Foam
43 {
44 
45 /*---------------------------------------------------------------------------*\
46  Class LagrangianSchemes Declaration
47 \*---------------------------------------------------------------------------*/
48 
50 :
51  public IOdictionary
52 {
53  // Private Data
54 
55  //- Time schemes sub-dictionary
56  dictionary ddtSchemes_;
57 
58  //- Default time scheme stream
59  ITstream defaultDdtScheme_;
60 
61  //- Source schemes sub-dictionary
62  dictionary SpSchemes_;
63 
64  //- Default source scheme stream
65  ITstream defaultSpScheme_;
66 
67  //- Averaging schemes sub-dictionary
68  dictionary averagingSchemes_;
69 
70  //- Default averaging scheme stream
71  ITstream defaultAveragingScheme_;
72 
73  //- Interpolation schemes sub-dictionary
74  dictionary interpolationSchemes_;
75 
76  //- Default interpolation scheme stream
77  ITstream defaultInterpolationScheme_;
78 
79  //- Accumulation schemes sub-dictionary
80  dictionary accumulationSchemes_;
81 
82  //- Default accumulation scheme stream
83  ITstream defaultAccumulationScheme_;
84 
85 
86  // Private Member Functions
87 
88  //- Clear the dictionaries and streams before reading
89  void clear();
90 
91  //- Read a scheme
92  void readScheme
93  (
94  const word& type,
95  dictionary& typeSchemes,
96  ITstream& defaultTypeScheme
97  );
98 
99  //- Read all the schemes from LagrangianSchemes
100  void readDict();
101 
102  //- Look up a scheme
103  static ITstream& lookupScheme
104  (
105  const word& name,
106  const dictionary& typeSchemes,
107  const ITstream& defaultTypeScheme
108  );
109 
110 
111 public:
112 
113  //- Type information
114  ClassName("LagrangianSchemes");
115 
116 
117  // Constructors
118 
119  //- Construct for objectRegistry
121 
122  //- Disallow default bitwise copy construction
123  LagrangianSchemes(const LagrangianSchemes&) = delete;
124 
125 
126  //- Destructor
128 
129 
130  // Member Functions
131 
132  // Access
133 
134  //- Get the time scheme for the given field name
135  ITstream& ddt(const word& name) const;
136 
137  //- Get the source scheme for the given field name
138  ITstream& Sp(const word& name) const;
139 
140  //- Get the averaging scheme for the given field name
141  ITstream& averaging(const word& name) const;
142 
143  //- Get the interpolation scheme for the given field name
144  ITstream& interpolation(const word& name) const;
145 
146  //- Get the accumulation scheme for the given field name
147  ITstream& accumulation(const word& name) const;
148 
149 
150  // Read
151 
152  //- Read the LagrangianSchemes
153  bool read();
154 
155 
156  // Member Operators
157 
158  //- Disallow default bitwise assignment
159  void operator=(const LagrangianSchemes&) = delete;
160 };
161 
162 
163 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
164 
165 } // End namespace Foam
166 
167 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
168 
169 #endif
170 
171 // ************************************************************************* //
IOdictionary is derived from dictionary and IOobject to give the dictionary automatic IO functionalit...
Definition: IOdictionary.H:57
const objectRegistry & db() const
Return the local objectRegistry.
Definition: IOobject.C:309
Input token stream.
Definition: ITstream.H:56
Selector class for Lagrangian schemes.
void operator=(const LagrangianSchemes &)=delete
Disallow default bitwise assignment.
ITstream & interpolation(const word &name) const
Get the interpolation scheme for the given field name.
ITstream & ddt(const word &name) const
Get the time scheme for the given field name.
ITstream & accumulation(const word &name) const
Get the accumulation scheme for the given field name.
ITstream & Sp(const word &name) const
Get the source scheme for the given field name.
ITstream & averaging(const word &name) const
Get the averaging scheme for the given field name.
LagrangianSchemes(const objectRegistry &db)
Construct for objectRegistry.
bool read()
Read the LagrangianSchemes.
ClassName("LagrangianSchemes")
Type information.
const fileName & name() const
Return the dictionary name.
Definition: dictionary.H:111
A list of keywords followed by any number of values (e.g. words and numbers) or sub-dictionaries.
Definition: dictionary.H:162
Registry of regIOobjects.
A class for handling words, derived from string.
Definition: word.H:63
Namespace for OpenFOAM.
fileType type(const fileName &, const bool checkVariants=true, const bool followLink=true)
Return the file type: directory or file.
Definition: POSIX.C:488