All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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-2020 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 conformationSurfaces& geometryToConformTo_;
70 
71  const scalar defaultCellSize_;
72 
73  const scalar minimumCellSize_;
74 
75  cellShapeControlMesh shapeControlMesh_;
76 
77  cellAspectRatioControl aspectRatio_;
78 
79  cellSizeAndAlignmentControls sizeAndAlignment_;
80 
81 
82 public:
83 
84  //- Runtime type information
85  ClassName("cellShapeControl");
86 
87 
88  // Constructors
89 
90  //- Construct from dictionary and references to conformalVoronoiMesh and
91  // searchableSurfaces
93  (
94  const Time& runTime,
95  const cvControls& foamyHexMeshControls,
96  const searchableSurfaces& allGeometry,
97  const conformationSurfaces& geometryToConformTo
98  );
99 
100  //- Disallow default bitwise copy construction
101  cellShapeControl(const cellShapeControl&) = delete;
102 
103 
104  //- Destructor
106 
107 
108  // Member Functions
109 
110  // Access
111 
112  inline const scalar& defaultCellSize() const;
113 
115 
116  inline const cellShapeControlMesh& shapeControlMesh() const;
117 
118  inline const cellAspectRatioControl& aspectRatio() const;
119 
120  inline const cellSizeAndAlignmentControls& sizeAndAlignment() const;
121 
122  inline const scalar& minimumCellSize() const;
123 
124 
125  // Query
126 
127  //- Return the cell size at the given location
128  scalar cellSize(const point& pt) const;
129 
130  scalarField cellSize(const pointField& pts) const;
131 
132  //- Return the cell alignment at the given location
133  tensor cellAlignment(const point& pt) const;
134 
136  (
137  const point& pt,
138  scalar& size,
139  tensor& alignment
140  ) const;
141 
142 
143  // Member Operators
144 
145  //- Disallow default bitwise assignment
146  void operator=(const cellShapeControl&) = delete;
147 };
148 
149 
150 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
151 
152 } // End namespace Foam
153 
154 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
155 
156 #include "cellShapeControlI.H"
157 
158 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
159 
160 #endif
161 
162 // ************************************************************************* //
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:156
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.