topoSetPointSource.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::topoSetPointSource
28 
29 Description
30  The \c topoSetPointSource is a intermediate class
31  for handling \c topoSet sources for selecting points.
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  topoSetPointSource.C
38 
39 \*---------------------------------------------------------------------------*/
40 
41 #ifndef topoSetPointSource_H
42 #define topoSetPointSource_H
43 
44 #include "topoSetSource.H"
45 
46 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
47 
48 namespace Foam
49 {
50 
51 /*---------------------------------------------------------------------------*\
52  Class topoSetPointSource 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 topoSetPointSource(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 ~topoSetPointSource() = default;
128 
129 
130  // Member Functions
131 
132  //- The source category is a pointSet
133  virtual topoSetSource::sourceType setType() const
134  {
135  return POINTSET_SOURCE;
136  }
137 };
138 
139 
140 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
141 
142 } // End namespace Foam
143 
144 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
145 
146 #endif
147 
148 // ************************************************************************* //
Foam::topoSetPointSource::declareRunTimeSelectionTable
declareRunTimeSelectionTable(autoPtr, topoSetPointSource, word,(const polyMesh &mesh, const dictionary &dict),(mesh, dict))
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::topoSetPointSource::clone
autoPtr< topoSetPointSource > clone() const
Clone (disallowed)
Definition: topoSetPointSource.H:99
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::topoSetPointSource::topoSetPointSource
topoSetPointSource(const polyMesh &mesh)
Construct from mesh.
Definition: topoSetPointSource.C:42
Foam::topoSetSource::POINTSET_SOURCE
Points as set.
Definition: topoSetSource.H:84
Foam::topoSetPointSource
The topoSetPointSource is a intermediate class for handling topoSet sources for selecting points.
Definition: topoSetPointSource.H:54
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::topoSetPointSource::~topoSetPointSource
virtual ~topoSetPointSource()=default
Destructor.
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::topoSetSource
Base class of a source for a topoSet.
Definition: topoSetSource.H:67
Foam::topoSetPointSource::setType
virtual topoSetSource::sourceType setType() const
The source category is a pointSet.
Definition: topoSetPointSource.H:132
Foam::autoPtr
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition: HashPtrTable.H:53
Foam::topoSetPointSource::New
static autoPtr< topoSetPointSource > New(const word &sourceType, const polyMesh &mesh, const dictionary &dict)
Return a reference to the selected source type.
Definition: topoSetPointSource.C:62
topoSetSource.H
Foam::topoSetSource::mesh
const polyMesh & mesh() const noexcept
Reference to the mesh.
Definition: topoSetSource.H:342