polyRemovePoint.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) 2011 OpenFOAM Foundation
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::polyRemovePoint
28 
29 Description
30  Class containing data for point removal.
31 
32 \*---------------------------------------------------------------------------*/
33 
34 #ifndef polyRemovePoint_H
35 #define polyRemovePoint_H
36 
37 #include "label.H"
38 #include "topoAction.H"
39 
40 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
41 
42 namespace Foam
43 {
44 
45 /*---------------------------------------------------------------------------*\
46  Class polyRemovePoint Declaration
47 \*---------------------------------------------------------------------------*/
48 
49 class polyRemovePoint
50 :
51  public topoAction
52 {
53  // Private data
54 
55  //- Point ID
56  label pointID_;
57 
58  //- Merge point ID or -1
59  label mergePointID_;
60 
61 
62 public:
63 
64  // Static data members
65 
66  //- Runtime type information
67  TypeName("removePoint");
68 
69 
70  // Constructors
71 
72  //- Construct null. Used for constructing lists
74  :
75  pointID_(-1),
76  mergePointID_(-1)
77  {}
78 
79  //- Construct from components
80  polyRemovePoint(const label pointID, const label mergePointID = -1)
81  :
82  pointID_(pointID),
83  mergePointID_(mergePointID)
84  {}
85 
86  //- Construct and return a clone
87  virtual autoPtr<topoAction> clone() const
88  {
89  return autoPtr<topoAction>(new polyRemovePoint(*this));
90  }
91 
92 
93  // Default Destructor
94 
95 
96  // Member Functions
97 
98  //- Return point ID
99  label pointID() const
100  {
101  return pointID_;
102  }
103 
104  label mergePointID() const
105  {
106  return mergePointID_;
107  }
108 };
109 
110 
111 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
112 
113 } // End namespace Foam
114 
115 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
116 
117 #endif
118 
119 // ************************************************************************* //
Foam::polyRemovePoint::TypeName
TypeName("removePoint")
Runtime type information.
Foam::polyRemovePoint
Class containing data for point removal.
Definition: polyRemovePoint.H:48
Foam::polyRemovePoint::mergePointID
label mergePointID() const
Definition: polyRemovePoint.H:103
Foam::polyRemovePoint::polyRemovePoint
polyRemovePoint(const label pointID, const label mergePointID=-1)
Construct from components.
Definition: polyRemovePoint.H:79
topoAction.H
Foam::polyRemovePoint::clone
virtual autoPtr< topoAction > clone() const
Construct and return a clone.
Definition: polyRemovePoint.H:86
Foam::polyRemovePoint::polyRemovePoint
polyRemovePoint()
Construct null. Used for constructing lists.
Definition: polyRemovePoint.H:72
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::polyRemovePoint::pointID
label pointID() const
Return point ID.
Definition: polyRemovePoint.H:98
Foam::autoPtr
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition: HashPtrTable.H:53
label.H
Foam::topoAction
A virtual base class for topological actions.
Definition: topoAction.H:51