Go to the documentation of this file.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 #include "wedgePointPatchField.H"
00027 #include <OpenFOAM/transformField.H>
00028
00029
00030
00031 namespace Foam
00032 {
00033
00034
00035
00036 template<class Type>
00037 wedgePointPatchField<Type>::wedgePointPatchField
00038 (
00039 const pointPatch& p,
00040 const DimensionedField<Type, pointMesh>& iF
00041 )
00042 :
00043 pointPatchField<Type>(p, iF)
00044 {}
00045
00046
00047 template<class Type>
00048 wedgePointPatchField<Type>::wedgePointPatchField
00049 (
00050 const pointPatch& p,
00051 const DimensionedField<Type, pointMesh>& iF,
00052 const dictionary& dict
00053 )
00054 :
00055 pointPatchField<Type>(p, iF, dict)
00056 {
00057 if (!isType<wedgePointPatch>(p))
00058 {
00059 FatalIOErrorIn
00060 (
00061 "wedgePointPatchField<Type>::wedgePointPatchField\n"
00062 "(\n"
00063 " const pointPatch& p,\n"
00064 " const Field<Type>& field,\n"
00065 " const dictionary& dict\n"
00066 ")\n",
00067 dict
00068 ) << "patch " << this->patch().index() << " not wedge type. "
00069 << "Patch type = " << p.type()
00070 << exit(FatalIOError);
00071 }
00072 }
00073
00074
00075 template<class Type>
00076 wedgePointPatchField<Type>::wedgePointPatchField
00077 (
00078 const wedgePointPatchField<Type>& ptf,
00079 const pointPatch& p,
00080 const DimensionedField<Type, pointMesh>& iF,
00081 const pointPatchFieldMapper&
00082 )
00083 :
00084 pointPatchField<Type>(p, iF)
00085 {
00086 if (!isType<wedgePointPatch>(this->patch()))
00087 {
00088 FatalErrorIn
00089 (
00090 "wedgePointPatchField<Type>::wedgePointPatchField\n"
00091 "(\n"
00092 " const wedgePointPatchField<Type>& ptf,\n"
00093 " const pointPatch& p,\n"
00094 " const DimensionedField<Type, pointMesh>& iF,\n"
00095 " const pointPatchFieldMapper& mapper\n"
00096 ")\n"
00097 ) << "Field type does not correspond to patch type for patch "
00098 << this->patch().index() << "." << endl
00099 << "Field type: " << typeName << endl
00100 << "Patch type: " << this->patch().type()
00101 << exit(FatalError);
00102 }
00103 }
00104
00105
00106 template<class Type>
00107 wedgePointPatchField<Type>::wedgePointPatchField
00108 (
00109 const wedgePointPatchField<Type>& ptf,
00110 const DimensionedField<Type, pointMesh>& iF
00111 )
00112 :
00113 pointPatchField<Type>(ptf, iF)
00114 {}
00115
00116
00117
00118
00119 template<class Type>
00120 void wedgePointPatchField<Type>::evaluate(const Pstream::commsTypes)
00121 {
00122
00123
00124 const vector& nHat = this->patch().pointNormals()[0];
00125
00126 tmp<Field<Type> > tvalues =
00127 transform(I - nHat*nHat, this->patchInternalField());
00128
00129
00130 Field<Type>& iF = const_cast<Field<Type>&>(this->internalField());
00131
00132 this->setInInternalField(iF, tvalues());
00133 }
00134
00135
00136
00137
00138 }
00139
00140