fvFieldDecomposer.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 #ifndef fvFieldDecomposer_H
00038 #define fvFieldDecomposer_H
00039
00040 #include "fvMesh.H"
00041 #include "fvPatchFieldMapper.H"
00042 #include "surfaceFields.H"
00043
00044
00045
00046 namespace Foam
00047 {
00048
00049 class IOobjectList;
00050
00051
00052
00053
00054
00055 class fvFieldDecomposer
00056 {
00057 public:
00058
00059
00060 class patchFieldDecomposer
00061 :
00062 public fvPatchFieldMapper
00063 {
00064
00065
00066 labelList directAddressing_;
00067
00068 public:
00069
00070
00071
00072
00073 patchFieldDecomposer
00074 (
00075 const unallocLabelList& addressingSlice,
00076 const label addressingOffset
00077 );
00078
00079
00080
00081
00082 label size() const
00083 {
00084 return directAddressing_.size();
00085 }
00086
00087 bool direct() const
00088 {
00089 return true;
00090 }
00091
00092 const unallocLabelList& directAddressing() const
00093 {
00094 return directAddressing_;
00095 }
00096 };
00097
00098
00099
00100
00101
00102 class processorVolPatchFieldDecomposer
00103 :
00104 public fvPatchFieldMapper
00105 {
00106
00107
00108 labelList directAddressing_;
00109
00110 public:
00111
00112
00113 processorVolPatchFieldDecomposer
00114 (
00115 const fvMesh& mesh,
00116 const unallocLabelList& addressingSlice
00117 );
00118
00119
00120
00121
00122 label size() const
00123 {
00124 return directAddressing_.size();
00125 }
00126
00127 bool direct() const
00128 {
00129 return true;
00130 }
00131
00132 const unallocLabelList& directAddressing() const
00133 {
00134 return directAddressing_;
00135 }
00136 };
00137
00138
00139
00140
00141 class processorSurfacePatchFieldDecomposer
00142 :
00143 public fvPatchFieldMapper
00144 {
00145 labelListList addressing_;
00146 scalarListList weights_;
00147
00148 public:
00149
00150
00151 processorSurfacePatchFieldDecomposer
00152 (
00153 const unallocLabelList& addressingSlice
00154 );
00155
00156
00157
00158
00159 label size() const
00160 {
00161 return addressing_.size();
00162 }
00163
00164 bool direct() const
00165 {
00166 return false;
00167 }
00168
00169 const labelListList& addressing() const
00170 {
00171 return addressing_;
00172 }
00173
00174 const scalarListList& weights() const
00175 {
00176 return weights_;
00177 }
00178 };
00179
00180
00181 private:
00182
00183
00184
00185
00186 const fvMesh& completeMesh_;
00187
00188
00189 const fvMesh& procMesh_;
00190
00191
00192 const labelList& faceAddressing_;
00193
00194
00195 const labelList& cellAddressing_;
00196
00197
00198 const labelList& boundaryAddressing_;
00199
00200
00201 List<patchFieldDecomposer*> patchFieldDecomposerPtrs_;
00202
00203 List<processorVolPatchFieldDecomposer*>
00204 processorVolPatchFieldDecomposerPtrs_;
00205
00206 List<processorSurfacePatchFieldDecomposer*>
00207 processorSurfacePatchFieldDecomposerPtrs_;
00208
00209
00210
00211
00212
00213 fvFieldDecomposer(const fvFieldDecomposer&);
00214
00215
00216 void operator=(const fvFieldDecomposer&);
00217
00218
00219 public:
00220
00221
00222
00223
00224 fvFieldDecomposer
00225 (
00226 const fvMesh& completeMesh,
00227 const fvMesh& procMesh,
00228 const labelList& faceAddressing,
00229 const labelList& cellAddressing,
00230 const labelList& boundaryAddressing
00231 );
00232
00233
00234
00235
00236 ~fvFieldDecomposer();
00237
00238
00239
00240
00241
00242 template<class Type>
00243 tmp<GeometricField<Type, fvPatchField, volMesh> >
00244 decomposeField
00245 (
00246 const GeometricField<Type, fvPatchField, volMesh>& field
00247 ) const;
00248
00249
00250 template<class Type>
00251 tmp<GeometricField<Type, fvsPatchField, surfaceMesh> >
00252 decomposeField
00253 (
00254 const GeometricField<Type, fvsPatchField, surfaceMesh>& field
00255 ) const;
00256
00257 template<class GeoField>
00258 void decomposeFields(const PtrList<GeoField>& fields) const;
00259 };
00260
00261
00262
00263
00264 }
00265
00266
00267
00268 #ifdef NoRepository
00269 # include "fvFieldDecomposerDecomposeFields.C"
00270 #endif
00271
00272
00273
00274 #endif
00275
00276
Copyright © 2000-2009 OpenCFD Ltd