30 template<
class GeoField>
33 const HashPtrTable<GeoField, label, Hash<label>>&
fields,
38 const GeoField& field0 = *(*
fields.begin());
45 "uniformInterpolate(" + field0.name() +
')',
46 field0.time().timeName(),
52 weights[0]*(*
fields[indices[0]])
56 for (label i = 1; i < indices.size(); ++i)
65 template<
class GeoField>
68 const IOobject& fieldIO,
69 const word& fieldName,
72 const objectRegistry& fieldsCache
76 const objectRegistry& time0Fields = fieldsCache.lookupObject
83 const GeoField& field0 = time0Fields.lookupObject
94 GeoField&
fld = tfld.ref();
96 for (label i = 1; i < times.size(); ++i)
98 const objectRegistry& timeIFields =
99 fieldsCache.lookupObject<
const objectRegistry>(times[i]);
101 const GeoField& fieldi =
102 timeIFields.lookupObject<
const GeoField>(fieldName);
104 fld += weights[i]*fieldi;
111 template<
class GeoField>
114 const IOobject& fieldIO,
115 const word& fieldName,
118 const word& registryName
121 return uniformInterpolate<GeoField>
127 fieldIO.db().subRegistry(registryName,
true)
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)
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.
multivariateSurfaceInterpolationScheme< scalar >::fieldTable fields
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
gmvFile<< "tracers "<< particles.size()<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().x()<< ' ';}gmvFile<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().y()<< ' ';}gmvFile<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().z()<< ' ';}gmvFile<< nl;for(const word &name :lagrangianScalarNames){ IOField< scalar > fld(IOobject(name, runTime.timeName(), cloud::prefix, mesh, IOobject::MUST_READ, IOobject::NO_WRITE))
List< word > wordList
List of word.
List< label > labelList
A List of labels.
A class for managing temporary objects.