pointFile.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-2019 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::pointFile
26 
27 Description
28  Inserts points at locations specified in a pointFile into the surfaces to
29  be conformed to of the conformalVoronoiMesh
30 
31 SourceFiles
32  pointFile.C
33 
34 \*---------------------------------------------------------------------------*/
35 
36 #ifndef pointFile_H
37 #define pointFile_H
38 
39 #include "fileName.H"
40 #include "pointIOField.H"
41 #include "Switch.H"
42 #include "initialPointsMethod.H"
43 
44 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
45 
46 namespace Foam
47 {
48 
49 /*---------------------------------------------------------------------------*\
50  Class pointFile Declaration
51 \*---------------------------------------------------------------------------*/
52 
53 class pointFile
54 :
55  public initialPointsMethod
56 {
57 
58 private:
59 
60  // Private Data
61 
62  //- The initial cell spacing
63  fileName pointFileName_;
64 
65  //- Check if inserted points are inside or outside
66  Switch insideOutsideCheck_;
67 
68  //- Should the initial positions be randomised
69  Switch randomiseInitialGrid_;
70 
71  //- Randomise the initial positions by fraction of the initialCellSize_
72  scalar randomPerturbationCoeff_;
73 
74 
75 public:
76 
77  //- Runtime type information
78  TypeName("pointFile");
79 
80  // Constructors
81 
82  //- Construct from components
83  pointFile
84  (
85  const dictionary& initialPointsDict,
86  const Time& runTime,
87  Random& rndGen,
91  );
92 
93 
94  //- Destructor
95  virtual ~pointFile()
96  {}
97 
98 
99  // Member Functions
100 
101  //- Return the initial points for the conformalVoronoiMesh
102  virtual List<Vb::Point> initialPoints() const;
103 };
104 
105 
106 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
107 
108 } // End namespace Foam
109 
110 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
111 
112 #endif
113 
114 // ************************************************************************* //
virtual List< Vb::Point > initialPoints() const
Return the initial points for the conformalVoronoiMesh.
A class for handling file names.
Definition: fileName.H:79
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:158
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
engineTime & runTime
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
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
Definition: Time.H:68
const cellShapeControl & cellShapeControls() const
pointFile(const dictionary &initialPointsDict, const Time &runTime, Random &rndGen, const conformationSurfaces &geometryToConformTo, const cellShapeControl &cellShapeControls, const autoPtr< backgroundMeshDecomposition > &decomposition)
Construct from components.
Abstract base class for generating initial points for a conformalVoronoiMesh.
const backgroundMeshDecomposition & decomposition() const
Random number generator.
Definition: Random.H:57
TypeName("pointFile")
Runtime type information.
const conformationSurfaces & geometryToConformTo() const
Inserts points at locations specified in a pointFile into the surfaces to be conformed to of the conf...
Definition: pointFile.H:52
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Definition: PtrList.H:52
virtual ~pointFile()
Destructor.
Definition: pointFile.H:94
Namespace for OpenFOAM.