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