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-2019 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  Base class of a topoSet source for selecting points.
31 
32 SourceFiles
33  topoSetPointSource.C
34 
35 \*---------------------------------------------------------------------------*/
36 
37 #ifndef topoSetPointSource_H
38 #define topoSetPointSource_H
39 
40 #include "topoSetSource.H"
41 
42 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
43 
44 namespace Foam
45 {
46 
47 /*---------------------------------------------------------------------------*\
48  Class topoSetPointSource Declaration
49 \*---------------------------------------------------------------------------*/
50 
52 :
53  public topoSetSource
54 {
55 public:
56 
57  //- Runtime type information
58  TypeName("topoSetPointSource");
59 
60  // Declare run-time constructor selection table
61 
62  // For the dictionary constructor
64  (
65  autoPtr,
67  word,
68  (
69  const polyMesh& mesh,
70  const dictionary& dict
71  ),
72  (mesh, dict)
73  );
74 
75  // For the Istream constructor
77  (
78  autoPtr,
80  istream,
81  (
82  const polyMesh& mesh,
83  Istream& is
84  ),
85  (mesh, is)
86  );
87 
88 
89  // Constructors
90 
91  //- Construct from components
92  explicit topoSetPointSource(const polyMesh& mesh);
93 
94  //- Clone (disallowed)
96  {
98  return nullptr;
99  }
100 
101 
102  // Selectors
103 
104  //- Return a reference to the selected source type
106  (
107  const word& sourceType,
108  const polyMesh& mesh,
109  const dictionary& dict
110  );
111 
112  //- Return a reference to the selected source type
114  (
115  const word& sourceType,
116  const polyMesh& mesh,
117  Istream& is
118  );
119 
120 
121  //- Destructor
122  virtual ~topoSetPointSource() = default;
123 
124 
125  // Member Functions
126 
127  //- The source category is a pointSet
128  virtual topoSetSource::sourceType setType() const
129  {
130  return POINTSET_SOURCE;
131  }
132 };
133 
134 
135 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
136 
137 } // End namespace Foam
138 
139 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
140 
141 #endif
142 
143 // ************************************************************************* //
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:73
Foam::word
A class for handling words, derived from Foam::string.
Definition: word.H:62
Foam::topoSetPointSource::clone
autoPtr< topoSetPointSource > clone() const
Clone (disallowed)
Definition: topoSetPointSource.H:94
Foam::topoSetSource::mesh
const polyMesh & mesh() const
Reference to the mesh.
Definition: topoSetSource.H:333
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:419
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 components.
Definition: topoSetPointSource.C:43
Foam::topoSetSource::POINTSET_SOURCE
Points as set.
Definition: topoSetSource.H:84
Foam::topoSetPointSource
Base class of a topoSet source for selecting points.
Definition: topoSetPointSource.H:50
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:121
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:66
Foam::topoSetPointSource::TypeName
TypeName("topoSetPointSource")
Runtime type information.
Foam::topoSetPointSource::setType
virtual topoSetSource::sourceType setType() const
The source category is a pointSet.
Definition: topoSetPointSource.H:127
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:52
topoSetSource.H