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 processorFvPatchField_H
00036 #define processorFvPatchField_H
00037
00038 #include "coupledFvPatchField.H"
00039 #include "processorFvPatch.H"
00040 #include "processorLduCoupledInterface.H"
00041
00042
00043
00044 namespace Foam
00045 {
00046
00047
00048
00049
00050
00051 template<class Type>
00052 class processorFvPatchField
00053 :
00054 virtual public processorLduCoupledInterface,
00055 public coupledFvPatchField<Type>
00056 {
00057
00058
00059
00060 const processorFvPatch& procPatch_;
00061
00062
00063 public:
00064
00065
00066 TypeName(processorFvPatch::typeName_());
00067
00068
00069
00070
00071
00072 processorFvPatchField
00073 (
00074 const fvPatch&,
00075 const Field<Type>&
00076 );
00077
00078
00079 processorFvPatchField
00080 (
00081 const fvPatch&,
00082 const Field<Type>&,
00083 const Field<Type>&
00084 );
00085
00086
00087 processorFvPatchField
00088 (
00089 const fvPatch&,
00090 const Field<Type>&,
00091 const dictionary&
00092 );
00093
00094
00095 processorFvPatchField
00096 (
00097 const processorFvPatchField<Type>&,
00098 const fvPatch&,
00099 const Field<Type>&,
00100 const fvPatchFieldMapper&
00101 );
00102
00103
00104 processorFvPatchField(const processorFvPatchField<Type>&);
00105
00106
00107 virtual tmp<fvPatchField<Type> > clone() const
00108 {
00109 return tmp<fvPatchField<Type> >
00110 (
00111 new processorFvPatchField<Type>(*this)
00112 );
00113 }
00114
00115
00116 processorFvPatchField
00117 (
00118 const processorFvPatchField<Type>&,
00119 const Field<Type>&
00120 );
00121
00122
00123 virtual tmp<fvPatchField<Type> > clone(const Field<Type>& iF) const
00124 {
00125 return tmp<fvPatchField<Type> >
00126 (
00127 new processorFvPatchField<Type>(*this, iF)
00128 );
00129 }
00130
00131
00132
00133
00134 ~processorFvPatchField();
00135
00136
00137
00138
00139
00140
00141
00142 virtual bool coupled() const
00143 {
00144 if (Pstream::parRun())
00145 {
00146 return true;
00147 }
00148 else
00149 {
00150 return false;
00151 }
00152 }
00153
00154
00155 tmp<Field<Type> > patchNeighbourField() const;
00156
00157
00158
00159
00160
00161 virtual void initEvaluate(const bool bufferdTransfer);
00162
00163
00164 virtual void evaluate();
00165
00166
00167 virtual void initNbrColour
00168 (
00169 const labelField&,
00170 const bool bufferdTransfer
00171 ) const;
00172
00173
00174 virtual tmp<labelField> nbrColour(const labelField&) const;
00175
00176
00177 virtual void initInterfaceMatrixUpdate
00178 (
00179 const scalarField& psiInternal,
00180 scalarField& result,
00181 const lduMatrix& m,
00182 const scalarField& coeffs,
00183 const direction cmpt,
00184 const bool bufferdTransfer
00185 ) const;
00186
00187
00188 virtual void updateInterfaceMatrix
00189 (
00190 const scalarField& psiInternal,
00191 scalarField& result,
00192 const lduMatrix& m,
00193 const scalarField& coeffs,
00194 const direction cmpt
00195 ) const;
00196
00197
00198
00199
00200 virtual int myProcNo() const
00201 {
00202 return procPatch_.myProcNo();
00203 }
00204
00205
00206 virtual int neighbProcNo() const
00207 {
00208 return procPatch_.neighbProcNo();
00209 }
00210
00211
00212 virtual bool doTransform() const
00213 {
00214 return !(procPatch_.parallel() || pTraits<Type>::rank == 0);
00215 }
00216
00217
00218 virtual const tensorField& forwardT() const
00219 {
00220 return procPatch_.forwardT();
00221 }
00222
00223
00224 virtual int rank() const
00225 {
00226 return pTraits<Type>::rank;
00227 }
00228 };
00229
00230
00231
00232
00233 }
00234
00235
00236
00237 #ifdef NoRepository
00238 # include "processorFvPatchField.C"
00239 #endif
00240
00241
00242
00243 #endif
00244
00245