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 cyclicFvPatchField_H
00036 #define cyclicFvPatchField_H
00037
00038 #include "coupledFvPatchField.H"
00039 #include "cyclicFvPatch.H"
00040 #include "cyclicLduCoupledInterface.H"
00041
00042
00043
00044 namespace Foam
00045 {
00046
00047
00048
00049
00050
00051 template<class Type>
00052 class cyclicFvPatchField
00053 :
00054 public coupledFvPatchField<Type>,
00055 virtual public cyclicLduCoupledInterface
00056 {
00057
00058
00059
00060 const cyclicFvPatch& cyclicPatch_;
00061
00062
00063
00064
00065
00066 template<class Type2>
00067 tmp<Field<Type2> > neighbourSideField
00068 (
00069 const Field<Type2>&
00070 ) const;
00071
00072
00073 public:
00074
00075
00076 TypeName(cyclicFvPatch::typeName_());
00077
00078
00079
00080
00081
00082 cyclicFvPatchField
00083 (
00084 const fvPatch&,
00085 const Field<Type>&
00086 );
00087
00088
00089 cyclicFvPatchField
00090 (
00091 const fvPatch&,
00092 const Field<Type>&,
00093 const dictionary&
00094 );
00095
00096
00097 cyclicFvPatchField
00098 (
00099 const cyclicFvPatchField<Type>&,
00100 const fvPatch&,
00101 const Field<Type>&,
00102 const fvPatchFieldMapper&
00103 );
00104
00105
00106 virtual tmp<fvPatchField<Type> > clone() const
00107 {
00108 return tmp<fvPatchField<Type> >
00109 (
00110 new cyclicFvPatchField<Type>(*this)
00111 );
00112 }
00113
00114
00115 cyclicFvPatchField
00116 (
00117 const cyclicFvPatchField<Type>&,
00118 const Field<Type>&
00119 );
00120
00121
00122 virtual tmp<fvPatchField<Type> > clone(const Field<Type>& iF) const
00123 {
00124 return tmp<fvPatchField<Type> >
00125 (
00126 new cyclicFvPatchField<Type>(*this, iF)
00127 );
00128 }
00129
00130
00131
00132
00133
00134
00135
00136 tmp<Field<Type> > patchNeighbourField() const;
00137
00138
00139 virtual tmp<labelField> nbrColour(const labelField&) const;
00140
00141
00142 virtual void updateInterfaceMatrix
00143 (
00144 const scalarField& psiInternal,
00145 scalarField& result,
00146 const lduMatrix&,
00147 const scalarField& coeffs,
00148 const direction cmpt
00149 ) const;
00150
00151
00152
00153
00154
00155 virtual bool doTransform() const
00156 {
00157 return !(cyclicPatch_.parallel() || pTraits<Type>::rank == 0);
00158 }
00159
00160
00161 virtual const tensorField& forwardT() const
00162 {
00163 return cyclicPatch_.forwardT();
00164 }
00165
00166
00167 virtual const tensorField& reverseT() const
00168 {
00169 return cyclicPatch_.reverseT();
00170 }
00171
00172
00173 virtual int rank() const
00174 {
00175 return pTraits<Type>::rank;
00176 }
00177 };
00178
00179
00180
00181
00182 }
00183
00184
00185
00186 #ifdef NoRepository
00187 # include "cyclicFvPatchField.C"
00188 #endif
00189
00190
00191
00192 #endif
00193
00194