Go to the documentation of this file.
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)
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();
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)
List< label > labelList
A List of labels.
A class for managing temporary objects.
Info<< "Creating field dpdt\n"<< endl;volScalarField dpdt(IOobject("dpdt", runTime.timeName(), mesh), mesh, dimensionedScalar("dpdt", p.dimensions()/dimTime, 0));Info<< "Creating field kinetic energy K\n"<< endl;volScalarField K("K", 0.5 *magSqr(U));volScalarField p_rgh(IOobject("p_rgh", runTime.timeName(), mesh, IOobject::MUST_READ, IOobject::AUTO_WRITE), mesh);p_rgh=p - rho *gh;mesh.setFluxRequired(p_rgh.name());multivariateSurfaceInterpolationScheme< scalar >::fieldTable fields
List< word > wordList
A List of words.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
gmvFile<< "tracers "<< particles.size()<< nl;forAllConstIter(Cloud< passiveParticle >, particles, iter){ gmvFile<< iter().position().x()<< ' ';}gmvFile<< nl;forAllConstIter(Cloud< passiveParticle >, particles, iter){ gmvFile<< iter().position().y()<< ' ';}gmvFile<< nl;forAllConstIter(Cloud< passiveParticle >, particles, iter){ gmvFile<< iter().position().z()<< ' ';}gmvFile<< nl;forAll(lagrangianScalarNames, i){ const word &name=lagrangianScalarNames[i];IOField< scalar > fld(IOobject(name, runTime.timeName(), cloud::prefix, mesh, IOobject::MUST_READ, IOobject::NO_WRITE))
volScalarField scalarField(fieldObject, mesh)
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)