cellSizeAndAlignmentControls.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::cellSizeAndAlignmentControls
26 
27 Description
28 
29 SourceFiles
30  cellSizeAndAlignmentControls.C
31 
32 \*---------------------------------------------------------------------------*/
33 
34 #ifndef cellSizeAndAlignmentControls_H
35 #define cellSizeAndAlignmentControls_H
36 
37 #include "dictionary.H"
39 
40 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
41 
42 namespace Foam
43 {
44 
45 /*---------------------------------------------------------------------------*\
46  Class cellSizeAndAlignmentControls Declaration
47 \*---------------------------------------------------------------------------*/
48 
50 {
51  // Private Data
52 
53  const dictionary& shapeControlDict_;
54 
55  const conformationSurfaces& geometryToConformTo_;
56 
57  PtrList<cellSizeAndAlignmentControl> controlFunctions_;
58 
59  const scalar defaultCellSize_;
60 
61 
62  // Private Member Functions
63 
64  bool evalCellSizeFunctions
65  (
66  const point& pt,
67  scalar& minSize,
68  label& maxPriority
69  ) const;
70 
71  //- Disallow default bitwise copy construction
73  (
75  ) = delete;
76 
77  //- Disallow default bitwise assignment
78  void operator=(const cellSizeAndAlignmentControls&) = delete;
79 
80 
81 public:
82 
83  //- Runtime type information
84  ClassName("cellSizeAndAlignmentControls");
85 
86 
87  // Constructors
88 
89  //- Construct from dictionary
91  (
92  const Time& runTime,
93  const dictionary& shapeControlDict,
95  const scalar& defaultCellSize
96  );
97 
98 
99  //- Destructor
101 
102 
103  // Member Functions
104 
105  // Access
106 
108  controlFunctions() const
109  {
110  return controlFunctions_;
111  }
113  inline const conformationSurfaces& geometryToConformTo() const
114  {
115  return geometryToConformTo_;
116  }
117 
118 
119  // Query
120 
121  scalar cellSize(const point& pt) const;
122 
123  scalar cellSize(const point& pt, label& maxPriority) const;
124 };
125 
126 
127 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
128 
129 } // End namespace Foam
130 
131 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
132 
133 #endif
134 
135 // ************************************************************************* //
scalar cellSize(const point &pt) const
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Definition: label.H:59
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:156
engineTime & runTime
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
Definition: Time.H:68
const PtrList< cellSizeAndAlignmentControl > & controlFunctions() const
ClassName("cellSizeAndAlignmentControls")
Runtime type information.
virtual ~cellSizeAndAlignmentControls()
Destructor.
A templated 1D list of pointers to objects of type <T>, where the size of the array is known and used...
Definition: List.H:70
const conformationSurfaces & geometryToConformTo() const
Namespace for OpenFOAM.