42 const VolFieldType& fld = *iter();
44 if (fieldMap_.found(fld.name()))
46 const word& sampleFldName = fieldMap_[fld.name()];
48 if (obr_.found(sampleFldName))
50 Log <<
" a field " << sampleFldName
51 <<
" already exists on the mesh." 56 label sz = sflds.size();
60 io.
readOpt() = IOobject::NO_READ;
64 sflds.set(sz,
new VolFieldType(io, fld));
66 Log <<
" created " << sflds[sz].name()
67 <<
" to sample " << fld.name() <<
endl;
82 Field<Type> sampledValues(getPatchDataMapPtr_().constructSize());
84 forAll(cellToWalls_, celli)
86 const labelList& cData = cellToWalls_[celli];
90 const point& samplePt = cellToSamples_[celli][i];
91 sampledValues[cData[i]] = interpolator.
interpolate(samplePt, celli);
96 getPatchDataMapPtr_().reverseDistribute
98 getPatchDataMapPtr_().constructSize(),
106 label nPatchFaces = 0;
116 newFld[i] = sampledValues[nPatchFaces++];
134 const word& fldName = reverseFieldMap_[sflds[i].name()];
135 const VolFieldType& fld = obr_.lookupObject<VolFieldType>(fldName);
144 sampleBoundaryField(interpolator, sflds[i]);
#define forAll(list, i)
Loop across all elements in list.
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 size(const label)
Override size to be inconsistent with allocated storage.
virtual void rename(const word &newName)
Rename.
void sampleBoundaryField(const interpolationCellPoint< Type > &interpolator, GeometricField< Type, fvPatchField, volMesh > &fld) const
Override boundary fields with sampled values.
Ostream & endl(Ostream &os)
Add newline and flush stream.
Abstract base class with a fat-interface to all derived classes covering all possible ways in which t...
Generic GeometricField class.
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))
Pre-declare SubField and related Field type.
A class for handling words, derived from string.
Type interpolate(const cellPointWeight &cpw) const
Interpolate field for the given cellPointWeight.
An STL-conforming hash table.
forAllConstIter(PtrDictionary< phaseModel >, mixture.phases(), phase)
writeOption writeOpt() const
Given cell centre values and point (vertex) values decompose into tetrahedra and linear interpolate w...
Boundary & boundaryFieldRef()
Return a reference to the boundary field.
A templated 1D list of pointers to objects of type <T>, where the size of the array is known and used...
#define Log
Report write to Foam::Info if the local log switch is true.
void createFields(PtrList< GeometricField< Type, fvPatchField, volMesh >> &) const
readOption readOpt() const
void sampleFields(PtrList< GeometricField< Type, fvPatchField, volMesh >> &) const
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...