29 template<
class GeoField>
32 const HashPtrTable<GeoField,
label, Hash<label>>&
fields,
37 const GeoField& field0 = *(*
fields.begin());
44 "uniformInterpolate(" + field0.name() +
')',
45 weights[0]*(*
fields[indices[0]])
48 GeoField& fld = tfld();
50 for (
label i = 1; i < indices.size(); ++i)
52 fld += weights[i]*(*
fields[indices[i]]);
59 template<
class GeoField>
62 const IOobject& fieldIO,
63 const word& fieldName,
66 const objectRegistry& fieldsCache
70 const objectRegistry& time0Fields = fieldsCache.lookupObject
77 const GeoField& field0 = time0Fields.lookupObject
87 tmp<GeoField> tfld(
GeoField::New(fieldIO.name(), weights[0]*field0));
88 GeoField& fld = tfld.ref();
90 for (
label i = 1; i < times.size(); ++i)
92 const objectRegistry& timeIFields = fieldsCache.lookupObject
99 const GeoField& fieldi = timeIFields.lookupObject
107 fld += weights[i]*fieldi;
114 template<
class GeoField>
117 const IOobject& fieldIO,
118 const word& fieldName,
121 const word& registryName
124 return uniformInterpolate<GeoField>
130 fieldIO.db().subRegistry(registryName,
true)
FvWallInfoData< WallInfo, label > label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
autoPtr< CompressibleMomentumTransportModel > New(const volScalarField &rho, const volVectorField &U, const surfaceScalarField &phi, const viscosity &viscosity)
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)
List< label > labelList
A List of labels.
volScalarField scalarField(fieldObject, mesh)
List< word > wordList
A List of words.
Info<< "Reading field p_rgh\"<< endl;volScalarField p_rgh(IOobject("p_rgh", runTime.timeName(), mesh, IOobject::MUST_READ, IOobject::AUTO_WRITE), mesh);pressureReference pressureReference(p, p_rgh, pimple.dict(), thermo.incompressible());mesh.schemes().setFluxRequired(p_rgh.name());hydrostaticInitialisation(p_rgh, p, rho, U, gh, ghf, pRef, thermo, pimple.dict());Info<< "Creating field dpdt\"<< endl;volScalarField dpdt(IOobject("dpdt", runTime.timeName(), mesh), mesh, dimensionedScalar(p.dimensions()/dimTime, 0));Info<< "Creating field kinetic energy K\"<< endl;volScalarField K("K", 0.5 *magSqr(U));dimensionedScalar initialMass=fvc::domainIntegrate(rho);multivariateSurfaceInterpolationScheme< scalar >::fieldTable fields
A class for managing temporary objects.