uniformGrid.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::uniformGrid
26 
27 Description
28  Generate a uniform grid of points inside the surfaces to be
29  conformed to of the conformalVoronoiMesh
30 
31 SourceFiles
32  uniformGrid.C
33 
34 \*---------------------------------------------------------------------------*/
35 
36 #ifndef uniformGrid_H
37 #define uniformGrid_H
38 
39 #include "initialPointsMethod.H"
40 
41 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
42 
43 namespace Foam
44 {
45 
46 /*---------------------------------------------------------------------------*\
47  Class uniformGrid Declaration
48 \*---------------------------------------------------------------------------*/
49 
50 class uniformGrid
51 :
52  public initialPointsMethod
53 {
54 
55 private:
56 
57  // Private data
58 
59  //- The initial cell spacing
60  scalar initialCellSize_;
61 
62  //- Should the initial positions be randomised
64 
65  //- Randomise the initial positions by fraction of the initialCellSize_
67 
68 
69 public:
70 
71  //- Runtime type information
72  TypeName("uniformGrid");
73 
74  // Constructors
75 
76  //- Construct from components
78  (
79  const dictionary& initialPointsDict,
80  const Time& runTime,
81  Random& rndGen,
85  );
86 
87 
88  //- Destructor
89  virtual ~uniformGrid()
90  {}
91 
92 
93  // Member Functions
94 
95  //- Return the initial points for the conformalVoronoiMesh
96  virtual List<Vb::Point> initialPoints() const;
97 };
98 
99 
100 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
101 
102 } // End namespace Foam
103 
104 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
105 
106 #endif
107 
108 // ************************************************************************* //
Foam::Random
Simple random number generator.
Definition: Random.H:49
Foam::Switch
A simple wrapper around bool so that it can be read as a word: true/false, on/off,...
Definition: Switch.H:60
Foam::initialPointsMethod::cellShapeControls
const cellShapeControl & cellShapeControls() const
Definition: initialPointsMethod.H:180
Foam::Time
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
Definition: Time.H:68
Foam::initialPointsMethod::decomposition
const backgroundMeshDecomposition & decomposition() const
Definition: initialPointsMethod.H:185
Foam::uniformGrid::initialCellSize_
scalar initialCellSize_
The initial cell spacing.
Definition: uniformGrid.H:59
Foam::conformationSurfaces
Definition: conformationSurfaces.H:53
Foam::uniformGrid
Generate a uniform grid of points inside the surfaces to be conformed to of the conformalVoronoiMesh.
Definition: uniformGrid.H:49
Foam::initialPointsMethod::geometryToConformTo
const conformationSurfaces & geometryToConformTo() const
Definition: initialPointsMethod.H:175
Foam::uniformGrid::randomiseInitialGrid_
Switch randomiseInitialGrid_
Should the initial positions be randomised.
Definition: uniformGrid.H:62
Foam::dictionary
A list of keyword definitions, which are a keyword followed by any number of values (e....
Definition: dictionary.H:137
Foam::cellShapeControl
Definition: cellShapeControl.H:62
Foam
Namespace for OpenFOAM.
Definition: combustionModel.C:30
Foam::initialPointsMethod
Abstract base class for generating initial points for a conformalVoronoiMesh.
Definition: initialPointsMethod.H:55
Foam::uniformGrid::randomPerturbationCoeff_
scalar randomPerturbationCoeff_
Randomise the initial positions by fraction of the initialCellSize_.
Definition: uniformGrid.H:65
Foam::autoPtr
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Definition: PtrList.H:117
initialPointsMethod.H
Foam::uniformGrid::uniformGrid
uniformGrid(const dictionary &initialPointsDict, const Time &runTime, Random &rndGen, const conformationSurfaces &geometryToConformTo, const cellShapeControl &cellShapeControls, const autoPtr< backgroundMeshDecomposition > &decomposition)
Construct from components.
Foam::initialPointsMethod::rndGen
Random & rndGen() const
Definition: initialPointsMethod.H:170
Foam::List
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
Definition: HashTable.H:59
Foam::uniformGrid::TypeName
TypeName("uniformGrid")
Runtime type information.
Foam::uniformGrid::~uniformGrid
virtual ~uniformGrid()
Destructor.
Definition: uniformGrid.H:88
Foam::uniformGrid::initialPoints
virtual List< Vb::Point > initialPoints() const
Return the initial points for the conformalVoronoiMesh.