extrudeModel.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) 2011-2019 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::extrudeModel
26 
27 Description
28  Top level extrusion model class
29 
30 SourceFiles
31  extrudeModel.C
32 
33 \*---------------------------------------------------------------------------*/
34 
35 #ifndef extrudeModel_H
36 #define extrudeModel_H
37 
38 #include "dictionary.H"
39 #include "point.H"
40 #include "autoPtr.H"
41 #include "runTimeSelectionTables.H"
42 
43 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
44 
45 namespace Foam
46 {
47 
48 /*---------------------------------------------------------------------------*\
49  Class extrudeModel Declaration
50 \*---------------------------------------------------------------------------*/
51 
52 class extrudeModel
53 {
54 protected:
55 
56  // Protected data
57 
59 
60  const scalar expansionRatio_;
61 
62  const dictionary& dict_;
63 
64  const dictionary& coeffDict_;
65 
66 
67 public:
68 
69  //- Runtime type information
70  TypeName("extrudeModel");
71 
72  //- Declare runtime constructor selection table
73 
75  (
76  autoPtr,
78  dictionary,
79  (
80  const dictionary& dict
81  ),
82  (dict)
83  );
84 
85 
86  // Constructors
87 
88  //- Construct from dictionary
89  extrudeModel(const word& modelType, const dictionary&);
90 
91  //- Disallow default bitwise copy construction
92  extrudeModel(const extrudeModel&) = delete;
93 
94 
95  // Selectors
96 
97  //- Select null constructed
98  static autoPtr<extrudeModel> New(const dictionary&);
99 
100 
101  //- Destructor
102  virtual ~extrudeModel();
103 
104 
105  // Member Functions
106 
107  // Access
108 
109  label nLayers() const;
110 
111  scalar expansionRatio() const;
112 
113 
114  // Member Operators
115 
116  //- Disallow default bitwise assignment
117  void operator=(const extrudeModel&) = delete;
118 
119  //- Helper: calculate cumulative relative thickness for layer.
120  // (layer=0 -> 0; layer=nLayers -> 1)
121  scalar sumThickness(const label layer) const;
122 
123  virtual point operator()
124  (
125  const point& surfacePoint,
126  const vector& surfaceNormal,
127  const label layer
128  ) const = 0;
129 };
130 
131 
132 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
133 
134 } // End namespace Foam
135 
136 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
137 
138 #endif
139 
140 // ************************************************************************* //
virtual ~extrudeModel()
Destructor.
Definition: extrudeModel.C:53
extrudeModel(const word &modelType, const dictionary &)
Construct from dictionary.
Definition: extrudeModel.C:39
const scalar expansionRatio_
Definition: extrudeModel.H:59
dictionary dict
void operator=(const extrudeModel &)=delete
Disallow default bitwise assignment.
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
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:156
const dictionary & coeffDict_
Definition: extrudeModel.H:63
Top level extrusion model class.
Definition: extrudeModel.H:51
static autoPtr< extrudeModel > New(const dictionary &)
Select null constructed.
TypeName("extrudeModel")
Runtime type information.
A class for handling words, derived from string.
Definition: word.H:59
label nLayers() const
Definition: extrudeModel.C:59
declareRunTimeSelectionTable(autoPtr, extrudeModel, dictionary,(const dictionary &dict),(dict))
Declare runtime constructor selection table.
scalar sumThickness(const label layer) const
Helper: calculate cumulative relative thickness for layer.
Definition: extrudeModel.C:71
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Definition: PtrList.H:52
Macros to ease declaration of run-time selection tables.
scalar expansionRatio() const
Definition: extrudeModel.C:65
const dictionary & dict_
Definition: extrudeModel.H:61
Namespace for OpenFOAM.