48 toF[celli] = fromVf[adr[celli]];
68 const labelList& overlapCells = adr[celli];
74 label fromCelli = overlapCells[i];
75 f += fromVf[fromCelli]*w[i];
100 const labelList& neighbours = cc[adr[celli]];
103 Type
f = fromVf[adr[celli]]*w[0];
105 for (
label ni = 1; ni < w.size(); ni++)
107 f += fromVf[neighbours[ni - 1]]*w[ni];
130 if (adr[celli] != -1)
132 toF[celli] = interpolator.
interpolate(centres[celli], adr[celli]);
146 if (fromVf.
mesh() != fromMesh_)
149 <<
"the argument field does not correspond to the right mesh. " 150 <<
"Field size: " << fromVf.
size()
151 <<
" mesh size: " << fromMesh_.nCells()
155 if (toF.
size() != toMesh_.nCells())
158 <<
"the argument field does not correspond to the right mesh. " 159 <<
"Field size: " << toF.
size()
160 <<
" mesh size: " << toMesh_.nCells()
167 mapField(toF, fromVf, cellAddressing_);
177 inverseDistanceWeights()
181 case CELL_POINT_INTERPOLATE:
188 toMesh_.cellCentres()
193 case CELL_VOLUME_WEIGHT:
209 <<
"unknown interpolation scheme " << ord
223 interpolateInternalField(toF, tfromVf(), ord);
236 interpolateInternalField(toVf, fromVf, ord);
245 if (cuttingPatches_.found(toPatch.
name()))
255 boundaryAddressing_[patchi]
266 boundaryAddressing_[patchi],
272 case CELL_POINT_INTERPOLATE:
278 boundaryAddressing_[patchi],
283 case CELL_VOLUME_WEIGHT:
290 <<
"unknown interpolation scheme " << ord
296 refCast<mixedFvPatchField<Type>>
299 ).refValue() = toVfBf[
patchi];
304 patchMap_.found(toPatch.
name())
305 && fromMeshPatches_.found(patchMap_.find(toPatch.
name())())
313 fromMeshPatches_.find(patchMap_.find(toPatch.
name())())()
315 boundaryAddressing_[
patchi]
345 interpolateInternalField(internalField, fromVf, ord);
349 if (fromMesh_.boundary().size() != toMesh_.boundary().size())
352 <<
"Incompatible meshes: different number of boundaries, " 353 "only internal field may be interpolated" 360 boundaryAddressing_.size()
371 toMesh_.boundary()[
patchi],
375 boundaryAddressing_[
patchi]
389 "interpolated(" + fromVf.
name() +
')',
390 toMesh_.time().timeName(),
bool isA(const Type &t)
Check if a dynamic_cast to typeid is possible.
#define forAll(list, i)
Loop across all elements in list.
const word & name() const
Return name.
errorManipArg< error, int > exit(error &err, const int errNo=1)
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
const Boundary & boundaryField() const
Return const-reference to the boundary field.
void size(const label)
Override size to be inconsistent with allocated storage.
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
This boundary condition provides a base class for 'mixed' type boundary conditions, i.e. conditions that mix fixed value and patch-normal gradient conditions.
Abstract base class with a fat-interface to all derived classes covering all possible ways in which t...
order
Enumeration specifying required accuracy.
void interpolateInternalField(Field< Type > &, const GeometricField< Type, fvPatchField, volMesh > &, order=INTERPOLATE) const
Interpolate internal volume field.
Generic GeometricField class.
A topoSetSource to select the cells from another cellSet.
const dimensionSet & dimensions() const
Return dimensions.
Pre-declare SubField and related Field type.
void mapField(Field< Type > &, const Field< Type > &, const labelList &adr) const
Map field.
Type interpolate(const cellPointWeight &cpw) const
Interpolate field for the given cellPointWeight.
const vectorField & Cf() const
Return face centres.
const Mesh & mesh() const
Return mesh.
static tmp< GeometricField< Type, fvsPatchField, surfaceMesh > > interpolate(const GeometricField< Type, fvPatchField, volMesh > &tvf, const surfaceScalarField &faceFlux, Istream &schemeData)
Interpolate field onto faces using scheme given by Istream.
Given cell centre values and point (vertex) values decompose into tetrahedra and linear interpolate w...
Patch-field interpolation class.
Boundary & boundaryFieldRef()
Return a reference to the boundary field.
A templated 1D list of pointers to objects of type <T>, where the size of the array is known and used...
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
void interpolateField(Field< Type > &, const GeometricField< Type, fvPatchField, volMesh > &, const labelList &adr, const scalarListList &weights) const
Interpolate field using inverse-distance weights.
virtual const word & name() const
Return name.
void interpolate(GeometricField< Type, fvPatchField, volMesh > &, const GeometricField< Type, fvPatchField, volMesh > &, order=INTERPOLATE) const
Interpolate volume field.
A class for managing temporary objects.
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...