searchableSurfaceControl.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::searchableSurfaceControl
26 
27 Description
28 
29 SourceFiles
30  searchableSurfaceControl.C
31 
32 \*---------------------------------------------------------------------------*/
33 
34 #ifndef searchableSurfaceControl_H
35 #define searchableSurfaceControl_H
36 
37 #include "cellSizeFunction.H"
38 #include "triad.H"
39 
40 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
41 
42 namespace Foam
43 {
44 
45 
46 /*---------------------------------------------------------------------------*\
47  Class surfaceControl Declaration
48 \*---------------------------------------------------------------------------*/
49 
51 :
53 {
54  // Private data
55 
56  //- Name of the surface
57  const word surfaceName_;
58 
59  //- Reference to the searchableSurface object holding the geometry data
60  const searchableSurface& searchableSurface_;
61 
62  const conformationSurfaces& geometryToConformTo_;
63 
64  PtrList<cellSizeFunction> cellSizeFunctions_;
65 
66  labelList regionToCellSizeFunctions_;
67 
68  label maxPriority_;
69 
70 
71 // const conformationSurfaces& geometryToConformTo_;
72 //
73 // //- Indices of surfaces in allGeometry that are to be conformed to
74 // labelList surfaces_;
75 //
76 // //- A list of all of the cellSizeFunction objects
77 // PtrList<cellSizeFunction> cellSizeFunctions_;
78 //
79 // autoPtr<triangulatedMesh> triangulatedMesh_;
80 //
81 //
82 // // Private Member Functions
83 //
84 // //-
85 // tensor requiredAlignment
86 // (
87 // const point& pt,
88 // const vectorField& ptNormals
89 // ) const;
90 
91  //- Disallow default bitwise copy construct
93 
94  //- Disallow default bitwise assignment
95  void operator=(const searchableSurfaceControl&);
96 
97 
98 public:
99 
100  //- Runtime type information
101  TypeName("searchableSurfaceControl");
102 
103 
104  // Constructors
105 
106  //- Construct from dictionary and references to conformalVoronoiMesh and
107  // searchableSurfaces
109  (
110  const Time& runTime,
111  const word& name,
112  const dictionary& controlFunctionDict,
113  const conformationSurfaces& geometryToConformTo,
114  const scalar& defaultCellSize
115  );
116 
117  //- Destructor
119 
120 
121  // Member Functions
122 
123  // Access
124 
125 // //- Return reference to the searchableSurfaces object containing
126 // // all of the geometry
127 // inline const searchableSurfaces& geometry() const;
128 //
129 // //- Return the surface indices
130 // inline const labelList& surfaces() const;
131 //
132 //
133 // // Query
134 //
135 // //- Return the cell size at the given location
136 // virtual scalar cellSize(const point& pt) const;
137 //
138 // //- Return the cell alignment at the given location
139 // virtual tensor cellAlignment(const point& pt) const;
140 //
141 // virtual void cellSizeAndAlignment
142 // (
143 // const point& pt,
144 // scalar& size,
145 // tensor& alignment
146 // ) const;
147 
148  virtual void cellSizeFunctionVertices
149  (
151  DynamicList<scalar>& sizes
152  ) const;
153 
154  virtual void initialVertices
155  (
156  pointField& pts,
157  scalarField& sizes,
158  triadField& alignments
159  ) const;
162  {
163  return cellSizeFunctions_;
164  }
166  virtual label maxPriority() const
167  {
168  return maxPriority_;
169  }
170 
171  bool cellSize
172  (
173  const Foam::point& pt,
174  scalar& cellSize,
175  label& priority
176  ) const;
177 
178  // Edit
179 
180 };
181 
182 
183 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
184 
185 } // End namespace Foam
186 
187 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
188 
189 #endif
190 
191 // ************************************************************************* //
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
bool cellSize(const Foam::point &pt, scalar &cellSize, label &priority) const
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:137
Base class of (analytical or triangulated) surface. Encapsulates all the search routines. WIP.
TypeName("searchableSurfaceControl")
Runtime type information.
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
Definition: Time.H:68
virtual void cellSizeFunctionVertices(DynamicList< Foam::point > &pts, DynamicList< scalar > &sizes) const
A 1D vector of objects of type <T> that resizes itself as necessary to accept the new objects...
Definition: DynamicList.H:56
A class for handling words, derived from string.
Definition: word.H:59
virtual void initialVertices(pointField &pts, scalarField &sizes, triadField &alignments) const
const PtrList< cellSizeFunction > & sizeFunctions() 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:63
~searchableSurfaceControl()
Destructor.
Namespace for OpenFOAM.