emptyFvPatchField.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 "emptyFvPatchField.H"
00028 #include "fvPatchFieldMapper.H"
00029
00030
00031
00032 namespace Foam
00033 {
00034
00035
00036
00037 template<class Type>
00038 emptyFvPatchField<Type>::emptyFvPatchField
00039 (
00040 const fvPatch& p,
00041 const DimensionedField<Type, volMesh>& iF
00042 )
00043 :
00044 fvPatchField<Type>(p, iF, Field<Type>(0))
00045 {}
00046
00047
00048 template<class Type>
00049 emptyFvPatchField<Type>::emptyFvPatchField
00050 (
00051 const emptyFvPatchField<Type>&,
00052 const fvPatch& p,
00053 const DimensionedField<Type, volMesh>& iF,
00054 const fvPatchFieldMapper&
00055 )
00056 :
00057 fvPatchField<Type>(p, iF, Field<Type>(0))
00058 {
00059 if (!isType<emptyFvPatch>(p))
00060 {
00061 FatalErrorIn
00062 (
00063 "emptyFvPatchField<Type>::emptyFvPatchField\n"
00064 "(\n"
00065 " const emptyFvPatchField<Type>&,\n"
00066 " const fvPatch& p,\n"
00067 " const DimensionedField<Type, volMesh>& iF,\n"
00068 " const fvPatchFieldMapper& mapper\n"
00069 ")\n"
00070 ) << "\n patch type '" << p.type()
00071 << "' not constraint type '" << typeName << "'"
00072 << "\n for patch " << p.name()
00073 << " of field " << this->dimensionedInternalField().name()
00074 << " in file " << this->dimensionedInternalField().objectPath()
00075 << exit(FatalIOError);
00076 }
00077 }
00078
00079
00080 template<class Type>
00081 emptyFvPatchField<Type>::emptyFvPatchField
00082 (
00083 const fvPatch& p,
00084 const DimensionedField<Type, volMesh>& iF,
00085 const dictionary& dict
00086 )
00087 :
00088 fvPatchField<Type>(p, iF, Field<Type>(0))
00089 {
00090 if (!isType<emptyFvPatch>(p))
00091 {
00092 FatalIOErrorIn
00093 (
00094 "emptyFvPatchField<Type>::emptyFvPatchField\n"
00095 "(\n"
00096 " const fvPatch& p,\n"
00097 " const Field<Type>& field,\n"
00098 " const dictionary& dict\n"
00099 ")\n",
00100 dict
00101 ) << "\n patch type '" << p.type()
00102 << "' not constraint type '" << typeName << "'"
00103 << "\n for patch " << p.name()
00104 << " of field " << this->dimensionedInternalField().name()
00105 << " in file " << this->dimensionedInternalField().objectPath()
00106 << exit(FatalIOError);
00107 }
00108 }
00109
00110
00111 template<class Type>
00112 emptyFvPatchField<Type>::emptyFvPatchField
00113 (
00114 const emptyFvPatchField<Type>& ptf
00115 )
00116 :
00117 fvPatchField<Type>
00118 (
00119 ptf.patch(),
00120 ptf.dimensionedInternalField(),
00121 Field<Type>(0)
00122 )
00123 {}
00124
00125
00126 template<class Type>
00127 emptyFvPatchField<Type>::emptyFvPatchField
00128 (
00129 const emptyFvPatchField<Type>& ptf,
00130 const DimensionedField<Type, volMesh>& iF
00131 )
00132 :
00133 fvPatchField<Type>(ptf.patch(), iF, Field<Type>(0))
00134 {}
00135
00136
00137
00138
00139 template<class Type>
00140 void emptyFvPatchField<Type>::updateCoeffs()
00141 {
00142 if
00143 (
00144 this->patch().patch().size()
00145 % this->dimensionedInternalField().mesh().nCells()
00146 )
00147 {
00148 FatalErrorIn("emptyFvPatchField<Type>::updateCoeffs()")
00149 << "This mesh contains patches of type empty but is not 1D or 2D\n"
00150 " by virtue of the fact that the number of faces of this\n"
00151 " empty patch is not divisible by the number of cells."
00152 << exit(FatalError);
00153 }
00154 }
00155
00156
00157
00158
00159 }
00160
00161
Copyright © 2000-2009 OpenCFD Ltd