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-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::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 public:
87 
88  //- Runtime type information
89  ClassName("cellShapeControl");
90 
91 
92  // Constructors
93 
94  //- Construct from dictionary and references to conformalVoronoiMesh and
95  // searchableSurfaces
97  (
98  const Time& runTime,
99  const cvControls& foamyHexMeshControls,
100  const searchableSurfaces& allGeometry,
101  const conformationSurfaces& geometryToConformTo
102  );
103 
104  //- Disallow default bitwise copy construction
105  cellShapeControl(const cellShapeControl&) = delete;
106 
107 
108  //- Destructor
110 
111 
112  // Member Functions
113 
114  // Access
115 
116  inline const scalar& defaultCellSize() const;
117 
119 
120  inline const cellShapeControlMesh& shapeControlMesh() const;
121 
122  inline const cellAspectRatioControl& aspectRatio() const;
123 
124  inline const cellSizeAndAlignmentControls& sizeAndAlignment() const;
125 
126  inline const scalar& minimumCellSize() const;
127 
128 
129  // Query
130 
131  //- Return the cell size at the given location
132  scalar cellSize(const point& pt) const;
133 
134  scalarField cellSize(const pointField& pts) const;
135 
136  //- Return the cell alignment at the given location
137  tensor cellAlignment(const point& pt) const;
138 
140  (
141  const point& pt,
142  scalar& size,
143  tensor& alignment
144  ) const;
145 
146 
147  // Member Operators
148 
149  //- Disallow default bitwise assignment
150  void operator=(const cellShapeControl&) = delete;
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:158
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
cellShapeControl(const Time &runTime, const cvControls &foamyHexMeshControls, const searchableSurfaces &allGeometry, const conformationSurfaces &geometryToConformTo)
Construct from dictionary and references to conformalVoronoiMesh and.
ClassName("cellShapeControl")
Runtime type information.
cellShapeControlMesh & shapeControlMesh()
void operator=(const cellShapeControl &)=delete
Disallow default bitwise assignment.
Namespace for OpenFOAM.
scalar cellSize(const point &pt) const
Return the cell size at the given location.