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
00034
00035
00036
00037
00038
00039
00040
00041 #ifndef pointZone_H
00042 #define pointZone_H
00043
00044 #include "labelList.H"
00045 #include "typeInfo.H"
00046 #include "dictionary.H"
00047 #include "pointZoneMeshFwd.H"
00048 #include "Map.H"
00049 #include "pointField.H"
00050
00051
00052
00053 namespace Foam
00054 {
00055
00056
00057
00058 class pointZone;
00059 Ostream& operator<<(Ostream&, const pointZone&);
00060
00061
00062
00063
00064
00065
00066 class pointZone
00067 :
00068 public labelList
00069 {
00070
00071
00072
00073 word name_;
00074
00075
00076 label index_;
00077
00078
00079 const pointZoneMesh& zoneMesh_;
00080
00081
00082
00083
00084
00085 mutable Map<label>* pointLookupMapPtr_;
00086
00087
00088
00089
00090
00091 pointZone(const pointZone&);
00092
00093
00094 const Map<label>& pointLookupMap() const;
00095
00096
00097 void calcPointLookupMap() const;
00098
00099
00100 public:
00101
00102
00103 TypeName("pointZone");
00104
00105
00106
00107
00108 declareRunTimeSelectionTable
00109 (
00110 autoPtr,
00111 pointZone,
00112 dictionary,
00113 (
00114 const word& name,
00115 const dictionary& dict,
00116 const label index,
00117 const pointZoneMesh& zm
00118 ),
00119 (name, dict, index, zm)
00120 );
00121
00122
00123
00124
00125
00126 pointZone
00127 (
00128 const word& name,
00129 const labelList& addr,
00130 const label index,
00131 const pointZoneMesh& zm
00132 );
00133
00134
00135 pointZone
00136 (
00137 const word& name,
00138 const dictionary& dict,
00139 const label index,
00140 const pointZoneMesh& zm
00141 );
00142
00143
00144
00145 pointZone
00146 (
00147 const pointZone& pz,
00148 const labelList& addr,
00149 const label index,
00150 const pointZoneMesh& zm
00151 );
00152
00153
00154 virtual autoPtr<pointZone> clone(const pointZoneMesh& zm) const
00155 {
00156 return autoPtr<pointZone>
00157 (
00158 new pointZone(*this, *this, index(), zm)
00159 );
00160 }
00161
00162
00163
00164 virtual autoPtr<pointZone> clone
00165 (
00166 const pointZoneMesh& zm,
00167 const label index,
00168 const labelList& addr
00169 ) const
00170 {
00171 return autoPtr<pointZone>
00172 (
00173 new pointZone(*this, addr, index, zm)
00174 );
00175 }
00176
00177
00178
00179
00180
00181
00182 static autoPtr<pointZone> New
00183 (
00184 const word& name,
00185 const dictionary& dict,
00186 const label index,
00187 const pointZoneMesh&
00188 );
00189
00190
00191
00192
00193 virtual ~pointZone();
00194
00195
00196
00197
00198
00199 const word& name() const
00200 {
00201 return name_;
00202 }
00203
00204
00205
00206
00207
00208 label whichPoint(const label globalPointID) const;
00209
00210
00211 label index() const
00212 {
00213 return index_;
00214 }
00215
00216
00217 const pointZoneMesh& zoneMesh() const;
00218
00219
00220 void clearAddressing();
00221
00222
00223 virtual void movePoints(const pointField&)
00224 {}
00225
00226
00227 virtual void write(Ostream&) const;
00228
00229
00230 virtual void writeDict(Ostream&) const;
00231
00232
00233
00234
00235
00236 void operator=(const pointZone&);
00237
00238
00239 void operator=(const labelList&);
00240
00241
00242
00243
00244 friend Ostream& operator<<(Ostream&, const pointZone&);
00245 };
00246
00247
00248
00249
00250 }
00251
00252
00253
00254 #endif
00255
00256