00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033 #ifndef polyAddCell_H
00034 #define polyAddCell_H
00035
00036 #include "label.H"
00037 #include "topoAction.H"
00038
00039
00040
00041 namespace Foam
00042 {
00043
00044
00045
00046
00047
00048 class polyAddCell
00049 :
00050 public topoAction
00051 {
00052
00053
00054
00055 label masterPointID_;
00056
00057
00058 label masterEdgeID_;
00059
00060
00061 label masterFaceID_;
00062
00063
00064 label masterCellID_;
00065
00066
00067 label zoneID_;
00068
00069
00070 public:
00071
00072
00073
00074
00075 TypeName("addCell");
00076
00077
00078
00079
00080
00081 polyAddCell()
00082 :
00083 masterPointID_(-1),
00084 masterEdgeID_(-1),
00085 masterFaceID_(-1),
00086 masterCellID_(-1),
00087 zoneID_(-1)
00088 {}
00089
00090
00091 polyAddCell
00092 (
00093 const label masterPointID,
00094 const label masterEdgeID,
00095 const label masterFaceID,
00096 const label masterCellID,
00097 const label zoneID
00098 )
00099 :
00100 masterPointID_(masterPointID),
00101 masterEdgeID_(masterEdgeID),
00102 masterFaceID_(masterFaceID),
00103 masterCellID_(masterCellID),
00104 zoneID_(zoneID)
00105 {}
00106
00107
00108 virtual autoPtr<topoAction> clone() const
00109 {
00110 return autoPtr<topoAction>(new polyAddCell(*this));
00111 }
00112
00113
00114
00115
00116
00117
00118
00119
00120 bool isPointMaster() const
00121 {
00122 return masterPointID_ >= 0;
00123 }
00124
00125
00126 bool isEdgeMaster() const
00127 {
00128 return masterEdgeID_ >= 0;
00129 }
00130
00131
00132 bool isFaceMaster() const
00133 {
00134 return masterFaceID_ >= 0;
00135 }
00136
00137
00138 bool isCellMaster() const
00139 {
00140 return masterCellID_ >= 0;
00141 }
00142
00143
00144 bool appended() const
00145 {
00146 return
00147 !isPointMaster() && !isEdgeMaster()
00148 && !isFaceMaster() && !isCellMaster();
00149 }
00150
00151
00152 label masterPointID() const
00153 {
00154 return masterPointID_;
00155 }
00156
00157
00158 label masterEdgeID() const
00159 {
00160 return masterEdgeID_;
00161 }
00162
00163
00164 label masterFaceID() const
00165 {
00166 return masterFaceID_;
00167 }
00168
00169
00170 label masterCellID() const
00171 {
00172 return masterCellID_;
00173 }
00174
00175
00176 bool isInZone() const
00177 {
00178 return zoneID_ >= 0;
00179 }
00180
00181
00182 label zoneID() const
00183 {
00184 return zoneID_;
00185 }
00186
00187 };
00188
00189
00190
00191
00192 }
00193
00194
00195
00196 #endif
00197
00198