searchableSurfaceControl.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-2019 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 public:
72 
73  //- Runtime type information
74  TypeName("searchableSurfaceControl");
75 
76 
77  // Constructors
78 
79  //- Construct from dictionary and references to conformalVoronoiMesh and
80  // searchableSurfaces
82  (
83  const Time& runTime,
84  const word& name,
85  const dictionary& controlFunctionDict,
86  const conformationSurfaces& geometryToConformTo,
87  const scalar& defaultCellSize
88  );
89 
90  //- Disallow default bitwise copy construction
92 
93 
94  //- Destructor
96 
97 
98  // Member Functions
99 
100  virtual void cellSizeFunctionVertices
101  (
103  DynamicList<scalar>& sizes
104  ) const;
105 
106  virtual void initialVertices
107  (
108  pointField& pts,
109  scalarField& sizes,
110  triadField& alignments
111  ) const;
114  {
115  return cellSizeFunctions_;
116  }
118  virtual label maxPriority() const
119  {
120  return maxPriority_;
121  }
122 
123  bool cellSize
124  (
125  const Foam::point& pt,
126  scalar& cellSize,
127  label& priority
128  ) const;
129 
130 
131  // Member Operators
132 
133  //- Disallow default bitwise assignment
134  void operator=(const searchableSurfaceControl&) = delete;
135 };
136 
137 
138 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
139 
140 } // End namespace Foam
141 
142 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
143 
144 #endif
145 
146 // ************************************************************************* //
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:158
void operator=(const searchableSurfaceControl &)=delete
Disallow default bitwise assignment.
engineTime & runTime
searchableSurfaceControl(const Time &runTime, const word &name, const dictionary &controlFunctionDict, const conformationSurfaces &geometryToConformTo, const scalar &defaultCellSize)
Construct from dictionary and references to conformalVoronoiMesh and.
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:70
~searchableSurfaceControl()
Destructor.
Namespace for OpenFOAM.