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