Loading...
Searching...
No Matches
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 | www.openfoam.com
6 \\/ M anipulation |
7-------------------------------------------------------------------------------
8 Copyright (C) 2012-2015 OpenFOAM Foundation
9-------------------------------------------------------------------------------
10License
11 This file is part of OpenFOAM.
12
13 OpenFOAM is free software: you can redistribute it and/or modify it
14 under the terms of the GNU General Public License as published by
15 the Free Software Foundation, either version 3 of the License, or
16 (at your option) any later version.
17
18 OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
19 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
20 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21 for more details.
22
23 You should have received a copy of the GNU General Public License
24 along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
25
26Class
27 Foam::searchableSurfaceControl
28
29Description
30
31SourceFiles
32 searchableSurfaceControl.C
33
34\*---------------------------------------------------------------------------*/
35
36#ifndef searchableSurfaceControl_H
37#define searchableSurfaceControl_H
38
39#include "cellSizeFunction.H"
40#include "triad.H"
41
42// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
43
44namespace Foam
45{
46
48/*---------------------------------------------------------------------------*\
49 Class surfaceControl Declaration
50\*---------------------------------------------------------------------------*/
51
52class searchableSurfaceControl
53:
54 public cellSizeAndAlignmentControl
55{
56 // Private data
57
58 //- Name of the surface
59 const word surfaceName_;
60
61 //- Reference to the searchableSurface object holding the geometry data
62 const searchableSurface& searchableSurface_;
63
64 const conformationSurfaces& geometryToConformTo_;
65
66 PtrList<cellSizeFunction> cellSizeFunctions_;
67
68 labelList regionToCellSizeFunctions_;
69
70 label maxPriority_;
71
72
73// const conformationSurfaces& geometryToConformTo_;
74//
75// //- Indices of surfaces in allGeometry that are to be conformed to
76// labelList surfaces_;
77//
78// //- A list of all of the cellSizeFunction objects
79// PtrList<cellSizeFunction> cellSizeFunctions_;
80//
81// autoPtr<triangulatedMesh> triangulatedMesh_;
82//
83//
84// // Private Member Functions
85//
86// //-
87// tensor requiredAlignment
88// (
89// const point& pt,
90// const vectorField& ptNormals
91// ) const;
92
93 //- No copy construct
94 searchableSurfaceControl(const searchableSurfaceControl&) = delete;
95
96 //- No copy assignment
97 void operator=(const searchableSurfaceControl&) = delete;
98
99
100public:
101
102 //- Runtime type information
103 TypeName("searchableSurfaceControl");
104
105
106 // Constructors
107
108 //- Construct from dictionary and references to conformalVoronoiMesh and
109 // searchableSurfaces
110 searchableSurfaceControl
111 (
112 const Time& runTime,
113 const word& name,
114 const dictionary& controlFunctionDict,
115 const conformationSurfaces& geometryToConformTo,
116 const scalar& defaultCellSize
117 );
119 //- Destructor
121
122
123 // Member Functions
124
125 // Access
126
127// //- Return reference to the searchableSurfaces object containing
128// // all of the geometry
129// inline const searchableSurfaces& geometry() const;
131// //- Return the surface indices
132// inline const labelList& surfaces() const;
133//
134//
135// // Query
136//
137// //- Return the cell size at the given location
138// virtual scalar cellSize(const point& pt) const;
139//
140// //- Return the cell alignment at the given location
141// virtual tensor cellAlignment(const point& pt) const;
142//
143// virtual void cellSizeAndAlignment
144// (
145// const point& pt,
146// scalar& size,
147// tensor& alignment
148// ) const;
149
150 virtual void cellSizeFunctionVertices
151 (
154 ) const;
155
156 virtual void initialVertices
157 (
159 scalarField& sizes,
160 triadField& alignments
161 ) const;
162
164 {
165 return cellSizeFunctions_;
167
168 virtual label maxPriority() const
169 {
170 return maxPriority_;
171 }
172
174 (
175 const Foam::point& pt,
176 scalar& cellSize,
177 label& priority
178 ) const;
179
180 // Edit
181
182};
184
185// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
186
187} // End namespace Foam
188
189// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
190
191#endif
192
193// ************************************************************************* //
A 1D vector of objects of type <T> that resizes itself as necessary to accept the new objects.
Definition DynamicList.H:68
A list of pointers to objects of type <T>, with allocation/deallocation management of the pointers....
Definition PtrList.H:67
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
Definition Time.H:75
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition dictionary.H:133
TypeName("searchableSurfaceControl")
Runtime type information.
virtual void cellSizeFunctionVertices(DynamicList< Foam::point > &pts, DynamicList< scalar > &sizes) const
~searchableSurfaceControl()
Destructor.
bool cellSize(const Foam::point &pt, scalar &cellSize, label &priority) const
searchableSurfaceControl(const Time &runTime, const word &name, const dictionary &controlFunctionDict, const conformationSurfaces &geometryToConformTo, const scalar &defaultCellSize)
Construct from dictionary and references to conformalVoronoiMesh and.
const PtrList< cellSizeFunction > & sizeFunctions() const
virtual void initialVertices(pointField &pts, scalarField &sizes, triadField &alignments) const
Base class of (analytical or triangulated) surface. Encapsulates all the search routines....
A class for handling words, derived from Foam::string.
Definition word.H:66
engineTime & runTime
Namespace for OpenFOAM.
List< label > labelList
A List of labels.
Definition List.H:62
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
vector point
Point is a vector.
Definition point.H:37
Field< triad > triadField
Specialisation of Field<T> for triad.
vectorField pointField
pointField is a vectorField.
const pointField & pts
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition typeInfo.H:68