Go to the documentation of this file.
42 const vfType&
fld = *iter();
44 if (fieldMap_.found(
fld.name()))
46 const word& sampleFldName = fieldMap_[
fld.name()];
48 if (obr_.found(sampleFldName))
51 <<
" a field named " << sampleFldName
52 <<
" already exists on the mesh"
57 label sz = sflds.size();
61 io.
readOpt() = IOobject::NO_READ;
65 sflds.set(sz,
new vfType(io,
fld));
68 <<
" created " << sflds[sz].name() <<
" to sample "
84 Field<Type> sampledValues(getPatchDataMapPtr_().constructSize());
86 forAll(cellToWalls_, cellI)
88 const labelList& cData = cellToWalls_[cellI];
92 const point& samplePt = cellToSamples_[cellI][i];
93 sampledValues[cData[i]] = interpolator.
interpolate(samplePt, cellI);
98 getPatchDataMapPtr_().reverseDistribute
100 getPatchDataMapPtr_().constructSize(),
105 label nPatchFaces = 0;
108 label patchI = iter.key();
115 newFld[i] = sampledValues[nPatchFaces++];
133 const word& fldName = reverseFieldMap_[sflds[i].name()];
134 const vfType&
fld = obr_.lookupObject<vfType>(fldName);
143 sampleBoundaryField(interpolator, sflds[i]);
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
A class for handling words, derived from string.
#define forAll(list, i)
Loop across all elements in list.
Ostream & endl(Ostream &os)
Add newline and flush stream.
writeOption writeOpt() const
forAllConstIter(PtrDictionary< phaseModel >, mixture.phases(), phase)
void createFields(PtrList< GeometricField< Type, fvPatchField, volMesh > > &) const
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
void sampleFields(PtrList< GeometricField< Type, fvPatchField, volMesh > > &) const
readOption readOpt() const
Given cell centre values and point (vertex) values decompose into tetrahedra and linear interpolate w...
A templated 1D list of pointers to objects of type <T>, where the size of the array is known and used...
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))
Type interpolate(const cellPointWeight &cpw) const
Interpolate field for the given cellPointWeight.
virtual void rename(const word &newName)
Rename.
An STL-conforming hash table.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
void sampleBoundaryField(const interpolationCellPoint< Type > &interpolator, GeometricField< Type, fvPatchField, volMesh > &fld) const
Override boundary fields with sampled values.
Generic GeometricField class.
#define WarningInFunction
Report a warning using Foam::Warning.