surfaceFeaturesExtraction.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) 2017 OpenCFD Ltd.
9 -------------------------------------------------------------------------------
10 License
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 
26 Namespace
27  Foam::surfaceFeaturesExtraction
28 
29 Description
30  Namespace for run-time selectable surface feature extraction methods.
31 
32 Class
33  Foam::surfaceFeaturesExtraction::method
34 
35 Description
36  Abstract base for run-time selectable surface feature extraction methods.
37 
38 SourceFiles
39  surfaceFeaturesExtraction.C
40 
41 \*---------------------------------------------------------------------------*/
42 
43 #ifndef surfaceFeaturesExtraction_method_H
44 #define surfaceFeaturesExtraction_method_H
45 
46 #include "surfaceFeatures.H"
47 #include "dictionary.H"
48 #include "Switch.H"
49 #include "runTimeSelectionTables.H"
50 
51 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
52 
53 namespace Foam
54 {
55 namespace surfaceFeaturesExtraction
56 {
57 
58 /*---------------------------------------------------------------------------*\
59  Class surfaceFeaturesExtraction::method Declaration
60 \*---------------------------------------------------------------------------*/
61 
62 class method
63 {
64 protected:
65 
66  scalar includedAngle_;
68 
69  //- Construct null
70  method();
71 
72 
73 public:
74 
75  //- Runtime type information
76  ClassNameNoDebug("method");
77 
78 
79  // Constructors
80 
81  //- Construct from dictionary
82  method(const dictionary& dict);
83 
84 
85  // Declare run-time constructor selection table
87  (
88  autoPtr,
89  method,
90  dictionary,
91  (
92  const dictionary& dict
93  ),
94  (dict)
95  );
96 
97 
98  // Selectors
99 
100  //- Select constructed from dictionary
101  static autoPtr<method> New
102  (
103  const dictionary& dict
104  );
105 
106 
107  //- Destructor
108  virtual ~method();
109 
110 
111  // Member Functions
112 
113  //- The included angle, if set
114  inline scalar includedAngle() const
115  {
116  return includedAngle_;
117  }
118 
119  //- Use geometric test only
120  inline Switch geometricTestOnly() const
121  {
123  }
124 
125  //- Extracted features
127  (
128  const triSurface& surf
129  ) const = 0;
131 };
132 
133 
134 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
135 
136 } // End namespace surfaceFeaturesExtraction
137 } // End namespace Foam
138 
139 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
140 
141 #endif
142 
143 // ************************************************************************* //
Abstract base for run-time selectable surface feature extraction methods.
dictionary dict
A list of keyword definitions, which are a keyword followed by a number of values (eg...
Definition: dictionary.H:120
A simple wrapper around bool so that it can be read as a word: true/false, on/off, yes/no, any/none. Also accepts 0/1 as a string and shortcuts t/f, y/n.
Definition: Switch.H:77
virtual autoPtr< surfaceFeatures > features(const triSurface &surf) const =0
Extracted features.
scalar includedAngle() const
The included angle, if set.
Switch geometricTestOnly() const
Use geometric test only.
ClassNameNoDebug("method")
Runtime type information.
static autoPtr< method > New(const dictionary &dict)
Select constructed from dictionary.
declareRunTimeSelectionTable(autoPtr, method, dictionary,(const dictionary &dict),(dict))
Pointer management similar to std::unique_ptr, with some additional methods and type checking...
Definition: HashPtrTable.H:48
Macros to ease declaration of run-time selection tables.
Triangulated surface description with patch information.
Definition: triSurface.H:72
Namespace for OpenFOAM.