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
00042
00043 #ifndef processorPolyPatch_H
00044 #define processorPolyPatch_H
00045
00046 #include "coupledPolyPatch.H"
00047
00048
00049
00050 namespace Foam
00051 {
00052
00053
00054
00055
00056
00057 class processorPolyPatch
00058 :
00059 public coupledPolyPatch
00060 {
00061
00062
00063 int myProcNo_;
00064 int neighbProcNo_;
00065
00066
00067 vectorField neighbFaceCentres_;
00068
00069
00070 vectorField neighbFaceAreas_;
00071
00072
00073 vectorField neighbFaceCellCentres_;
00074
00075
00076
00077 mutable labelList* neighbPointsPtr_;
00078
00079
00080
00081 mutable labelList* neighbEdgesPtr_;
00082
00083
00084
00085
00086
00087
00088 static bool geometricMatch_;
00089
00090
00091
00092 static scalar matchTol_;
00093
00094
00095 protected:
00096
00097
00098
00099
00100 void initGeometry();
00101
00102
00103 void calcGeometry();
00104
00105
00106 void initMovePoints(const pointField&);
00107
00108
00109 void movePoints(const pointField&);
00110
00111
00112 virtual void initUpdateMesh();
00113
00114
00115 virtual void updateMesh();
00116
00117
00118 public:
00119
00120
00121 TypeName("processor");
00122
00123
00124
00125
00126
00127 processorPolyPatch
00128 (
00129 const word& name,
00130 const label size,
00131 const label start,
00132 const label index,
00133 const polyBoundaryMesh& bm,
00134 const int myProcNo,
00135 const int neighbProcNo
00136 );
00137
00138
00139 processorPolyPatch
00140 (
00141 Istream& is,
00142 const label index,
00143 const polyBoundaryMesh&
00144 );
00145
00146
00147 processorPolyPatch
00148 (
00149 const word& name,
00150 const dictionary& dict,
00151 const label index,
00152 const polyBoundaryMesh&
00153 );
00154
00155
00156 processorPolyPatch(const processorPolyPatch&, const polyBoundaryMesh&);
00157
00158
00159
00160 processorPolyPatch
00161 (
00162 const processorPolyPatch& pp,
00163 const polyBoundaryMesh& bm,
00164 const label index,
00165 const label newSize,
00166 const label newStart
00167 );
00168
00169
00170 virtual autoPtr<polyPatch> clone(const polyBoundaryMesh& bm) const
00171 {
00172 return autoPtr<polyPatch>(new processorPolyPatch(*this, bm));
00173 }
00174
00175
00176
00177 virtual autoPtr<polyPatch> clone
00178 (
00179 const polyBoundaryMesh& bm,
00180 const label index,
00181 const label newSize,
00182 const label newStart
00183 ) const
00184 {
00185 return autoPtr<polyPatch>
00186 (
00187 new processorPolyPatch
00188 (
00189 refCast<const processorPolyPatch>(*this),
00190 bm,
00191 index,
00192 newSize,
00193 newStart
00194 )
00195 );
00196 }
00197
00198
00199
00200
00201 virtual ~processorPolyPatch();
00202
00203
00204
00205
00206
00207 int myProcNo() const
00208 {
00209 return myProcNo_;
00210 }
00211
00212
00213 int neighbProcNo() const
00214 {
00215 return neighbProcNo_;
00216 }
00217
00218
00219 bool owner() const
00220 {
00221 return (myProcNo_ < neighbProcNo_);
00222 }
00223
00224
00225 bool neighbour() const
00226 {
00227 return !owner();
00228 }
00229
00230
00231 void calcTransformTensors
00232 (
00233 const vectorField& Cf,
00234 const vectorField& Cr,
00235 const vectorField& nf,
00236 const vectorField& nr
00237 ) const
00238 {
00239 coupledPolyPatch::calcTransformTensors(Cf, Cr, nf, nr);
00240 }
00241
00242
00243 const vectorField& neighbFaceCentres() const
00244 {
00245 return neighbFaceCentres_;
00246 }
00247
00248
00249 const vectorField& neighbFaceAreas() const
00250 {
00251 return neighbFaceAreas_;
00252 }
00253
00254
00255 const vectorField& neighbFaceCellCentres() const
00256 {
00257 return neighbFaceCellCentres_;
00258 }
00259
00260
00261
00262 const labelList& neighbPoints() const;
00263
00264
00265
00266 const labelList& neighbEdges() const;
00267
00268
00269
00270
00271 virtual void initOrder(const primitivePatch&) const;
00272
00273
00274
00275
00276
00277
00278 virtual bool order
00279 (
00280 const primitivePatch&,
00281 labelList& faceMap,
00282 labelList& rotation
00283 ) const;
00284
00285
00286
00287 virtual void write(Ostream&) const;
00288
00289
00290 virtual void writeDict(Ostream&) const;
00291 };
00292
00293
00294
00295
00296 }
00297
00298
00299
00300 #endif
00301
00302
Copyright © 2000-2007 OpenCFD Ltd