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-------------------------------------------------------------------------------
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
26Namespace
27 Foam::surfaceFeaturesExtraction
28
29Description
30 Namespace for run-time selectable surface feature extraction methods.
31
32Class
33 Foam::surfaceFeaturesExtraction::method
34
35Description
36 Abstract base for run-time selectable surface feature extraction methods.
37
38SourceFiles
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"
50
51// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
52
53namespace Foam
54{
55namespace surfaceFeaturesExtraction
56{
57
58/*---------------------------------------------------------------------------*\
59 Class surfaceFeaturesExtraction::method Declaration
60\*---------------------------------------------------------------------------*/
62class method
63{
64protected:
68
69 //- Construct null
70 method();
71
72
73public:
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,
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 {
122 return geometricTestOnly_;
123 }
124
125 //- Extracted features
127 (
128 const triSurface& surf
129 ) const = 0;
130
131};
132
133
134// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
135
136} // End namespace surfaceFeaturesExtraction
137} // End namespace Foam
138
139// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
140
141#endif
142
143// ************************************************************************* //
A simple wrapper around bool so that it can be read as a word: true/false, on/off,...
Definition: Switch.H:78
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition: autoPtr.H:66
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:126
Abstract base for run-time selectable surface feature extraction methods.
static autoPtr< method > New(const dictionary &dict)
Select constructed from dictionary.
ClassNameNoDebug("method")
Runtime type information.
scalar includedAngle() const
The included angle, if set.
declareRunTimeSelectionTable(autoPtr, method, dictionary,(const dictionary &dict),(dict))
method(const dictionary &dict)
Construct from dictionary.
Switch geometricTestOnly() const
Use geometric test only.
virtual autoPtr< surfaceFeatures > features(const triSurface &surf) const =0
Extracted features.
Triangulated surface description with patch information.
Definition: triSurface.H:79
#define ClassNameNoDebug(TypeNameString)
Add typeName information from argument TypeNameString to a class.
Definition: className.H:41
Namespace for OpenFOAM.
Macros to ease declaration of run-time selection tables.
#define declareRunTimeSelectionTable(ptrWrapper, baseType, argNames, argList, parList)
Declare a run-time selection (variables and adder classes)
dictionary dict