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{
60
61/*---------------------------------------------------------------------------*\
62 Class cellShapeControl Declaration
63\*---------------------------------------------------------------------------*/
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");
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
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;
138 scalarField cellSize(const pointField& pts) const;
139
140 //- Return the cell alignment at the given location
141 tensor cellAlignment(const point& pt) const;
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// ************************************************************************* //
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
Definition: Time.H:80
scalar defaultCellSize() const
ClassName("cellShapeControl")
Runtime type information.
const cellSizeAndAlignmentControls & sizeAndAlignment() const
const cellAspectRatioControl & aspectRatio() const
cellShapeControlMesh & shapeControlMesh()
scalar minimumCellSize() const
~cellShapeControl()=default
Destructor.
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:56
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:126
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:67
engineTime & runTime
Namespace for OpenFOAM.
Forward declarations of the specialisations of Field<T> for scalar, vector and tensor.