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-------------------------------------------------------------------------------
10License
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
26Class
27 Foam::cellSizeAndAlignmentControl
28
29Description
30
31SourceFiles
32 cellSizeAndAlignmentControlI.H
33 cellSizeAndAlignmentControl.C
34
35\*---------------------------------------------------------------------------*/
36
37#ifndef cellSizeAndAlignmentControl_H
38#define cellSizeAndAlignmentControl_H
39
40#include "dictionary.H"
42#include "Time.H"
43#include "quaternion.H"
44#include "triadField.H"
45
46// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
47
48namespace Foam
49{
50
51
52/*---------------------------------------------------------------------------*\
53 Class cellSizeAndAlignmentControl Declaration
54\*---------------------------------------------------------------------------*/
57{
58protected:
60 const Time& runTime_;
62 const scalar& defaultCellSize_;
65
66
67private:
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
86public:
87
88 //- Runtime type information
89 TypeName("cellSizeAndAlignmentControl");
90
91
92 // Declare run-time constructor selection table
95 (
96 autoPtr,
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
151 const word& name() const
152 {
153 return name_;
154 }
157 {
159 }
160
161
162 // Query
164 virtual label maxPriority() const = 0;
166 virtual void cellSizeFunctionVertices
167 (
170 ) const = 0;
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// ************************************************************************* //
A 1D vector of objects of type <T> that resizes itself as necessary to accept the new objects.
Definition: DynamicList.H:72
A simple wrapper around bool so that it can be read as a word: true/false, on/off,...
Definition: Switch.H:78
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
Definition: Time.H:80
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition: autoPtr.H:66
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
virtual ~cellSizeAndAlignmentControl()=default
Destructor.
TypeName("cellSizeAndAlignmentControl")
Runtime type information.
virtual void initialVertices(pointField &pts, scalarField &sizes, triadField &alignments) const =0
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.
virtual label maxPriority() const =0
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:126
A class for handling words, derived from Foam::string.
Definition: word.H:68
engineTime & runTime
Namespace for OpenFOAM.
#define declareRunTimeSelectionTable(ptrWrapper, baseType, argNames, argList, parList)
Declare a run-time selection (variables and adder classes)
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition: typeInfo.H:73