Loading...
Searching...
No Matches
initialPointsMethod.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::initialPointsMethod
28
29Description
30 Abstract base class for generating initial points for a conformalVoronoiMesh
31
32SourceFiles
33 initialPointsMethod.C
34
35\*---------------------------------------------------------------------------*/
36
37#ifndef initialPointsMethod_H
38#define initialPointsMethod_H
39
40#include "point.H"
43#include "dictionary.H"
44#include "Random.H"
45#include "autoPtr.H"
47
48// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
49
50namespace Foam
51{
53/*---------------------------------------------------------------------------*\
54 Class initialPointsMethod Declaration
55\*---------------------------------------------------------------------------*/
56
57class initialPointsMethod
58:
59 public dictionary
60{
62protected:
64 // Protected data
66 const Time& runTime_;
71
73
75
76 //- Method details dictionary
78
79 //- Only allow the placement of initial points that are within the
80 // surfaces to be meshed by minimumSurfaceDistanceCoeff multiplied by
81 // the local target cell size. Store square of value.
83
85
86
87private:
88
89 // Private Member Functions
90
91 //- No copy construct
92 initialPointsMethod(const initialPointsMethod&) = delete;
93
94 //- No copy assignment
95 void operator=(const initialPointsMethod&) = delete;
96
97
98public:
99
100 //- Runtime type information
101 TypeName("initialPointsMethod");
102
103
104 // Declare run-time constructor selection table
105
108 autoPtr,
109 initialPointsMethod,
111 (
112 const dictionary& initialPointsDict,
113 const Time& runTime,
114 Random& rndGen,
118 ),
119 (
120 initialPointsDict,
121 runTime,
122 rndGen,
126 )
127 );
128
129
130 // Constructors
131
132 //- Construct from components
133 initialPointsMethod
134 (
135 const word& type,
136 const dictionary& initialPointsDict,
137 const Time& runTime,
138 Random& rndGen,
142 );
143
144
145 // Selectors
146
147 //- Return a reference to the selected initialPointsMethod
149 (
150 const dictionary& initialPointsDict,
151 const Time& runTime,
152 Random& rndGen,
156 );
157
159 //- Destructor
160 virtual ~initialPointsMethod() = default;
161
162
163 // Member Functions
164
165 // Access
166
167 const Time& time() const
168 {
169 return runTime_;
170 }
171
172 Random& rndGen() const
173 {
174 return rndGen_;
175 }
176
178 {
180 }
181
183 {
188 {
190 }
191
192 //- Const access to the details dictionary
193 const dictionary& detailsDict() const
195 return detailsDict_;
196 }
197
198 bool fixInitialPoints() const
200 return fixInitialPoints_;
201 }
202
203
204 // Queries
205
206 //- Return the initial points for the conformalVoronoiMesh
207 virtual List<Vb::Point> initialPoints() const = 0;
208};
209
210
211// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
213} // End namespace Foam
214
215// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
216
217#endif
218
219// ************************************************************************* //
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
Definition List.H:72
Random number generator.
Definition Random.H:56
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
Definition Time.H:75
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition autoPtr.H:65
Store a background polyMesh to use for the decomposition of space and queries for parallel conformalV...
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition dictionary.H:133
dictionary()
Default construct, a top-level empty dictionary.
Definition dictionary.C:68
initialPointsMethod(const word &type, const dictionary &initialPointsDict, const Time &runTime, Random &rndGen, const conformationSurfaces &geometryToConformTo, const cellShapeControl &cellShapeControls, const autoPtr< backgroundMeshDecomposition > &decomposition)
Construct from components.
TypeName("initialPointsMethod")
Runtime type information.
const cellShapeControl & cellShapeControls_
declareRunTimeSelectionTable(autoPtr, initialPointsMethod, dictionary,(const dictionary &initialPointsDict, const Time &runTime, Random &rndGen, const conformationSurfaces &geometryToConformTo, const cellShapeControl &cellShapeControls, const autoPtr< backgroundMeshDecomposition > &decomposition),(initialPointsDict, runTime, rndGen, geometryToConformTo, cellShapeControls, decomposition))
const autoPtr< backgroundMeshDecomposition > & decomposition_
virtual List< Vb::Point > initialPoints() const =0
Return the initial points for the conformalVoronoiMesh.
scalar minimumSurfaceDistanceCoeffSqr_
Only allow the placement of initial points that are within the.
static autoPtr< initialPointsMethod > New(const dictionary &initialPointsDict, const Time &runTime, Random &rndGen, const conformationSurfaces &geometryToConformTo, const cellShapeControl &cellShapeControls, const autoPtr< backgroundMeshDecomposition > &decomposition)
Return a reference to the selected initialPointsMethod.
const dictionary & detailsDict() const
Const access to the details dictionary.
const conformationSurfaces & geometryToConformTo() const
dictionary detailsDict_
Method details dictionary.
const conformationSurfaces & geometryToConformTo_
virtual ~initialPointsMethod()=default
Destructor.
const cellShapeControl & cellShapeControls() const
const backgroundMeshDecomposition & decomposition() const
A class for handling words, derived from Foam::string.
Definition word.H:66
engineTime & runTime
Namespace for OpenFOAM.
Macros to ease declaration of run-time selection tables.
#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:68