cellSizeAndAlignmentControls.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 | Copyright (C) 2012-2015 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 construct
73 
74  //- Disallow default bitwise assignment
75  void operator=(const cellSizeAndAlignmentControls&);
76 
77 
78 public:
79 
80  //- Runtime type information
81  ClassName("cellSizeAndAlignmentControls");
82 
83 
84  // Constructors
85 
86  //- Construct from dictionary
88  (
89  const Time& runTime,
90  const dictionary& shapeControlDict,
92  const scalar& defaultCellSize
93  );
94 
95 
96  //- Destructor
98 
99 
100  // Member Functions
101 
102  // Access
103 
105  controlFunctions() const
106  {
107  return controlFunctions_;
108  }
110  inline const conformationSurfaces& geometryToConformTo() const
111  {
112  return geometryToConformTo_;
113  }
114 
115 
116  // Query
117 
118  scalar cellSize(const point& pt) const;
119 
120  scalar cellSize(const point& pt, label& maxPriority) const;
121 };
122 
123 
124 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
125 
126 } // End namespace Foam
127 
128 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
129 
130 #endif
131 
132 // ************************************************************************* //
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:137
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.
scalar cellSize(const point &pt) const
A templated 1D list of pointers to objects of type <T>, where the size of the array is known and used...
Definition: List.H:62
const conformationSurfaces & geometryToConformTo() const
Namespace for OpenFOAM.