cellShapeControl.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-2018 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::cellShapeControl
26 
27 Description
28 
29 SourceFiles
30  cellShapeControlI.H
31  cellShapeControl.C
32 
33 \*---------------------------------------------------------------------------*/
34 
35 #ifndef cellShapeControl_H
36 #define cellShapeControl_H
37 
38 #include "dictionary.H"
39 #include "autoPtr.H"
40 #include "tensor.H"
41 #include "point.H"
42 #include "primitiveFieldsFwd.H"
43 #include "pointFieldFwd.H"
44 #include "Time.H"
45 #include "searchableSurfaces.H"
46 #include "conformationSurfaces.H"
47 #include "cellAspectRatioControl.H"
49 #include "cellShapeControlMesh.H"
51 #include "cvControls.H"
52 
53 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
54 
55 namespace Foam
56 {
57 
58 
59 /*---------------------------------------------------------------------------*\
60  Class cellShapeControl Declaration
61 \*---------------------------------------------------------------------------*/
62 
63 class cellShapeControl
64 :
65  public dictionary
66 {
67  // Private data
68 
69  const Time& runTime_;
70 
71  const searchableSurfaces& allGeometry_;
72 
73  const conformationSurfaces& geometryToConformTo_;
74 
75  const scalar defaultCellSize_;
76 
77  const scalar minimumCellSize_;
78 
79  cellShapeControlMesh shapeControlMesh_;
80 
81  cellAspectRatioControl aspectRatio_;
82 
83  cellSizeAndAlignmentControls sizeAndAlignment_;
84 
85 
86  // Private Member Functions
87 
88  //- Disallow default bitwise copy construct
90 
91  //- Disallow default bitwise assignment
92  void operator=(const cellShapeControl&);
93 
94 
95 public:
96 
97  //- Runtime type information
98  ClassName("cellShapeControl");
99 
100 
101  // Constructors
102 
103  //- Construct from dictionary and references to conformalVoronoiMesh and
104  // searchableSurfaces
106  (
107  const Time& runTime,
108  const cvControls& foamyHexMeshControls,
109  const searchableSurfaces& allGeometry,
110  const conformationSurfaces& geometryToConformTo
111  );
112 
113 
114  //- Destructor
116 
117 
118  // Member Functions
119 
120  // Access
121 
122  inline const scalar& defaultCellSize() const;
123 
125 
126  inline const cellShapeControlMesh& shapeControlMesh() const;
127 
128  inline const cellAspectRatioControl& aspectRatio() const;
129 
130  inline const cellSizeAndAlignmentControls& sizeAndAlignment() const;
131 
132  inline const scalar& minimumCellSize() const;
133 
134 
135  // Query
136 
137  //- Return the cell size at the given location
138  scalar cellSize(const point& pt) const;
139 
140  scalarField cellSize(const pointField& pts) const;
141 
142  //- Return the cell alignment at the given location
143  tensor cellAlignment(const point& pt) const;
144 
146  (
147  const point& pt,
148  scalar& size,
149  tensor& alignment
150  ) const;
151 };
152 
153 
154 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
155 
156 } // End namespace Foam
157 
158 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
159 
160 #include "cellShapeControlI.H"
161 
162 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
163 
164 #endif
165 
166 // ************************************************************************* //
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:137
engineTime & runTime
const scalar & minimumCellSize() const
void cellSizeAndAlignment(const point &pt, scalar &size, tensor &alignment) const
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
Definition: Time.H:68
const cellSizeAndAlignmentControls & sizeAndAlignment() const
tensor cellAlignment(const point &pt) const
Return the cell alignment at the given location.
const scalar & defaultCellSize() const
~cellShapeControl()
Destructor.
Forward declarations of the specialisations of Field<T> for scalar, vector and tensor.
const cellAspectRatioControl & aspectRatio() const
Container for searchableSurfaces.
Controls for the conformalVoronoiMesh mesh generator.
Definition: cvControls.H:53
ClassName("cellShapeControl")
Runtime type information.
cellShapeControlMesh & shapeControlMesh()
Namespace for OpenFOAM.
scalar cellSize(const point &pt) const
Return the cell size at the given location.