Go to the documentation of this file.
45 const VolFieldType&
fld = *(iter.val());
47 if (fieldMap_.found(
fld.name()))
49 const word& sampleFldName = fieldMap_[
fld.name()];
51 if (obr_.found(sampleFldName))
54 <<
" a field named " << sampleFldName
55 <<
" already exists on the mesh"
60 label sz = sflds.size();
82 Log <<
" created " << sflds[sz].name()
83 <<
" to sample " <<
fld.name() <<
endl;
98 Field<Type> sampledValues(getPatchDataMapPtr_().constructSize());
100 forAll(cellToWalls_, celli)
102 const labelList& cData = cellToWalls_[celli];
106 const point& samplePt = cellToSamples_[celli][i];
107 sampledValues[cData[i]] = interpolator.
interpolate(samplePt, celli);
112 getPatchDataMapPtr_().reverseDistribute
114 getPatchDataMapPtr_().constructSize(),
119 Boundary& fldBf =
fld.boundaryFieldRef();
122 label nPatchFaces = 0;
123 for (
const label patchi : patchSet_)
130 newFld[i] = sampledValues[nPatchFaces++];
148 const word& fldName = reverseFieldMap_[sflds[i].name()];
149 const VolFieldType&
fld = obr_.lookupObject<VolFieldType>(fldName);
158 sampleBoundaryField(interpolator, sflds[i]);
Abstract base class with a fat-interface to all derived classes covering all possible ways in which t...
Defines the attributes of an object for which implicit objectRegistry management is supported,...
A class for handling words, derived from Foam::string.
Ostream & endl(Ostream &os)
Add newline and flush stream.
writeOption writeOpt() const noexcept
The write option.
#define forAll(list, i)
Loop across all elements in list.
Generic templated field type.
Given cell centre values and point (vertex) values decompose into tetrahedra and linear interpolate w...
void sampleBoundaryField(const interpolationCellPoint< Type > &interpolator, GeometricField< Type, fvPatchField, volMesh > &fld) const
Override boundary fields with sampled values.
A list of pointers to objects of type <T>, with allocation/deallocation management of the pointers....
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))
Type interpolate(const cellPointWeight &cpw) const
Interpolate field for the given cellPointWeight.
This boundary condition is not designed to be evaluated; it is assmued that the value is assigned via...
virtual void rename(const word &newName)
Rename.
void sampleFields(PtrList< GeometricField< Type, fvPatchField, volMesh >> &) const
readOption readOpt() const noexcept
The read option.
A HashTable similar to std::unordered_map.
void createFields(PtrList< GeometricField< Type, fvPatchField, volMesh >> &) const
forAllConstIters(mixture.phases(), phase)
#define WarningInFunction
Report a warning using Foam::Warning.