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 "processorLduInterfaceField.H"
00040 #include "processorFvPatch.H"
00041
00042
00043
00044 namespace Foam
00045 {
00046
00047
00048
00049
00050
00051 template<class Type>
00052 class processorFvPatchField
00053 :
00054 public processorLduInterfaceField,
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 DimensionedField<Type, volMesh>&
00076 );
00077
00078
00079 processorFvPatchField
00080 (
00081 const fvPatch&,
00082 const DimensionedField<Type, volMesh>&,
00083 const Field<Type>&
00084 );
00085
00086
00087 processorFvPatchField
00088 (
00089 const fvPatch&,
00090 const DimensionedField<Type, volMesh>&,
00091 const dictionary&
00092 );
00093
00094
00095 processorFvPatchField
00096 (
00097 const processorFvPatchField<Type>&,
00098 const fvPatch&,
00099 const DimensionedField<Type, volMesh>&,
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 DimensionedField<Type, volMesh>&
00120 );
00121
00122
00123 virtual tmp<fvPatchField<Type> > clone
00124 (
00125 const DimensionedField<Type, volMesh>& iF
00126 ) const
00127 {
00128 return tmp<fvPatchField<Type> >
00129 (
00130 new processorFvPatchField<Type>(*this, iF)
00131 );
00132 }
00133
00134
00135
00136
00137 ~processorFvPatchField();
00138
00139
00140
00141
00142
00143
00144
00145 virtual bool coupled() const
00146 {
00147 if (Pstream::parRun())
00148 {
00149 return true;
00150 }
00151 else
00152 {
00153 return false;
00154 }
00155 }
00156
00157
00158 tmp<Field<Type> > patchNeighbourField() const;
00159
00160
00161
00162
00163
00164 virtual void initEvaluate(const bool bufferdTransfer);
00165
00166
00167 virtual void evaluate();
00168
00169
00170 virtual tmp<Field<Type> > snGrad() const;
00171
00172
00173 virtual void initInterfaceMatrixUpdate
00174 (
00175 const scalarField& psiInternal,
00176 scalarField& result,
00177 const lduMatrix& m,
00178 const scalarField& coeffs,
00179 const direction cmpt,
00180 const bool bufferdTransfer
00181 ) const;
00182
00183
00184 virtual void updateInterfaceMatrix
00185 (
00186 const scalarField& psiInternal,
00187 scalarField& result,
00188 const lduMatrix& m,
00189 const scalarField& coeffs,
00190 const direction cmpt
00191 ) const;
00192
00193
00194
00195
00196 virtual int myProcNo() const
00197 {
00198 return procPatch_.myProcNo();
00199 }
00200
00201
00202 virtual int neighbProcNo() const
00203 {
00204 return procPatch_.neighbProcNo();
00205 }
00206
00207
00208 virtual bool doTransform() const
00209 {
00210 return !(procPatch_.parallel() || pTraits<Type>::rank == 0);
00211 }
00212
00213
00214 virtual const tensorField& forwardT() const
00215 {
00216 return procPatch_.forwardT();
00217 }
00218
00219
00220 virtual int rank() const
00221 {
00222 return pTraits<Type>::rank;
00223 }
00224 };
00225
00226
00227
00228
00229 }
00230
00231
00232
00233 #ifdef NoRepository
00234 # include "processorFvPatchField.C"
00235 #endif
00236
00237
00238
00239 #endif
00240
00241
Copyright © 2000-2007 OpenCFD Ltd