cellSizeAndAlignmentControl.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) 2012-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::cellSizeAndAlignmentControl
26 
27 Description
28 
29 SourceFiles
30  cellSizeAndAlignmentControlI.H
31  cellSizeAndAlignmentControl.C
32 
33 \*---------------------------------------------------------------------------*/
34 
35 #ifndef cellSizeAndAlignmentControl_H
36 #define cellSizeAndAlignmentControl_H
37 
38 #include "dictionary.H"
39 #include "conformationSurfaces.H"
40 #include "Time.H"
41 #include "quaternion.H"
42 #include "triadField.H"
43 
44 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
45 
46 namespace Foam
47 {
48 
49 
50 /*---------------------------------------------------------------------------*\
51  Class cellSizeAndAlignmentControl Declaration
52 \*---------------------------------------------------------------------------*/
53 
55 {
56 protected:
57 
58  const Time& runTime_;
59 
60  const scalar& defaultCellSize_;
61 
63 
64 
65 private:
66 
67  // Private data
68 
69  const word name_;
70 
71 
72  // Private Member Functions
73 
74  //- Disallow default bitwise copy construct
76 
77  //- Disallow default bitwise assignment
78  void operator=(const cellSizeAndAlignmentControl&);
79 
80 
81 public:
82 
83  //- Runtime type information
84  TypeName("cellSizeAndAlignmentControl");
85 
86 
87  // Declare run-time constructor selection table
88 
90  (
91  autoPtr,
93  dictionary,
94  (
95  const Time& runTime,
96  const word& name,
97  const dictionary& controlFunctionDict,
98  const conformationSurfaces& geometryToConformTo,
99  const scalar& defaultCellSize
100  ),
101  (
102  runTime,
103  name,
104  controlFunctionDict,
105  geometryToConformTo,
106  defaultCellSize
107  )
108  );
109 
110 
111  // Constructors
112 
113  //- Construct from dictionary and references to conformalVoronoiMesh and
114  // searchableSurfaces
116  (
117  const Time& runTime,
118  const word& name,
119  const dictionary& controlFunctionDict,
120  const conformationSurfaces& geometryToConformTo,
121  const scalar& defaultCellSize
122  );
123 
124 
125  // Selectors
126 
127  //- Return a reference to the selected cellShapeControl
129  (
130  const Time& runTime,
131  const word& name,
132  const dictionary& controlFunctionDict,
133  const conformationSurfaces& geometryToConformTo,
134  const scalar& defaultCellSize
135  );
136 
137 
138  //- Destructor
140 
141 
142  // Member Functions
143 
144  // Access
146  const word& name() const
147  {
148  return name_;
149  }
151  const Switch& forceInitialPointInsertion() const
152  {
154  }
155 
156 
157  // Query
158 
159  virtual label maxPriority() const = 0;
160 
161  virtual void cellSizeFunctionVertices
162  (
164  DynamicList<scalar>& sizes
165  ) const = 0;
166 
167  virtual void initialVertices
168  (
169  pointField& pts,
170  scalarField& sizes,
171  triadField& alignments
172  ) const = 0;
173 };
174 
175 
176 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
177 
178 } // End namespace Foam
179 
180 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
181 
182 #endif
183 
184 // ************************************************************************* //
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
virtual label maxPriority() const =0
A simple wrapper around bool so that it can be read as a word: true/false, on/off, yes/no, y/n, t/f, or none.
Definition: Switch.H:60
declareRunTimeSelectionTable(autoPtr, cellSizeAndAlignmentControl, dictionary,(const Time &runTime, const word &name, const dictionary &controlFunctionDict, const conformationSurfaces &geometryToConformTo, const scalar &defaultCellSize),(runTime, name, controlFunctionDict, geometryToConformTo, defaultCellSize))
virtual void cellSizeFunctionVertices(DynamicList< Foam::point > &pts, DynamicList< scalar > &sizes) const =0
TypeName("cellSizeAndAlignmentControl")
Runtime type information.
static autoPtr< cellSizeAndAlignmentControl > New(const Time &runTime, const word &name, const dictionary &controlFunctionDict, const conformationSurfaces &geometryToConformTo, const scalar &defaultCellSize)
Return a reference to the selected cellShapeControl.
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
Definition: Time.H:68
virtual ~cellSizeAndAlignmentControl()
Destructor.
A 1D vector of objects of type <T> that resizes itself as necessary to accept the new objects...
Definition: DynamicList.H:56
A class for handling words, derived from string.
Definition: word.H:59
virtual void initialVertices(pointField &pts, scalarField &sizes, triadField &alignments) const =0
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Definition: PtrList.H:53
Namespace for OpenFOAM.