29 template<
class GeoField>
32 const HashPtrTable<GeoField,
label, Hash<label>>&
fields,
37 const GeoField& field0 = *(*
fields.begin());
46 "uniformInterpolate(" + field0.name() +
')',
47 field0.time().timeName(),
52 weights[0]*(*
fields[indices[0]])
55 GeoField& fld = tfld();
57 for (
label i = 1; i < indices.size(); ++i)
59 fld += weights[i]*(*
fields[indices[i]]);
66 template<
class GeoField>
69 const IOobject& fieldIO,
70 const word& fieldName,
73 const objectRegistry& fieldsCache
77 const objectRegistry& time0Fields = fieldsCache.lookupObject
84 const GeoField& field0 = time0Fields.lookupObject
94 tmp<GeoField> tfld(
new GeoField(fieldIO, weights[0]*field0));
95 GeoField& fld = tfld.ref();
97 for (
label i = 1; i < times.size(); ++i)
99 const objectRegistry& timeIFields = fieldsCache.lookupObject
106 const GeoField& fieldi = timeIFields.lookupObject
114 fld += weights[i]*fieldi;
121 template<
class GeoField>
124 const IOobject& fieldIO,
125 const word& fieldName,
128 const word& registryName
131 return uniformInterpolate<GeoField>
137 fieldIO.db().subRegistry(registryName,
true)
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
tmp< GeoField > uniformInterpolate(const HashPtrTable< GeoField, label, Hash< label >> &fields, const labelList &indices, const scalarField &weights)
Interpolate selected fields (given by indices and corresponding weights)
multivariateSurfaceInterpolationScheme< scalar >::fieldTable fields
List< label > labelList
A List of labels.
volScalarField scalarField(fieldObject, mesh)
List< word > wordList
A List of words.
A class for managing temporary objects.