Go to the documentation of this file.
40 namespace functionObjects
53 label nPatchFaces = 0;
60 globalIndex globalWalls(nPatchFaces);
65 Cloud<findCellParticle> cloud
69 IDLList<findCellParticle>()
86 label meshFacei =
patch.start()+patchFacei;
103 const label celli = faceCells[patchFacei];
110 label tetFacei = meshFacei;
111 label tetPti = (startInfo.index()+1) %
f.size();
113 start = startInfo.hitPoint();
116 tetIndices tet(celli, tetFacei, tetPti);
118 (1.0 - 1
e-6)*startInfo.hitPoint()
119 + 1
e-6*tet.tet(
mesh_).centre();
125 start = faceCellCentres[patchFacei];
131 start = faceCellCentres[patchFacei];
149 globalWalls.toGlobal(nPatchFaces)
169 for (
const findCellParticle& tp : cloud)
192 start.setSize(nPatchFaces);
194 for (
const findCellParticle& tp : cloud)
196 start[nPatchFaces++] = tp.position();
201 cloud.move(cloud, td, maxTrackLen);
205 List<Map<label>> compactMap;
265 dict.readEntry(
"fields", fieldSet_);
266 dict.readEntry(
"distance", distance_);
269 mesh_.boundaryMesh().patchSet
282 reverseFieldMap_.clear();
288 fieldMap_.resize(2*fieldSet_.size());
289 reverseFieldMap_.resize(2*fieldSet_.size());
292 const word& fldName = fieldSet_[seti].first();
293 const word& sampleFldName = fieldSet_[seti].second();
295 fieldMap_.insert(fldName, sampleFldName);
296 reverseFieldMap_.insert(sampleFldName, fldName);
300 <<
": Sampling " << fieldMap_.size() <<
" fields" <<
endl;
318 && vSpheretf_.empty()
324 <<
": Creating " << fieldMap_.size() <<
" fields" <<
endl;
328 createFields(vSpheretf_);
329 createFields(vSymmtf_);
337 <<
" Sampling fields to " << time_.timeName()
342 sampleFields(vSpheretf_);
343 sampleFields(vSymmtf_);
354 Log <<
" Writing sampled fields to " << time_.timeName()
367 vSpheretf_[i].write();
List< label > labelList
A List of labels.
vectorField pointField
pointField is a vectorField.
tetPointRef tet(const polyMesh &mesh) const
List< List< point > > cellToSamples_
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
A class for handling words, derived from Foam::string.
OFstream that keeps track of vertices.
virtual const fileName & name() const
bool read(const char *buf, int32_t &val)
static word timeName(const scalar t, const int precision=precision_)
autoPtr< mapDistribute > getPatchDataMapPtr_
Samples near-patch volume fields within an input distance range.
Ostream & endl(Ostream &os)
const point_type & hitPoint() const
virtual Ostream & write(const char c)
Specialization of Foam::functionObject for an Foam::fvMesh, providing a reference to the Foam::fvMesh...
Abstract base-class for Time/database function objects.
Field< vector > vectorField
Specialisation of Field<T> for vector.
SubField is a Field obtained as a section of another Field, without its own allocation....
label nCells() const noexcept
This class describes the interaction of (usually) a face and a point. It carries the info of a succes...
bool hit() const noexcept
Generic templated field type.
void setSize(const label n)
Class containing processor-to-processor mapping information.
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Particle class that finds cells by tracking.
Template class for intrusive linked lists.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
virtual bool read(const dictionary &dict)
Macros for easy insertion into run-time selection tables.
virtual bool write(const token &tok)=0
Calculates a unique integer (label so might not have enough room - 2G max) for processor + local inde...
virtual bool read(const dictionary &dict)
const boundBox & bounds() const
const fvBoundaryMesh & boundary() const
Storage and named access for the indices of a tet which is part of the decomposition of a cell.
A cloud is a registry collection of lagrangian particles.
line< point, const point & > linePointRef
A line using referred points.
virtual const faceList & faces() const
PointIndexHit< point > pointIndexHit
A PointIndexHit for 3D points.
addToRunTimeSelectionTable(functionObject, ObukhovLength, dictionary)
labelListList cellToWalls_
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
label index() const noexcept
fileName::Type type(const fileName &name, const bool followLink=true)
nearWallFields(const word &name, const Time &runTime, const dictionary &dict)
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
Base cloud calls templated on particle type.
const dimensionedScalar e
A List of wordRe with additional matching capabilities.
defineTypeNameAndDebug(ObukhovLength, 0)
word name(const expressions::valueTypeCode typeCode)
const Time & time() const
SubField< Type > subField
A face is a list of labels corresponding to mesh vertices.
vector point
Point is a vector.
UList< label > labelUList
A UList of labels.
void findTetFacePt(const label celli, const point &p, label &tetFacei, label &tetPti) const
static pointIndexHit facePoint(const polyMesh &, const label facei, const polyMesh::cellDecomposition)
Smooth ATC in cells next to a set of patches supplied by type.
label toGlobal(const label i) const