faceSelection.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-2016 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::faceSelection
28
29Description
30 Face selection method for createBaffles
31
32SourceFiles
33 faceSelection.C
34
35\*---------------------------------------------------------------------------*/
36
37#ifndef faceSelection_H
38#define faceSelection_H
39
40#include "dictionary.H"
41#include "typeInfo.H"
43#include "autoPtr.H"
44#include "boolList.H"
45#include "labelList.H"
46
47// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
48
49namespace Foam
50{
51
52// Forward declaration of classes
53class fvMesh;
54
55/*---------------------------------------------------------------------------*\
56 Class faceSelection Declaration
57\*---------------------------------------------------------------------------*/
59class faceSelection
60{
61protected:
62
63 // Protected data
64
65 //- Name
66 const word name_;
67
68 //- Reference to mesh
69 const fvMesh& mesh_;
70
71 //- Input dictionary
72 const dictionary dict_;
73
74 //- Switch direction?
75 const bool flip_;
76
77public:
78
79 //- Runtime type information
80 TypeName("faceSelection");
81
82
83 // Declare run-time constructor selection table
86 (
87 autoPtr,
90 (
91 const word& name,
92 const fvMesh& mesh,
93 const dictionary& dict
94 ),
95 (name, mesh, dict)
96 );
97
98
99 // Constructors
100
101 //- Construct from dictionary
103 (
104 const word& name,
105 const fvMesh& mesh,
106 const dictionary& dict
107 );
108
109 //- Clone
111 {
113 return nullptr;
114 }
115
116
117 // Selectors
118
119 //- Return a reference to the selected faceSelection
121 (
122 const word& name,
123 const fvMesh& mesh,
124 const dictionary& dict
125 );
126
127
128 //- Destructor
129 virtual ~faceSelection();
130
131
132 // Member Functions
134 const word& name() const
135 {
136 return name_;
137 }
139 const dictionary& dict() const
140 {
141 return dict_;
142 }
144 virtual void select(const label, labelList&, boolList&) const = 0;
145
146};
147
148
149// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
150
151} // End namespace Foam
152
153// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
154
155#endif
156
157// ************************************************************************* //
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
Face selection method for createBaffles.
Definition: faceSelection.H:59
const bool flip_
Switch direction?
Definition: faceSelection.H:74
faceSelection(const word &name, const fvMesh &mesh, const dictionary &dict)
Construct from dictionary.
const fvMesh & mesh_
Reference to mesh.
Definition: faceSelection.H:68
declareRunTimeSelectionTable(autoPtr, faceSelection, dictionary,(const word &name, const fvMesh &mesh, const dictionary &dict),(name, mesh, dict))
const word & name() const
virtual ~faceSelection()
Destructor.
autoPtr< faceSelection > clone() const
Clone.
const dictionary dict_
Input dictionary.
Definition: faceSelection.H:71
TypeName("faceSelection")
Runtime type information.
static autoPtr< faceSelection > New(const word &name, const fvMesh &mesh, const dictionary &dict)
Return a reference to the selected faceSelection.
const dictionary & dict() const
virtual void select(const label, labelList &, boolList &) const =0
const word name_
Name.
Definition: faceSelection.H:65
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:91
A class for handling words, derived from Foam::string.
Definition: word.H:68
dynamicFvMesh & mesh
#define NotImplemented
Issue a FatalErrorIn for a function not currently implemented.
Definition: error.H:517
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)
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition: typeInfo.H:73