topoSetFaceSource.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) 2018-2021 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 Class
27  Foam::topoSetFaceSource
28 
29 Description
30  The \c topoSetFaceSource is a intermediate class
31  for handling \c topoSet sources for selecting faces.
32 
33  The class is not an executable \c topoSet itself,
34  yet a provider for common entries to its derived \c topoSet.
35 
36 SourceFiles
37  topoSetFaceSource.C
38 
39 \*---------------------------------------------------------------------------*/
40 
41 #ifndef topoSetFaceSource_H
42 #define topoSetFaceSource_H
43 
44 #include "topoSetSource.H"
45 
46 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
47 
48 namespace Foam
49 {
50 
51 /*---------------------------------------------------------------------------*\
52  Class topoSetFaceSource Declaration
53 \*---------------------------------------------------------------------------*/
54 
56 :
57  public topoSetSource
58 {
59 public:
60 
61  // Declare run-time constructor selection table
62 
63  // For the dictionary constructor
65  (
66  autoPtr,
68  word,
69  (
70  const polyMesh& mesh,
71  const dictionary& dict
72  ),
73  (mesh, dict)
74  );
75 
76  // For the Istream constructor
78  (
79  autoPtr,
81  istream,
82  (
83  const polyMesh& mesh,
84  Istream& is
85  ),
86  (mesh, is)
87  );
88 
89 
90  // Constructors
91 
92  //- Construct from mesh
93  explicit topoSetFaceSource(const polyMesh& mesh);
94 
95  //- Construct from mesh, use "verbose" entry if present
97 
98 
99  //- Clone (disallowed)
101  {
103  return nullptr;
104  }
105 
106 
107  // Selectors
108 
109  //- Return a reference to the selected source type
111  (
112  const word& sourceType,
113  const polyMesh& mesh,
114  const dictionary& dict
115  );
116 
117  //- Return a reference to the selected source type
119  (
120  const word& sourceType,
121  const polyMesh& mesh,
122  Istream& is
123  );
124 
125 
126  //- Destructor
127  virtual ~topoSetFaceSource() = default;
128 
129 
130  // Member Functions
131 
132  //- The source category is a faceSet
133  virtual topoSetSource::sourceType setType() const
134  {
135  return FACESET_SOURCE;
136  }
137 };
138 
139 
140 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
141 
142 } // End namespace Foam
143 
144 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
145 
146 #endif
147 
148 // ************************************************************************* //
autoPtr< topoSetFaceSource > clone() const
Clone (disallowed)
dictionary dict
A list of keyword definitions, which are a keyword followed by a number of values (eg...
Definition: dictionary.H:129
declareRunTimeSelectionTable(autoPtr, topoSetFaceSource, word,(const polyMesh &mesh, const dictionary &dict),(mesh, dict))
An Istream is an abstract base class for all input systems (streams, files, token lists etc)...
Definition: Istream.H:57
static autoPtr< topoSetFaceSource > New(const word &sourceType, const polyMesh &mesh, const dictionary &dict)
Return a reference to the selected source type.
Base class of a source for a topoSet.
Definition: topoSetSource.H:63
A class for handling words, derived from Foam::string.
Definition: word.H:63
The topoSetFaceSource is a intermediate class for handling topoSet sources for selecting faces...
const polyMesh & mesh() const noexcept
Reference to the mesh.
virtual topoSetSource::sourceType setType() const
The source category is a faceSet.
sourceType
Enumeration defining the types of sources.
Definition: topoSetSource.H:72
topoSetFaceSource(const polyMesh &mesh)
Construct from mesh.
virtual ~topoSetFaceSource()=default
Destructor.
Pointer management similar to std::unique_ptr, with some additional methods and type checking...
Definition: HashPtrTable.H:48
Mesh consisting of general polyhedral cells.
Definition: polyMesh.H:74
#define NotImplemented
Issue a FatalErrorIn for a function not currently implemented.
Definition: error.H:686
Namespace for OpenFOAM.