cellSizeAndAlignmentControl.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) 2012-2020 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 public:
73 
74  //- Runtime type information
75  TypeName("cellSizeAndAlignmentControl");
76 
77 
78  // Declare run-time constructor selection table
79 
81  (
82  autoPtr,
84  dictionary,
85  (
86  const Time& runTime,
87  const word& name,
88  const dictionary& controlFunctionDict,
89  const conformationSurfaces& geometryToConformTo,
90  const scalar& defaultCellSize
91  ),
92  (
93  runTime,
94  name,
95  controlFunctionDict,
96  geometryToConformTo,
97  defaultCellSize
98  )
99  );
100 
101 
102  // Constructors
103 
104  //- Construct from dictionary and references to conformalVoronoiMesh and
105  // searchableSurfaces
107  (
108  const Time& runTime,
109  const word& name,
110  const dictionary& controlFunctionDict,
111  const conformationSurfaces& geometryToConformTo,
112  const scalar& defaultCellSize
113  );
114 
115  //- Disallow default bitwise copy construction
117  (
119  ) = delete;
120 
121 
122  // Selectors
123 
124  //- Return a reference to the selected cellShapeControl
126  (
127  const Time& runTime,
128  const word& name,
129  const dictionary& controlFunctionDict,
130  const conformationSurfaces& geometryToConformTo,
131  const scalar& defaultCellSize
132  );
133 
134 
135  //- Destructor
137 
138 
139  // Member Functions
140 
141  // Access
143  const word& name() const
144  {
145  return name_;
146  }
148  const Switch& forceInitialPointInsertion() const
149  {
151  }
152 
153 
154  // Query
155 
156  virtual label maxPriority() const = 0;
157 
158  virtual void cellSizeFunctionVertices
159  (
161  DynamicList<scalar>& sizes
162  ) const = 0;
163 
164  virtual void initialVertices
165  (
166  pointField& pts,
167  scalarField& sizes,
168  triadField& alignments
169  ) const = 0;
170 
171 
172  // Member Operators
173 
174  //- Disallow default bitwise assignment
175  void operator=(const cellSizeAndAlignmentControl&) = delete;
176 };
177 
178 
179 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
180 
181 } // End namespace Foam
182 
183 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
184 
185 #endif
186 
187 // ************************************************************************* //
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:156
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/any.
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.
cellSizeAndAlignmentControl(const Time &runTime, const word &name, const dictionary &controlFunctionDict, const conformationSurfaces &geometryToConformTo, const scalar &defaultCellSize)
Construct from dictionary and references to conformalVoronoiMesh and.
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
Definition: Time.H:69
void operator=(const cellSizeAndAlignmentControl &)=delete
Disallow default bitwise assignment.
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:52
Namespace for OpenFOAM.