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 #ifndef fvPatch_H
00037 #define fvPatch_H
00038
00039 #include "polyPatch.H"
00040 #include "labelList.H"
00041 #include "SubList.H"
00042 #include "typeInfo.H"
00043 #include "tmp.H"
00044 #include "primitiveFields.H"
00045 #include "SubField.H"
00046 #include "fvPatchFieldsFwd.H"
00047 #include "autoPtr.H"
00048 #include "runTimeSelectionTables.H"
00049
00050
00051
00052 namespace Foam
00053 {
00054
00055 class fvBoundaryMesh;
00056 class surfaceInterpolation;
00057
00058
00059
00060
00061
00062 class fvPatch
00063 {
00064
00065
00066
00067 const polyPatch& polyPatch_;
00068
00069
00070 const fvBoundaryMesh& boundaryMesh_;
00071
00072
00073
00074
00075
00076 fvPatch(const fvPatch&);
00077
00078
00079 void operator=(const fvPatch&);
00080
00081
00082 protected:
00083
00084
00085
00086
00087 virtual void makeWeights(scalarField&) const;
00088
00089
00090 virtual void makeDeltaCoeffs(scalarField&) const;
00091
00092
00093 virtual void initMovePoints();
00094
00095
00096 virtual void movePoints();
00097
00098
00099 public:
00100
00101 typedef fvBoundaryMesh BoundaryMesh;
00102
00103 friend class fvBoundaryMesh;
00104 friend class surfaceInterpolation;
00105
00106
00107 TypeName(polyPatch::typeName_());
00108
00109
00110
00111
00112 declareRunTimeSelectionTable
00113 (
00114 autoPtr,
00115 fvPatch,
00116 polyPatch,
00117 (const polyPatch& patch, const fvBoundaryMesh& bm),
00118 (patch, bm)
00119 );
00120
00121
00122
00123
00124
00125 fvPatch(const polyPatch&, const fvBoundaryMesh&);
00126
00127
00128
00129
00130
00131 static autoPtr<fvPatch> New(const polyPatch&, const fvBoundaryMesh&);
00132
00133
00134
00135
00136 virtual ~fvPatch();
00137
00138
00139
00140
00141
00142 const polyPatch& patch() const
00143 {
00144 return polyPatch_;
00145 }
00146
00147
00148 const word& name() const
00149 {
00150 return polyPatch_.name();
00151 }
00152
00153
00154 virtual label size() const
00155 {
00156 return polyPatch_.size();
00157 }
00158
00159
00160 bool coupled() const
00161 {
00162 return polyPatch_.coupled();
00163 }
00164
00165
00166 static bool constraintType(const word& pt);
00167
00168
00169 static wordList constraintTypes();
00170
00171
00172 label index() const
00173 {
00174 return polyPatch_.index();
00175 }
00176
00177
00178 const fvBoundaryMesh& boundaryMesh() const
00179 {
00180 return boundaryMesh_;
00181 }
00182
00183
00184 template<class T>
00185 const typename List<T>::subList patchSlice(const List<T>& l) const
00186 {
00187 return typename List<T>::subList(l, size(), polyPatch_.start());
00188 }
00189
00190
00191
00192
00193
00194 const labelList::subList faceCells() const;
00195
00196
00197 const vectorField::subField Cf() const;
00198
00199
00200 tmp<vectorField> Cn() const;
00201
00202
00203
00204
00205 virtual const vectorField& nf() const;
00206
00207
00208
00209 const vectorField::subField Sf() const;
00210
00211
00212 const scalarField& magSf() const;
00213
00214
00215
00216
00217 virtual tmp<vectorField> delta() const;
00218
00219
00220
00221
00222
00223 const scalarField& weights() const;
00224
00225
00226
00227
00228 const scalarField& deltaCoeffs() const;
00229 };
00230
00231
00232
00233
00234 }
00235
00236
00237
00238 #endif
00239
00240