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 | www.openfoam.com
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8  Copyright (C) 2012-2015 OpenFOAM Foundation
9 -------------------------------------------------------------------------------
10 License
11  This file is part of OpenFOAM.
12 
13  OpenFOAM is free software: you can redistribute it and/or modify it
14  under the terms of the GNU General Public License as published by
15  the Free Software Foundation, either version 3 of the License, or
16  (at your option) any later version.
17 
18  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
19  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
20  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21  for more details.
22 
23  You should have received a copy of the GNU General Public License
24  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
25 
26 Class
27  Foam::cellSizeAndAlignmentControl
28 
29 Description
30 
31 SourceFiles
32  cellSizeAndAlignmentControlI.H
33  cellSizeAndAlignmentControl.C
34 
35 \*---------------------------------------------------------------------------*/
36 
37 #ifndef cellSizeAndAlignmentControl_H
38 #define cellSizeAndAlignmentControl_H
39 
40 #include "dictionary.H"
41 #include "conformationSurfaces.H"
42 #include "Time.H"
43 #include "quaternion.H"
44 #include "triadField.H"
45 
46 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
47 
48 namespace Foam
49 {
50 
51 
52 /*---------------------------------------------------------------------------*\
53  Class cellSizeAndAlignmentControl Declaration
54 \*---------------------------------------------------------------------------*/
55 
57 {
58 protected:
59 
60  const Time& runTime_;
61 
62  const scalar& defaultCellSize_;
63 
65 
66 
67 private:
68 
69  // Private data
70 
71  const word name_;
72 
73 
74  // Private Member Functions
75 
76  //- No copy construct
78  (
80  ) = delete;
81 
82  //- No copy assignment
83  void operator=(const cellSizeAndAlignmentControl&) = delete;
84 
85 
86 public:
87 
88  //- Runtime type information
89  TypeName("cellSizeAndAlignmentControl");
90 
91 
92  // Declare run-time constructor selection table
93 
95  (
96  autoPtr,
98  dictionary,
99  (
100  const Time& runTime,
101  const word& name,
102  const dictionary& controlFunctionDict,
103  const conformationSurfaces& geometryToConformTo,
104  const scalar& defaultCellSize
105  ),
106  (
107  runTime,
108  name,
109  controlFunctionDict,
110  geometryToConformTo,
111  defaultCellSize
112  )
113  );
114 
115 
116  // Constructors
117 
118  //- Construct from dictionary and references to conformalVoronoiMesh and
119  // searchableSurfaces
121  (
122  const Time& runTime,
123  const word& name,
124  const dictionary& controlFunctionDict,
125  const conformationSurfaces& geometryToConformTo,
126  const scalar& defaultCellSize
127  );
128 
129 
130  // Selectors
131 
132  //- Return a reference to the selected cellShapeControl
134  (
135  const Time& runTime,
136  const word& name,
137  const dictionary& controlFunctionDict,
138  const conformationSurfaces& geometryToConformTo,
139  const scalar& defaultCellSize
140  );
141 
142 
143  //- Destructor
144  virtual ~cellSizeAndAlignmentControl() = default;
145 
146 
147  // Member Functions
148 
149  // Access
150 
151  const word& name() const
152  {
153  return name_;
154  }
155 
156  const Switch& forceInitialPointInsertion() const
157  {
159  }
160 
161 
162  // Query
163 
164  virtual label maxPriority() const = 0;
165 
166  virtual void cellSizeFunctionVertices
167  (
169  DynamicList<scalar>& sizes
170  ) const = 0;
171 
172  virtual void initialVertices
173  (
174  pointField& pts,
175  scalarField& sizes,
176  triadField& alignments
177  ) const = 0;
178 };
179 
180 
181 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
182 
183 } // End namespace Foam
184 
185 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
186 
187 #endif
188 
189 // ************************************************************************* //
Foam::cellSizeAndAlignmentControl
Definition: cellSizeAndAlignmentControl.H:55
runTime
engineTime & runTime
Definition: createEngineTime.H:13
Foam::Switch
A simple wrapper around bool so that it can be read as a word: true/false, on/off,...
Definition: Switch.H:77
Foam::Time
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
Definition: Time.H:73
Foam::word
A class for handling words, derived from Foam::string.
Definition: word.H:65
Foam::DynamicList
A 1D vector of objects of type <T> that resizes itself as necessary to accept the new objects.
Definition: DynamicList.H:55
quaternion.H
Foam::cellSizeAndAlignmentControl::initialVertices
virtual void initialVertices(pointField &pts, scalarField &sizes, triadField &alignments) const =0
Foam::cellSizeAndAlignmentControl::maxPriority
virtual label maxPriority() const =0
Foam::cellSizeAndAlignmentControl::forceInitialPointInsertion
const Switch & forceInitialPointInsertion() const
Definition: cellSizeAndAlignmentControl.H:155
Foam::conformationSurfaces
Definition: conformationSurfaces.H:55
Foam::cellSizeAndAlignmentControl::New
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.
Foam::cellSizeAndAlignmentControl::forceInitialPointInsertion_
Switch forceInitialPointInsertion_
Definition: cellSizeAndAlignmentControl.H:63
Foam::cellSizeAndAlignmentControl::declareRunTimeSelectionTable
declareRunTimeSelectionTable(autoPtr, cellSizeAndAlignmentControl, dictionary,(const Time &runTime, const word &name, const dictionary &controlFunctionDict, const conformationSurfaces &geometryToConformTo, const scalar &defaultCellSize),(runTime, name, controlFunctionDict, geometryToConformTo, defaultCellSize))
Foam::Field< vector >
Foam::cellSizeAndAlignmentControl::TypeName
TypeName("cellSizeAndAlignmentControl")
Runtime type information.
Foam::cellSizeAndAlignmentControl::cellSizeFunctionVertices
virtual void cellSizeFunctionVertices(DynamicList< Foam::point > &pts, DynamicList< scalar > &sizes) const =0
conformationSurfaces.H
Foam::cellSizeAndAlignmentControl::defaultCellSize_
const scalar & defaultCellSize_
Definition: cellSizeAndAlignmentControl.H:61
Foam::dictionary
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:123
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::cellSizeAndAlignmentControl::runTime_
const Time & runTime_
Definition: cellSizeAndAlignmentControl.H:59
Time.H
Foam::autoPtr
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition: HashPtrTable.H:53
Foam::cellSizeAndAlignmentControl::~cellSizeAndAlignmentControl
virtual ~cellSizeAndAlignmentControl()=default
Destructor.
triadField.H
dictionary.H
Foam::cellSizeAndAlignmentControl::name
const word & name() const
Definition: cellSizeAndAlignmentControl.H:150