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