exponential_oneDimensionalDiscretisation.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::oneDimensionalDiscretisations::exponential
26 
27 Description
28  Exponential coordinate spacing. The i-th coordinate is given by:
29 
30  \f[
31  x_i = \left( \frac{x_{\textrm{max}}}{x_{\textrm{min}}} \\
32  \right)^{\frac{i}{n - 1}} x_{\textrm{min}}
33  \f]
34 
35 Usage
36  Example specification:
37  \verbatim
38  {
39  type exponential;
40 
41  // First and last coordinates
42  min 0.01;
43  max 0.51;
44  }
45  \endverbatim
46 
47 SourceFiles
48  oneDimensionalDiscretisation.C
49 
50 \*---------------------------------------------------------------------------*/
51 
52 #ifndef exponential_oneDimensionalDiscretisation_H
53 #define exponential_oneDimensionalDiscretisation_H
54 
56 
57 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
58 
59 namespace Foam
60 {
61 namespace oneDimensionalDiscretisations
62 {
63 
64 /*---------------------------------------------------------------------------*\
65  Class exponential Declaration
66 \*---------------------------------------------------------------------------*/
67 
68 class exponential
69 :
71 {
72 private:
73 
74  // Private Static Member Functions
75 
76  //- Generate the coordinates
78  (
79  const dimensionSet& dims,
80  const label n,
81  const dictionary& dict
82  );
83 
84 
85 public:
86 
87  //- Runtime type information
88  TypeName("exponential");
89 
90 
91  // Constructors
92 
93  //- Construct from a dictionary
95  (
96  const word& name,
97  const dimensionSet& dims,
98  const label n,
99  const dictionary& dict
100  );
101 };
102 
103 
104 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
105 
106 } // End namespace oneDimensionalDiscretisations
107 } // End namespace Foam
108 
109 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
110 
111 #endif
112 
113 // ************************************************************************* //
label n
A list of keywords followed by any number of values (e.g. words and numbers) or sub-dictionaries.
Definition: dictionary.H:162
Dimension set for the base types.
Definition: dimensionSet.H:125
Base class for ways in which to generate coordinates in one-dimensional space. Used to space the repr...
const scalarField & coordinates() const
Return the coordinates.
Exponential coordinate spacing. The i-th coordinate is given by:
exponential(const word &name, const dimensionSet &dims, const label n, const dictionary &dict)
Construct from a dictionary.
TypeName("exponential")
Runtime type information.
A class for managing temporary objects.
Definition: tmp.H:55
A class for handling words, derived from string.
Definition: word.H:63
Namespace for OpenFOAM.
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
word name(const LagrangianState state)
Return a string representation of a Lagrangian state enumeration.
dictionary dict