73 internalField_(ptf.internalField_),
75 patchType_(ptf.patchType_)
89 patchType_(ptf.patchType_)
98 return patch_.boundaryMesh().mesh()();
107 if (patchType_.size())
118 return patchInternalField(internalField());
123 template<
class Type1>
130 if (iF.
size() != internalField().size())
134 "tmp<Field<Type1> > pointPatchField<"
136 "patchInternalField(const Field<Type1>& iF) const"
137 ) <<
"given internal field does not correspond to the mesh. "
138 <<
"Field size: " << iF.
size()
139 <<
" mesh size: " << internalField().size()
144 const labelList& meshPoints = patch().meshPoints();
149 forAll (meshPoints, pointI)
151 values[pointI] = iF[meshPoints[pointI]];
159 template<
class Type1>
167 if (iF.
size() != internalField().size())
171 "void pointPatchField<Type>::"
172 "addToInternalField("
173 "Field<Type1>& iF, const Field<Type1>& iF) const"
174 ) <<
"given internal field does not correspond to the mesh. "
175 <<
"Field size: " << iF.
size()
176 <<
" mesh size: " << internalField().size()
180 if (pF.
size() != size())
184 "void pointPatchField<Type>::"
185 "addToInternalField("
186 "Field<Type1>& iF, const Field<Type1>& iF) const"
187 ) <<
"given patch field does not correspond to the mesh. "
188 <<
"Field size: " << pF.
size()
189 <<
" mesh size: " << size()
194 const labelList& mp = patch().meshPoints();
198 iF[mp[pointI]] += pF[pointI];
204 template<
class Type1>
213 if (iF.
size() != internalField().size())
217 "void pointPatchField<Type>::"
218 "setInInternalField("
219 "Field<Type1>& iF, const Field<Type1>& iF) const"
220 ) <<
"given internal field does not correspond to the mesh. "
221 <<
"Field size: " << iF.
size()
222 <<
" mesh size: " << internalField().size()
230 "void pointPatchField<Type>::"
231 "setInInternalField("
232 "Field<Type1>& iF, const Field<Type1>& iF) const"
233 ) <<
"given patch field does not correspond to the meshPoints. "
234 <<
"Field size: " << pF.
size()
235 <<
" meshPoints size: " << size()
239 forAll (meshPoints, pointI)
241 iF[meshPoints[pointI]] = pF[pointI];
247 template<
class Type1>
254 setInInternalField(iF, pF, patch().meshPoints());
281 os.check(
"Ostream& operator<<(Ostream&, const pointPatchField<Type>&)");