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 volPointInterpolation_H
00037 #define volPointInterpolation_H
00038
00039 #include "primitiveFieldsFwd.H"
00040 #include "volFieldsFwd.H"
00041 #include "pointFieldsFwd.H"
00042 #include "scalarList.H"
00043 #include "tmp.H"
00044 #include "className.H"
00045 #include "FieldFields.H"
00046 #include "primitivePatchInterpolation.H"
00047
00048
00049
00050 namespace Foam
00051 {
00052
00053 class fvMesh;
00054 class pointMesh;
00055
00056
00057
00058
00059
00060 class volPointInterpolation
00061 {
00062
00063
00064 const fvMesh& fvMesh_;
00065 const pointMesh& pointMesh_;
00066
00067
00068 mutable FieldField<Field, scalar>* pointWeightsPtr_;
00069
00070
00071 mutable PtrList<primitivePatchInterpolation>* patchInterpolatorsPtr_;
00072
00073
00074 mutable labelList* boundaryPointsPtr_;
00075
00076
00077 mutable FieldField<Field, scalar>* pointBoundaryWeightsPtr_;
00078
00079
00080
00081
00082
00083 const PtrList<primitivePatchInterpolation>& patchInterpolators() const;
00084
00085
00086 void makeWeights() const;
00087
00088
00089 void makeBoundaryAddressing() const;
00090
00091
00092 void makeBoundaryWeights() const;
00093
00094
00095 void clearAddressing() const;
00096
00097
00098 void clearGeom() const;
00099
00100
00101 protected:
00102
00103 const fvMesh& vMesh() const
00104 {
00105 return fvMesh_;
00106 }
00107
00108 const pointMesh& pMesh() const
00109 {
00110 return pointMesh_;
00111 }
00112
00113
00114 public:
00115
00116
00117 ClassName("volPointInterpolation");
00118
00119
00120
00121
00122
00123 volPointInterpolation(const fvMesh&, const pointMesh&);
00124
00125
00126
00127
00128 ~volPointInterpolation();
00129
00130
00131
00132
00133
00134
00135
00136
00137 const FieldField<Field, scalar>& pointWeights() const;
00138
00139
00140 const labelList& boundaryPoints() const;
00141
00142
00143 const FieldField<Field, scalar>& pointBoundaryWeights() const;
00144
00145
00146
00147
00148
00149 void updateMesh();
00150
00151
00152 bool movePoints();
00153
00154
00155
00156
00157
00158
00159 template<class Type>
00160 void interpolate
00161 (
00162 const GeometricField<Type, fvPatchField, volMesh>&,
00163 GeometricField<Type, pointPatchField, pointMesh>&
00164 ) const;
00165
00166
00167
00168 template<class Type>
00169 tmp<GeometricField<Type, pointPatchField, pointMesh> > interpolate
00170 (
00171 const GeometricField<Type, fvPatchField, volMesh>&
00172 ) const;
00173
00174
00175
00176 template<class Type>
00177 tmp<GeometricField<Type, pointPatchField, pointMesh> > interpolate
00178 (
00179 const tmp<GeometricField<Type, fvPatchField, volMesh> >&
00180 ) const;
00181 };
00182
00183
00184
00185
00186 }
00187
00188
00189
00190 #ifdef NoRepository
00191 # include "volPointInterpolate.C"
00192 #endif
00193
00194
00195
00196 #endif
00197
00198