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-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::oneDimensionalDiscretisation
26 
27 Description
28  Base class for ways in which to generate coordinates in one-dimensional
29  space. Used to space the representative spherical diameters of the groups
30  in a population balance model.
31 
32 SourceFiles
33  oneDimensionalDiscretisation.C
34 
35 \*---------------------------------------------------------------------------*/
36 
37 #ifndef oneDimensionalDiscretisation_H
38 #define oneDimensionalDiscretisation_H
39 
40 #include "runTimeSelectionTables.H"
41 #include "dimensionedScalar.H"
42 #include "scalarField.H"
43 
44 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
45 
46 namespace Foam
47 {
48 
49 /*---------------------------------------------------------------------------*\
50  Class oneDimensionalDiscretisation Declaration
51 \*---------------------------------------------------------------------------*/
52 
54 {
55 private:
56 
57  // Private Data
58 
59  //- Name
60  const word name_;
61 
62  //- Dimensions
63  const dimensionSet dims_;
64 
65  //- Coordinates
66  const scalarField coordinates_;
67 
68 
69 public:
70 
71  //- Runtime type information
72  TypeName("oneDimensionalDiscretisation");
73 
74 
75  // Declare run-time constructor selection table
76 
78  (
79  autoPtr,
81  dictionary,
82  (
83  const word& name,
84  const dimensionSet& dims,
85  const label n,
86  const dictionary& dict
87  ),
88  (name, dims, n, dict)
89  );
90 
91 
92  // Constructors
93 
94  //- Construct from components
96  (
97  const word& name,
98  const dimensionSet& dims,
100  );
101 
102 
103  //- Selector
105  (
106  const word& name,
107  const dimensionSet& dims,
108  const label n,
109  const dictionary& dict
110  );
111 
112 
113  //- Destructor
115 
116 
117  // Member Operators
118 
119  //- Return the coordinates
120  inline const scalarField& coordinates() const;
121 
122  //- Return the coordinates as a list of dimensioned scalars
124 };
125 
126 
127 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
128 
129 } // End namespace Foam
130 
131 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
132 
134 
135 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
136 
137 #endif
138 
139 // ************************************************************************* //
label n
A templated 1D list of pointers to objects of type <T>, where the size of the array is known and used...
Definition: PtrList.H:75
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Definition: autoPtr.H:51
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...
static autoPtr< oneDimensionalDiscretisation > New(const word &name, const dimensionSet &dims, const label n, const dictionary &dict)
Selector.
declareRunTimeSelectionTable(autoPtr, oneDimensionalDiscretisation, dictionary,(const word &name, const dimensionSet &dims, const label n, const dictionary &dict),(name, dims, n, dict))
TypeName("oneDimensionalDiscretisation")
Runtime type information.
PtrList< dimensionedScalar > dimensionedCoordinates() const
Return the coordinates as a list of dimensioned scalars.
oneDimensionalDiscretisation(const word &name, const dimensionSet &dims, const tmp< scalarField > &coordinates)
Construct from components.
const scalarField & coordinates() const
Return the coordinates.
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.
Macros to ease declaration of run-time selection tables.
dictionary dict