53 toF[celli] = fromVf[adr[celli]];
79 const labelList& neighbours = cc[adr[celli]];
82 toF[celli] = fromVf[adr[celli]]*w[0];
84 for (label ni = 1; ni < w.size(); ni++)
86 toF[celli] += fromVf[neighbours[ni - 1]]*w[ni];
107 if (adr[celli] != -1)
127 if (fromVf.
mesh() != fromMesh_)
131 "meshToMesh::interpolateInternalField(Field<Type>& toF, "
132 "const GeometricField<Type, fvPatchField, volMesh>& fromVf, "
133 "meshToMesh::order ord) const"
134 ) <<
"the argument field does not correspond to the right mesh. "
135 <<
"Field size: " << fromVf.
size()
136 <<
" mesh size: " << fromMesh_.nCells()
140 if (toF.
size() != toMesh_.nCells())
144 "meshToMesh::interpolateInternalField(Field<Type>& toF, "
145 "const GeometricField<Type, fvPatchField, volMesh>& fromVf, "
146 "meshToMesh::order ord) const"
147 ) <<
"the argument field does not correspond to the right mesh. "
148 <<
"Field size: " << toF.
size()
149 <<
" mesh size: " << toMesh_.nCells()
156 mapField(toF, fromVf, cellAddressing_);
165 inverseDistanceWeights()
169 case CELL_POINT_INTERPOLATE:
175 toMesh_.cellCentres()
182 "meshToMesh::interpolateInternalField(Field<Type>& toF, "
183 "const GeometricField<Type, fvPatchField, volMesh>& fromVf, "
184 "meshToMesh::order ord) const"
185 ) <<
"unknown interpolation scheme " << ord
199 interpolateInternalField(toF, tfromVf(), ord);
212 interpolateInternalField(toVf, fromVf, ord);
218 if (cuttingPatches_.found(toPatch.
name()))
227 boundaryAddressing_[
patchi]
236 boundaryAddressing_[
patchi],
241 case CELL_POINT_INTERPOLATE:
246 boundaryAddressing_[
patchi],
254 "meshToMesh::interpolate("
255 "GeometricField<Type, fvPatchField, volMesh>& toVf, "
256 "const GeometricField<Type, fvPatchField, volMesh>& "
257 "fromVf, meshToMesh::order ord) const"
258 ) <<
"unknown interpolation scheme " << ord
264 refCast<mixedFvPatchField<Type> >
272 patchMap_.found(toPatch.
name())
273 && fromMeshPatches_.found(patchMap_.find(toPatch.
name())())
292 fromMeshPatches_.find(patchMap_.find(toPatch.
name())())()
294 boundaryAddressing_[
patchi]
323 interpolateInternalField(internalField, fromVf, ord);
327 if (fromMesh_.boundary().size() != toMesh_.boundary().size())
331 "meshToMesh::interpolate"
332 "(const GeometricField<Type, fvPatchField, volMesh>& fromVf,"
333 "meshToMesh::order ord) const"
334 ) <<
"Incompatible meshes: different number of boundaries, "
335 "only internal field may be interpolated"
342 boundaryAddressing_.size()
345 forAll (boundaryAddressing_, patchI)
353 toMesh_.boundary()[patchI],
357 boundaryAddressing_[patchI]
371 "interpolated(" + fromVf.
name() +
')',
372 toMesh_.time().timeName(),