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 #ifndef ProcessorTetPointPatchField_H
00036 #define ProcessorTetPointPatchField_H
00037
00038 #include "CoupledTetPointPatchField.H"
00039
00040
00041
00042 namespace Foam
00043 {
00044
00045
00046
00047
00048
00049 template
00050 <
00051 template<class> class PatchField,
00052 class PointPatch,
00053 class ProcessorPointPatch,
00054 class Type
00055 >
00056 class ProcessorTetPointPatchField
00057 :
00058 public CoupledTetPointPatchField<PatchField, PointPatch, Type>
00059 {
00060
00061
00062
00063 const ProcessorPointPatch& procPatch_;
00064
00065
00066
00067
00068
00069 template<class Type2>
00070 void sendPointField(const tmp<Field<Type2> >&) const;
00071
00072 template<class Type2>
00073 void sendEdgeField(const tmp<Field<Type2> >&) const;
00074
00075
00076
00077 template<class Type2>
00078 tmp<Field<Type2> > receivePointField() const;
00079
00080 template<class Type2>
00081 tmp<Field<Type2> > receiveEdgeField() const;
00082
00083
00084 template<class Type2>
00085 void initAddFieldTempl(const Field<Type2>&) const;
00086
00087 template<class Type2>
00088 void addFieldTempl(Field<Type2>&) const;
00089
00090
00091
00092 public:
00093
00094
00095 TypeName(ProcessorPointPatch::typeName_());
00096
00097
00098
00099
00100
00101 ProcessorTetPointPatchField
00102 (
00103 const PointPatch&,
00104 const Field<Type>&
00105 );
00106
00107
00108 ProcessorTetPointPatchField
00109 (
00110 const PointPatch&,
00111 const Field<Type>&,
00112 const dictionary&
00113 );
00114
00115
00116 ProcessorTetPointPatchField
00117 (
00118 const ProcessorTetPointPatchField
00119 <PatchField, PointPatch, ProcessorPointPatch, Type>&,
00120 const PointPatch&,
00121 const Field<Type>&,
00122 const TetPointPatchFieldMapper&
00123 );
00124
00125
00126 virtual autoPtr<PatchField<Type> > clone() const
00127 {
00128 return autoPtr<PatchField<Type> >
00129 (
00130 new ProcessorTetPointPatchField
00131 <PatchField, PointPatch, ProcessorPointPatch, Type>
00132 (
00133 *this
00134 )
00135 );
00136 }
00137
00138
00139 ProcessorTetPointPatchField
00140 (
00141 const ProcessorTetPointPatchField
00142 <PatchField, PointPatch, ProcessorPointPatch, Type>&,
00143 const Field<Type>&
00144 );
00145
00146
00147 virtual autoPtr<PatchField<Type> > clone(const Field<Type>& iF) const
00148 {
00149 return autoPtr<PatchField<Type> >
00150 (
00151 new ProcessorTetPointPatchField
00152 <PatchField, PointPatch, ProcessorPointPatch, Type>
00153 (
00154 *this,
00155 iF
00156 )
00157 );
00158 }
00159
00160
00161
00162
00163 ~ProcessorTetPointPatchField();
00164
00165
00166
00167
00168
00169
00170
00171 virtual void evaluate()
00172 {}
00173
00174
00175 virtual void initAddField() const;
00176
00177
00178 virtual void addField(Field<Type>&) const;
00179
00180
00181
00182 virtual void setBoundaryCondition
00183 (
00184 Map<constraint<Type> > &
00185 ) const;
00186
00187
00188
00189
00190
00191 virtual void initAddDiag(const scalarField&) const;
00192 virtual void initAddSource(const scalarField&) const;
00193
00194 virtual void addDiag(scalarField&) const;
00195 virtual void addSource(scalarField&) const;
00196
00197
00198 virtual void initAddUpperLower(const scalarField&) const;
00199
00200 virtual void addUpperLower(scalarField&) const;
00201
00202 virtual void eliminateUpperLower(scalarField&) const;
00203
00204
00205 virtual tmp<scalarField> cutBouCoeffs(const lduMatrix&) const;
00206
00207
00208 virtual tmp<scalarField> cutIntCoeffs(const lduMatrix&) const;
00209
00210
00211
00212
00213
00214 virtual void initNbrColour
00215 (
00216 const labelField&,
00217 const bool bufferdTransfer
00218 ) const;
00219
00220
00221 virtual tmp<labelField> nbrColour
00222 (
00223 const labelField&
00224 ) const;
00225
00226
00227 virtual void initInterfaceMatrixUpdate
00228 (
00229 const scalarField& psiInternal,
00230 scalarField& result,
00231 const lduMatrix& m,
00232 const scalarField& coeffs,
00233 const direction cmpt,
00234 const bool bufferdTransfer
00235 ) const;
00236
00237
00238 virtual void updateInterfaceMatrix
00239 (
00240 const scalarField& psiInternal,
00241 scalarField& result,
00242 const lduMatrix& m,
00243 const scalarField& coeffs,
00244 const direction cmpt
00245 ) const;
00246 };
00247
00248
00249
00250
00251 }
00252
00253
00254
00255 #ifdef NoRepository
00256 # include "ProcessorTetPointPatchField.C"
00257 #endif
00258
00259
00260
00261 #endif
00262
00263