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();
71 calculatedFvPatchScalarField::typeName
75 Log <<
" created " << sflds[sz].name()
76 <<
" to sample " << fld.name() <<
endl;
91 Field<Type> sampledValues(getPatchDataMapPtr_().constructSize());
93 forAll(cellToWalls_, celli)
95 const labelList& cData = cellToWalls_[celli];
99 const point& samplePt = cellToSamples_[celli][i];
100 sampledValues[cData[i]] = interpolator.
interpolate(samplePt, celli);
105 getPatchDataMapPtr_().reverseDistribute
107 getPatchDataMapPtr_().constructSize(),
115 label nPatchFaces = 0;
125 newFld[i] = sampledValues[nPatchFaces++];
143 const word& fldName = reverseFieldMap_[sflds[i].name()];
144 const VolFieldType& fld = obr_.lookupObject<VolFieldType>(fldName);
153 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.
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)
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
void sampleFields(PtrList< GeometricField< Type, fvPatchField, volMesh >> &) const
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...