extrudeModel.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration |
5  \\ / A nd | Copyright (C) 2011-2015 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  // Private Member Functions
68 
69  //- Disallow default bitwise copy construct
70  extrudeModel(const extrudeModel&);
71 
72  //- Disallow default bitwise assignment
73  void operator=(const extrudeModel&);
74 
75 
76 public:
77 
78  //- Runtime type information
79  TypeName("extrudeModel");
80 
81  //- Declare runtime constructor selection table
82 
84  (
85  autoPtr,
87  dictionary,
88  (
89  const dictionary& dict
90  ),
91  (dict)
92  );
93 
94 
95  // Constructors
96 
97  //- Construct from dictionary
98  extrudeModel(const word& modelType, const dictionary&);
99 
100 
101  // Selectors
102 
103  //- Select null constructed
104  static autoPtr<extrudeModel> New(const dictionary&);
105 
106 
107  //- Destructor
108  virtual ~extrudeModel();
109 
110 
111  // Member Functions
112 
113  // Access
114 
115  label nLayers() const;
116 
117  scalar expansionRatio() const;
118 
119 
120  // Member Operators
121 
122  //- Helper: calculate cumulative relative thickness for layer.
123  // (layer=0 -> 0; layer=nLayers -> 1)
124  scalar sumThickness(const label layer) const;
125 
126  virtual point operator()
127  (
128  const point& surfacePoint,
129  const vector& surfaceNormal,
130  const label layer
131  ) const = 0;
132 };
133 
134 
135 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
136 
137 } // End namespace Foam
138 
139 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
140 
141 #endif
142 
143 // ************************************************************************* //
virtual ~extrudeModel()
Destructor.
Definition: extrudeModel.C:53
const scalar expansionRatio_
Definition: extrudeModel.H:59
dictionary dict
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:137
const dictionary & coeffDict_
Definition: extrudeModel.H:63
Top level extrusion model class.
Definition: extrudeModel.H:51
extrudeModel(const extrudeModel &)
Disallow default bitwise copy construct.
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
void operator=(const extrudeModel &)
Disallow default bitwise assignment.
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.