48 Log <<
" a field " << sampleFldName
49 <<
" already exists on the mesh."
54 label sz = sflds.size();
69 calculatedFvPatchScalarField::typeName
73 Log <<
" created " << sflds[sz].name()
74 <<
" to sample " <<
fld.name() <<
endl;
89 Field<Type> sampledValues(getPatchDataMapPtr_().constructSize());
91 forAll(cellToWalls_, celli)
93 const labelList& cData = cellToWalls_[celli];
97 const point& samplePt = cellToSamples_[celli][i];
98 sampledValues[cData[i]] = interpolator.
interpolate(samplePt, celli);
103 getPatchDataMapPtr_().reverseDistribute
105 getPatchDataMapPtr_().constructSize(),
110 Boundary& fldBf =
fld.boundaryFieldRef();
113 label nPatchFaces = 0;
123 newFld[i] = sampledValues[nPatchFaces++];
139 const word& fldName = reverseFieldMap_[sflds[i].name()];
149 sampleBoundaryField(interpolator, sflds[i]);
#define forAll(list, i)
Loop across all elements in list.
#define forAllConstIter(Container, container, iter)
Iterate across all elements in the container object of type.
Pre-declare SubField and related Field type.
Generic GeometricField class.
An STL-conforming hash table.
bool found(const Key &) const
Return true if hashedEntry is found in table.
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
void size(const label)
Override size to be inconsistent with allocated storage.
A templated 1D list of pointers to objects of type <T>, where the size of the array is known and used...
const word & name() const
Return const reference to name.
const Time & time_
Reference to time.
const fvMesh & mesh_
Reference to the fvMesh.
void sampleFields(PtrList< VolField< Type >> &) const
void createFields(PtrList< VolField< Type >> &) const
void sampleBoundaryField(const interpolationCellPoint< Type > &interpolator, VolField< Type > &fld) const
Override boundary fields with sampled values.
HashTable< word > fieldMap_
From original field to sampled result.
const objectRegistry & obr_
Reference to the region objectRegistry.
Abstract base class with a fat-interface to all derived classes covering all possible ways in which t...
Given cell centre values and point (vertex) values decompose into tetrahedra and linear interpolate w...
Type interpolate(const cellPointWeight &cpw) const
Interpolate field for the given cellPointWeight.
HashTable< const Type * > lookupClass(const bool strict=false) const
Lookup and return all objects of the given Type.
A class for handling words, derived from string.
gmvFile<< "tracers "<< particles.size()<< nl;{ pointField positions(particles.size());label particlei=0;forAllConstIter(Cloud< passiveParticle >, particles, iter) { positions[particlei++]=iter().position(mesh);} for(i=0;i< pTraits< point >::nComponents;i++) { forAll(positions, particlei) { gmvFile<< component(positions[particlei], i)<< ' ';} gmvFile<< nl;}}forAll(lagrangianScalarNames, i){ const word &name=lagrangianScalarNames[i];IOField< scalar > fld(IOobject(name, runTime.name(), cloud::prefix, mesh, IOobject::MUST_READ, IOobject::NO_WRITE))
#define Log
Report write to Foam::Info if the local log switch is true.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Ostream & endl(Ostream &os)
Add newline and flush stream.