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  //- Default construct
70  method();
71 
72 
73 public:
74 
75  //- Runtime type information
76  ClassNameNoDebug("method");
77 
78 
79  // Constructors
80 
81  //- Construct from dictionary
82  explicit 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(const dictionary& dict);
102 
103 
104  //- Destructor
105  virtual ~method() = default;
106 
107 
108  // Member Functions
109 
110  //- The included angle, if set
111  scalar includedAngle() const noexcept { return includedAngle_; }
112 
113  //- Use geometric test only
115 
116  //- Extracted features
118  (
119  const triSurface& surf
120  ) const = 0;
121 };
122 
123 
124 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
125 
126 } // End namespace surfaceFeaturesExtraction
127 } // End namespace Foam
128 
129 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
130 
131 #endif
132 
133 // ************************************************************************* //
Abstract base for run-time selectable surface feature extraction methods.
dictionary dict
scalar includedAngle() const noexcept
The included angle, if set.
A list of keyword definitions, which are a keyword followed by a number of values (eg...
Definition: dictionary.H:129
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
Switch geometricTestOnly() const noexcept
Use geometric test only.
virtual autoPtr< surfaceFeatures > features(const triSurface &surf) const =0
Extracted features.
virtual ~method()=default
Destructor.
ClassNameNoDebug("method")
Runtime type information.
const direction noexcept
Definition: Scalar.H:258
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:71
Namespace for OpenFOAM.