39 template<
class FromPatch,
class ToPatch>
47 if (pf.
size() != fromPatch_.nPoints())
50 <<
"given field does not correspond to patch. Patch size: " 51 << fromPatch_.nPoints() <<
" field size: " << pf.
size()
56 auto& result = tresult.ref();
58 const auto& fromPatchLocalFaces = fromPatch_.localFaces();
68 if (addr[pointi] > -1)
71 fromPatchLocalFaces[addr[pointi]];
75 result[pointi] += curWeights[wI]*pf[hitFacePoints[wI]];
84 template<
class FromPatch,
class ToPatch>
98 template<
class FromPatch,
class ToPatch>
106 if (
ff.size() != fromPatch_.size())
109 <<
"given field does not correspond to patch. Patch size: " 110 << fromPatch_.size() <<
" field size: " <<
ff.size()
115 auto& result = tresult.ref();
117 const labelListList& fromPatchFaceFaces = fromPatch_.faceFaces();
127 if (addr[facei] > -1)
130 fromPatchFaceFaces[addr[facei]];
133 result[facei] +=
ff[addr[facei]]*curWeights[0];
135 for (label wI = 1; wI < curWeights.size(); wI++)
137 result[facei] +=
ff[hitFaceFaces[wI - 1]]*curWeights[wI];
146 template<
class FromPatch,
class ToPatch>
void size(const label n)
Older name for setAddressableSize.
error FatalError
Error stream (stdout output on all processes), with additional 'FOAM FATAL ERROR' header text and sta...
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
tmp< DimensionedField< TypeR, GeoMesh > > New(const tmp< DimensionedField< TypeR, GeoMesh >> &tf1, const word &name, const dimensionSet &dimensions, const bool initCopy=false)
Global function forwards to reuseTmpDimensionedField::New.
tmp< Field< Type > > pointInterpolate(const Field< Type > &pf) const
Interpolate point field.
A field of fields is a PtrList of fields with reference counting.
#define forAll(list, i)
Loop across all elements in list.
Generic templated field type.
errorManip< error > abort(error &err)
void clear() const noexcept
If object pointer points to valid object: delete object and set pointer to nullptr.
A class for managing temporary objects.
tmp< Field< Type > > faceInterpolate(const Field< Type > &pf) const
Interpolate face field.
const FieldField< fvPatchField, Type > & ff(const FieldField< fvPatchField, Type > &bf)
static constexpr const zero Zero
Global zero (0)