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