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();
64 io.
readOpt() = IOobject::NO_READ;
69 for (
const label patchi : patchSet_)
76 sflds.set(sz,
new VolFieldType(io,
fld, fldTypes));
78 Log <<
" created " << sflds[sz].name()
79 <<
" to sample " <<
fld.name() <<
endl;
94 Field<Type> sampledValues(getPatchDataMapPtr_().constructSize());
96 forAll(cellToWalls_, celli)
98 const labelList& cData = cellToWalls_[celli];
102 const point& samplePt = cellToSamples_[celli][i];
103 sampledValues[cData[i]] = interpolator.
interpolate(samplePt, celli);
108 getPatchDataMapPtr_().reverseDistribute
110 getPatchDataMapPtr_().constructSize(),
115 Boundary& fldBf =
fld.boundaryFieldRef();
118 label nPatchFaces = 0;
119 for (
const label patchi : patchSet_)
126 newFld[i] = sampledValues[nPatchFaces++];
144 const word& fldName = reverseFieldMap_[sflds[i].name()];
145 const VolFieldType&
fld = obr_.lookupObject<VolFieldType>(fldName);
154 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.
#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.
Generic templated field type.
writeOption writeOpt() const
The write option.
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
A HashTable similar to std::unordered_map.
void createFields(PtrList< GeometricField< Type, fvPatchField, volMesh >> &) const
forAllConstIters(mixture.phases(), phase)
readOption readOpt() const
The read option.
#define WarningInFunction
Report a warning using Foam::Warning.
#define Log
Report write to Foam::Info if the local log switch is true.