probes.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 probes_H
00039 #define probes_H
00040
00041 #include "HashPtrTable.H"
00042 #include "OFstream.H"
00043 #include "polyMesh.H"
00044 #include "pointField.H"
00045 #include "volFieldsFwd.H"
00046
00047
00048
00049 namespace Foam
00050 {
00051
00052
00053 class objectRegistry;
00054 class dictionary;
00055 class fvMesh;
00056 class mapPolyMesh;
00057
00058
00059
00060
00061
00062 class probes
00063 {
00064
00065
00066
00067 template<class Type>
00068 class fieldGroup
00069 :
00070 public wordList
00071 {
00072 public:
00073
00074 fieldGroup()
00075 :
00076 wordList()
00077 {}
00078
00079
00080 fieldGroup(const wordList& fieldNames)
00081 :
00082 wordList(fieldNames)
00083 {}
00084 };
00085
00086
00087
00088
00089
00090
00091 word name_;
00092
00093
00094 const objectRegistry& obr_;
00095
00096
00097 bool loadFromFiles_;
00098
00099
00100
00101
00102
00103 wordList fieldNames_;
00104
00105
00106 vectorField probeLocations_;
00107
00108
00109
00110
00111
00112 fieldGroup<scalar> scalarFields_;
00113 fieldGroup<vector> vectorFields_;
00114 fieldGroup<sphericalTensor> sphericalTensorFields_;
00115 fieldGroup<symmTensor> symmTensorFields_;
00116 fieldGroup<tensor> tensorFields_;
00117
00118
00119 labelList cellList_;
00120
00121
00122 HashPtrTable<OFstream> probeFilePtrs_;
00123
00124
00125
00126
00127
00128 void findCells(const fvMesh&);
00129
00130
00131 bool checkFieldTypes();
00132
00133
00134 template<class Type>
00135 label countFields
00136 (
00137 fieldGroup<Type>& fieldList,
00138 const wordList& fieldTypes
00139 ) const;
00140
00141
00142 template<class Type>
00143 void sampleAndWrite
00144 (
00145 const GeometricField<Type, fvPatchField, volMesh>&
00146 );
00147
00148
00149 template <class Type>
00150 void sampleAndWrite(const fieldGroup<Type>&);
00151
00152
00153 probes(const probes&);
00154
00155
00156 void operator=(const probes&);
00157
00158
00159 public:
00160
00161
00162 TypeName("probes");
00163
00164
00165
00166
00167
00168
00169 probes
00170 (
00171 const word& name,
00172 const objectRegistry&,
00173 const dictionary&,
00174 const bool loadFromFiles = false
00175 );
00176
00177
00178
00179 virtual ~probes();
00180
00181
00182
00183
00184
00185 virtual const word& name() const
00186 {
00187 return name_;
00188 }
00189
00190
00191 virtual const wordList& fieldNames() const
00192 {
00193 return fieldNames_;
00194 }
00195
00196
00197 virtual const vectorField& probeLocations() const
00198 {
00199 return probeLocations_;
00200 }
00201
00202
00203 const labelList& cells() const
00204 {
00205 return cellList_;
00206 }
00207
00208
00209 virtual void execute();
00210
00211
00212 virtual void end();
00213
00214
00215 virtual void write();
00216
00217
00218 virtual void read(const dictionary&);
00219
00220
00221 virtual void updateMesh(const mapPolyMesh&)
00222 {}
00223
00224
00225 virtual void movePoints(const pointField&)
00226 {}
00227
00228
00229 virtual void readUpdate(const polyMesh::readUpdateState state)
00230 {}
00231
00232
00233 template<class Type>
00234 tmp<Field<Type> > sample
00235 (
00236 const GeometricField<Type, fvPatchField, volMesh>&
00237 ) const;
00238
00239
00240 template <class Type>
00241 tmp<Field<Type> > sample(const word& fieldName) const;
00242 };
00243
00244
00245
00246
00247 }
00248
00249
00250
00251 #ifdef NoRepository
00252 # include "probesTemplates.C"
00253 #endif
00254
00255
00256
00257 #endif
00258
00259
Copyright © 2000-2009 OpenCFD Ltd