coupledPolyPatch.H
Go to the documentation of this file.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 #ifndef coupledPolyPatch_H
00039 #define coupledPolyPatch_H
00040
00041 #include "polyPatch.H"
00042
00043
00044
00045 namespace Foam
00046 {
00047
00048
00049
00050
00051
00052 class coupledPolyPatch
00053 :
00054 public polyPatch
00055 {
00056
00057
00058
00059 mutable vectorField separation_;
00060
00061
00062 mutable tensorField forwardT_;
00063
00064
00065 mutable tensorField reverseT_;
00066
00067 public:
00068
00069
00070
00071
00072 static scalar matchTol;
00073
00074
00075 protected:
00076
00077
00078
00079
00080
00081
00082 void calcTransformTensors
00083 (
00084 const vectorField& Cf,
00085 const vectorField& Cr,
00086 const vectorField& nf,
00087 const vectorField& nr,
00088 const scalarField& smallDist,
00089 const scalar absTol = matchTol
00090 ) const;
00091
00092
00093 virtual void initGeometry() = 0;
00094
00095
00096 virtual void calcGeometry() = 0;
00097
00098
00099 virtual void initMovePoints(const pointField&) = 0;
00100
00101
00102 virtual void movePoints(const pointField&) = 0;
00103
00104
00105 virtual void initUpdateMesh() = 0;
00106
00107
00108 virtual void updateMesh() = 0;
00109
00110
00111
00112 static void writeOBJ(Ostream& os, const point& pt);
00113
00114
00115 static void writeOBJ(Ostream&, const pointField&, const labelList&);
00116
00117
00118 static void writeOBJ
00119 (
00120 const fileName&,
00121 const UList<face>&,
00122 const pointField&
00123 );
00124
00125
00126 static void writeOBJ
00127 (
00128 Ostream& os,
00129 const point& p0,
00130 const point& p1,
00131 label& vertI
00132 );
00133
00134
00135 static pointField calcFaceCentres
00136 (
00137 const UList<face>&,
00138 const pointField&
00139 );
00140
00141
00142 static pointField getAnchorPoints
00143 (
00144 const UList<face>&,
00145 const pointField&
00146 );
00147
00148
00149 bool inPatch
00150 (
00151 const labelList& oldToNew,
00152 const label oldFaceI
00153 ) const;
00154
00155
00156
00157 static label whichPatch
00158 (
00159 const labelList& patchStarts,
00160 const label faceI
00161 );
00162
00163
00164
00165 static scalarField calcFaceTol
00166 (
00167 const UList<face>& faces,
00168 const pointField& points,
00169 const pointField& faceCentres
00170 );
00171
00172
00173
00174 static label getRotation
00175 (
00176 const pointField& points,
00177 const face& f,
00178 const point& anchor,
00179 const scalar tol
00180 );
00181
00182
00183 public:
00184
00185
00186 TypeName("coupled");
00187
00188
00189
00190
00191
00192 coupledPolyPatch
00193 (
00194 const word& name,
00195 const label size,
00196 const label start,
00197 const label index,
00198 const polyBoundaryMesh& bm
00199 );
00200
00201
00202 coupledPolyPatch
00203 (
00204 const word& name,
00205 const dictionary& dict,
00206 const label index,
00207 const polyBoundaryMesh& bm
00208 );
00209
00210
00211 coupledPolyPatch(const coupledPolyPatch&, const polyBoundaryMesh&);
00212
00213
00214
00215 coupledPolyPatch
00216 (
00217 const coupledPolyPatch& pp,
00218 const polyBoundaryMesh& bm,
00219 const label index,
00220 const label newSize,
00221 const label newStart
00222 );
00223
00224
00225
00226
00227 virtual ~coupledPolyPatch();
00228
00229
00230
00231
00232
00233
00234
00235 virtual bool coupled() const
00236 {
00237 return true;
00238 }
00239
00240
00241
00242 bool separated() const
00243 {
00244 return separation_.size();
00245 }
00246
00247
00248
00249 const vectorField& separation() const
00250 {
00251 return separation_;
00252 }
00253
00254
00255
00256 bool parallel() const
00257 {
00258 return forwardT_.empty();
00259 }
00260
00261
00262 const tensorField& forwardT() const
00263 {
00264 return forwardT_;
00265 }
00266
00267
00268 const tensorField& reverseT() const
00269 {
00270 return reverseT_;
00271 }
00272
00273
00274
00275
00276 virtual void initOrder(const primitivePatch&) const = 0;
00277
00278
00279
00280
00281
00282
00283 virtual bool order
00284 (
00285 const primitivePatch&,
00286 labelList& faceMap,
00287 labelList& rotation
00288 ) const = 0;
00289 };
00290
00291
00292
00293
00294 }
00295
00296
00297
00298 #endif
00299
00300
Copyright © 2000-2009 OpenCFD Ltd