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(),
51 weights[0]*(*
fields[indices[0]])
55 for (label i = 1; i < indices.size(); ++i)
64 template<
class GeoField>
67 const IOobject& fieldIO,
68 const word& fieldName,
71 const objectRegistry& fieldsCache
75 const objectRegistry& time0Fields = fieldsCache.lookupObject
82 const GeoField& field0 = time0Fields.lookupObject
93 GeoField&
fld = tfld.ref();
95 for (label i = 1; i < times.size(); ++i)
97 const objectRegistry& timeIFields =
98 fieldsCache.lookupObject<
const objectRegistry>(times[i]);
100 const GeoField& fieldi =
101 timeIFields.lookupObject<
const GeoField>(fieldName);
103 fld += weights[i]*fieldi;
110 template<
class GeoField>
113 const IOobject& fieldIO,
114 const word& fieldName,
117 const word& registryName
120 return uniformInterpolate<GeoField>
126 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.