1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright (C) 1991-2008 OpenCFD Ltd.
7 -------------------------------------------------------------------------------
9 This file is part of OpenFOAM.
11 OpenFOAM is free software; you can redistribute it and/or modify it
12 under the terms of the GNU General Public License as published by the
13 Free Software Foundation; either version 2 of the License, or (at your
14 option) any later version.
16 OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
17 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21 You should have received a copy of the GNU General Public License
22 along with OpenFOAM; if not, write to the Free Software Foundation,
23 Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
29 Class containing data for point addition.
31 \*---------------------------------------------------------------------------*/
33 #ifndef polyAddPoint_H
34 #define polyAddPoint_H
38 #include "topoAction.H"
40 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
45 /*---------------------------------------------------------------------------*\
46 Class polyAddPoint Declaration
47 \*---------------------------------------------------------------------------*/
64 //- Does the point support a cell
70 // Static data members
72 //- Runtime type information
78 //- Construct null. Used only for list construction
87 //- Construct from components
91 const label masterPointID,
97 masterPointID_(masterPointID),
101 if (zoneID_ < 0 && !inCell)
108 " const label masterPointID,\n"
109 " const label zoneID,\n"
110 " const bool inCell\n"
112 ) << "Point is not in a cell and not in a zone. "
113 << "This is not allowed.\n"
115 << " master: " << masterPointID_
116 << " zone: " << zoneID_
117 << abort(FatalError);
122 //- Construct and return a clone
123 virtual autoPtr<topoAction> clone() const
125 return autoPtr<topoAction>(new polyAddPoint(*this));
129 // Default Destructor
135 const point& newPoint() const
140 //- Master point label
141 label masterPointID() const
143 return masterPointID_;
146 //- Is the point appended with no master
147 bool appended() const
149 return masterPointID_ < 0;
152 //- Does the point belong to a zone?
153 bool isInZone() const
164 //- Does the point support a cell
172 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
174 } // End namespace Foam
176 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
180 // ************************************************************************* //