uniform.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::uniform
26 
27 Description
28 
29 SourceFiles
30  uniform.C
31 
32 \*---------------------------------------------------------------------------*/
33 
34 #ifndef uniform_H
35 #define uniform_H
36 
37 #include "cellSizeFunction.H"
38 
39 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
40 
41 namespace Foam
42 {
43 
44 /*---------------------------------------------------------------------------*\
45  Class uniform Declaration
46 \*---------------------------------------------------------------------------*/
47 
48 class uniform
49 :
50  public cellSizeFunction
51 {
52 
53 private:
54 
55  // Private Data
56 
57 
58 public:
59 
60  //- Runtime type information
61  TypeName("uniform");
62 
63  // Constructors
64 
65  //- Construct from components
66  uniform
67  (
68  const dictionary& initialPointsDict,
69  const searchableSurface& surface,
70  const scalar& defaultCellSize,
71  const labelList regionIndices
72  );
73 
74 
75  //- Destructor
76  virtual ~uniform()
77  {}
78 
79 
80  // Member Functions
81 
82  virtual bool sizeLocations
83  (
84  const pointIndexHit& hitPt,
85  const vector& n,
86  pointField& shapePts,
87  scalarField& shapeSizes
88  ) const;
89 
90  //- Modify scalar argument to the cell size specified by function.
91  // Return a boolean specifying if the function was used, i.e. false if
92  // the point was not in range of the surface for a spatially varying
93  // size.
94  virtual bool cellSize
95  (
96  const point& pt,
97  scalar& size
98  ) const;
99 
100  //- Adapt local cell size. Return true if anything changed.
101  virtual bool setCellSize
102  (
103  const pointField& pts
104  );
105 };
106 
107 
108 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
109 
110 } // End namespace Foam
111 
112 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
113 
114 #endif
115 
116 // ************************************************************************* //
virtual ~uniform()
Destructor.
Definition: uniform.H:75
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:156
Abstract base class for specifying target cell sizes.
virtual bool cellSize(const point &pt, scalar &size) const
Modify scalar argument to the cell size specified by function.
This class describes the interaction of (usually) a face and a point. It carries the info of a succes...
Definition: PointIndexHit.H:53
Base class of (analytical or triangulated) surface. Encapsulates all the search routines. WIP.
virtual bool sizeLocations(const pointIndexHit &hitPt, const vector &n, pointField &shapePts, scalarField &shapeSizes) const
TypeName("uniform")
Runtime type information.
uniform(const dictionary &initialPointsDict, const searchableSurface &surface, const scalar &defaultCellSize, const labelList regionIndices)
Construct from components.
virtual bool setCellSize(const pointField &pts)
Adapt local cell size. Return true if anything changed.
label n
Namespace for OpenFOAM.