34 template<
class Type,
class CombineOp>
49 cop(toF[celli], fromVf[adr[celli]]);
57 template<
class Type,
class CombineOp>
70 const labelList& overlapCells = adr[celli];
76 label fromCelli = overlapCells[i];
77 f += fromVf[fromCelli]*w[i];
84 template<
class Type,
class CombineOp>
101 if (adr[celli] != -1)
103 const labelList& neighbours = cc[adr[celli]];
106 Type
f = fromVf[adr[celli]]*w[0];
108 for (
label ni = 1; ni < w.size(); ni++)
110 f += fromVf[neighbours[ni - 1]]*w[ni];
119 template<
class Type,
class CombineOp>
134 if (adr[celli] != -1)
150 template<
class Type,
class CombineOp>
159 if (fromVf.
mesh() != fromMesh_)
162 <<
"the argument field does not correspond to the right mesh. " 163 <<
"Field size: " << fromVf.
size()
164 <<
" mesh size: " << fromMesh_.nCells()
168 if (toF.
size() != toMesh_.nCells())
171 <<
"the argument field does not correspond to the right mesh. " 172 <<
"Field size: " << toF.
size()
173 <<
" mesh size: " << toMesh_.nCells()
180 mapField(toF, fromVf, cellAddressing_, cop);
190 inverseDistanceWeights(),
195 case CELL_POINT_INTERPOLATE:
202 toMesh_.cellCentres(),
208 case CELL_VOLUME_WEIGHT:
225 <<
"unknown interpolation scheme " << ord
231 template<
class Type,
class CombineOp>
240 interpolateInternalField(toF, tfromVf(), ord, cop);
245 template<
class Type,
class CombineOp>
254 interpolateInternalField(toVf, fromVf, ord, cop);
263 if (cuttingPatches_.found(toPatch.
name()))
273 boundaryAddressing_[patchi],
285 boundaryAddressing_[patchi],
292 case CELL_POINT_INTERPOLATE:
298 boundaryAddressing_[patchi],
304 case CELL_VOLUME_WEIGHT:
311 <<
"unknown interpolation scheme " << ord
317 refCast<mixedFvPatchField<Type>>
320 ).refValue() = toVfBf[
patchi];
325 patchMap_.found(toPatch.
name())
326 && fromMeshPatches_.found(patchMap_.find(toPatch.
name())())
334 fromMeshPatches_.find(patchMap_.find(toPatch.
name())())()
336 boundaryAddressing_[
patchi],
344 template<
class Type,
class CombineOp>
358 template<
class Type,
class CombineOp>
369 interpolateInternalField(internalField, fromVf, ord, cop);
373 if (fromMesh_.boundary().size() != toMesh_.boundary().size())
376 <<
"Incompatible meshes: different number of boundaries, " 377 "only internal field may be interpolated" 384 boundaryAddressing_.size()
395 toMesh_.boundary()[
patchi],
399 boundaryAddressing_[
patchi]
413 "interpolated(" + fromVf.
name() +
')',
414 toMesh_.time().timeName(),
430 template<
class Type,
class CombineOp>
bool isA(const Type &t)
Check if a dynamic_cast to typeid is possible.
#define forAll(list, i)
Loop across all elements in list.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
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.
void mapField(Field< Type > &, const Field< Type > &, const labelList &adr, const CombineOp &cop) const
Map field.
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.
Generic GeometricField class.
void interpolateField(Field< Type > &, const GeometricField< Type, fvPatchField, volMesh > &, const labelList &adr, const scalarListList &weights, const CombineOp &cop) const
Interpolate field using inverse-distance weights.
void interpolateInternalField(Field< Type > &, const GeometricField< Type, fvPatchField, volMesh > &, order=INTERPOLATE, const CombineOp &cop=eqOp< Type >()) const
Interpolate internal volume field.
const word & name() const
Return name.
A topoSetSource to select the cells from another cellSet.
const dimensionSet & dimensions() const
Return dimensions.
Pre-declare SubField and related Field type.
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...
A class for managing temporary objects.
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
void interpolate(GeometricField< Type, fvPatchField, volMesh > &, const GeometricField< Type, fvPatchField, volMesh > &, order=INTERPOLATE, const CombineOp &cop=eqOp< Type >()) const
Interpolate volume field.