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