faceCentredCubic.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  Copyright (C) 2018 OpenCFD Ltd.
10 -------------------------------------------------------------------------------
11 License
12  This file is part of OpenFOAM.
13 
14  OpenFOAM is free software: you can redistribute it and/or modify it
15  under the terms of the GNU General Public License as published by
16  the Free Software Foundation, either version 3 of the License, or
17  (at your option) any later version.
18 
19  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
20  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
21  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
22  for more details.
23 
24  You should have received a copy of the GNU General Public License
25  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
26 
27 Class
28  Foam::faceCentredCubic
29 
30 Description
31  Generate an FCC lattice of points inside the surfaces to be
32  conformed to of the conformalVoronoiMesh
33 
34 SourceFiles
35  faceCentredCubic.C
36 
37 \*---------------------------------------------------------------------------*/
38 
39 #ifndef faceCentredCubic_H
40 #define faceCentredCubic_H
41 
42 #include "initialPointsMethod.H"
43 
44 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
45 
46 namespace Foam
47 {
48 
49 /*---------------------------------------------------------------------------*\
50  Class faceCentredCubic Declaration
51 \*---------------------------------------------------------------------------*/
52 
53 class faceCentredCubic
54 :
55  public initialPointsMethod
56 {
57 private:
58 
59  // Private data
60 
61  //- The initial cell spacing
62  scalar initialCellSize_;
63 
64  //- Should the initial positions be randomised
65  Switch randomiseInitialGrid_;
66 
67  //- Randomise the initial positions by fraction of the initialCellSize_
68  scalar randomPerturbationCoeff_;
69 
70 
71 public:
72 
73  //- Runtime type information
74  TypeName("faceCentredCubic");
75 
76  // Constructors
77 
78  //- Construct from components
80  (
81  const dictionary& initialPointsDict,
82  const Time& runTime,
83  Random& rndGen,
87  );
88 
89 
90  //- Destructor
91  virtual ~faceCentredCubic() = default;
92 
93 
94  // Member Functions
95 
96  //- Return the initial points for the conformalVoronoiMesh
97  virtual List<Vb::Point> initialPoints() const;
98 };
99 
100 
101 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
102 
103 } // End namespace Foam
104 
105 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
106 
107 #endif
108 
109 // ************************************************************************* //
runTime
engineTime & runTime
Definition: createEngineTime.H:13
Foam::faceCentredCubic::~faceCentredCubic
virtual ~faceCentredCubic()=default
Destructor.
Foam::Random
Random number generator.
Definition: Random.H:59
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::initialPointsMethod::cellShapeControls
const cellShapeControl & cellShapeControls() const
Definition: initialPointsMethod.H:181
Foam::Time
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
Definition: Time.H:73
Foam::initialPointsMethod::decomposition
const backgroundMeshDecomposition & decomposition() const
Definition: initialPointsMethod.H:186
Foam::faceCentredCubic::faceCentredCubic
faceCentredCubic(const dictionary &initialPointsDict, const Time &runTime, Random &rndGen, const conformationSurfaces &geometryToConformTo, const cellShapeControl &cellShapeControls, const autoPtr< backgroundMeshDecomposition > &decomposition)
Construct from components.
Foam::conformationSurfaces
Definition: conformationSurfaces.H:55
Foam::initialPointsMethod::geometryToConformTo
const conformationSurfaces & geometryToConformTo() const
Definition: initialPointsMethod.H:176
Foam::dictionary
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:123
Foam::cellShapeControl
Definition: cellShapeControl.H:64
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::initialPointsMethod
Abstract base class for generating initial points for a conformalVoronoiMesh.
Definition: initialPointsMethod.H:56
Foam::faceCentredCubic::initialPoints
virtual List< Vb::Point > initialPoints() const
Return the initial points for the conformalVoronoiMesh.
Foam::autoPtr
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition: HashPtrTable.H:53
initialPointsMethod.H
Foam::initialPointsMethod::rndGen
Random & rndGen() const
Definition: initialPointsMethod.H:171
Foam::List
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
Definition: BitOps.H:63
Foam::faceCentredCubic::TypeName
TypeName("faceCentredCubic")
Runtime type information.
Foam::faceCentredCubic
Generate an FCC lattice of points inside the surfaces to be conformed to of the conformalVoronoiMesh.
Definition: faceCentredCubic.H:52