Loading...
Searching...
No Matches
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-------------------------------------------------------------------------------
11License
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
27Class
28 Foam::cellShapeControl
29
30Description
31
32SourceFiles
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"
54#include "cvControls.H"
55
56// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
57
58namespace Foam
59{
61/*---------------------------------------------------------------------------*\
62 Class cellShapeControl Declaration
63\*---------------------------------------------------------------------------*/
64
65class 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
93public:
94
95 //- Runtime type information
96 ClassName("cellShapeControl");
98
99 // Constructors
100
101 //- Construct from dictionary and references to conformalVoronoiMesh and
102 // searchableSurfaces
103 cellShapeControl
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
120 inline scalar defaultCellSize() const;
121
123
124 inline const cellShapeControlMesh& shapeControlMesh() const;
125
126 inline const cellAspectRatioControl& aspectRatio() const;
127
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
145 const point& pt,
146 scalar& size,
147 tensor& alignment
148 ) const;
149};
150
152// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
154} // End namespace Foam
155
156// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
157
158#include "cellShapeControlI.H"
159
160// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
161
162#endif
163
164// ************************************************************************* //
label size() const noexcept
The number of elements in list.
Definition DLListBase.H:194
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
Definition Time.H:75
scalar defaultCellSize() const
ClassName("cellShapeControl")
Runtime type information.
const cellSizeAndAlignmentControls & sizeAndAlignment() const
const cellAspectRatioControl & aspectRatio() const
cellShapeControlMesh & shapeControlMesh()
scalar minimumCellSize() const
~cellShapeControl()=default
Destructor.
cellShapeControl(const Time &runTime, const cvControls &foamyHexMeshControls, const searchableSurfaces &allGeometry, const conformationSurfaces &geometryToConformTo)
Construct from dictionary and references to conformalVoronoiMesh and.
tensor cellAlignment(const point &pt) const
Return the cell alignment at the given location.
void cellSizeAndAlignment(const point &pt, scalar &size, tensor &alignment) const
scalar cellSize(const point &pt) const
Return the cell size at the given location.
scalarField cellSize(const pointField &pts) const
Controls for the conformalVoronoiMesh mesh generator.
Definition cvControls.H:52
dictionary()
Default construct, a top-level empty dictionary.
Definition dictionary.C:68
Container for searchableSurfaces. The collection is specified as a dictionary. For example,...
#define ClassName(TypeNameString)
Add typeName information from argument TypeNameString to a class.
Definition className.H:74
engineTime & runTime
Namespace for OpenFOAM.
Tensor< scalar > tensor
Definition symmTensor.H:57
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
vector point
Point is a vector.
Definition point.H:37
vectorField pointField
pointField is a vectorField.
Forward declarations of the specialisations of Field<T> for scalar, vector and tensor.
const pointField & pts