Go to the documentation of this file.
40 namespace functionObjects
53 label nPatchFaces = 0;
86 label meshFacei =
patch.start()+patchFacei;
103 const label celli =
faceCells[patchFacei];
110 label tetFacei = meshFacei;
111 label tetPti = (startInfo.
index()+1) %
f.size();
125 start = faceCellCentres[patchFacei];
131 start = faceCellCentres[patchFacei];
192 start.setSize(nPatchFaces);
196 start[nPatchFaces++] = tp.position();
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();
#define InfoInFunction
Report an information message using Foam::Info.
tetPointRef tet(const polyMesh &mesh) const
Return the geometry corresponding to this tet.
List< List< point > > cellToSamples_
From cell to tracked end point.
scalar mag() const
The magnitude of the bounding box span.
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.
bool read(const char *buf, int32_t &val)
Same as readInt32.
static word timeName(const scalar t, const int precision=precision_)
virtual bool write()
Write the near-wall fields.
autoPtr< mapDistribute > getPatchDataMapPtr_
Map from cell based data back to patch based data.
Ostream & endl(Ostream &os)
Add newline and flush stream.
const point_type & hitPoint() const
Return hit point. Fatal if not hit.
Specialization of Foam::functionObject for an Foam::fvMesh, providing a reference to the Foam::fvMesh...
#define forAll(list, i)
Loop across all elements in list.
SubField is a Field obtained as a section of another Field, without its own allocation....
label nCells() const noexcept
Number of mesh cells.
This class describes the interaction of (usually) a face and a point. It carries the info of a succes...
bool hit() const noexcept
Is there a hit?
void calcAddressing()
Calculate addressing from cells back to patch faces.
messageStream Info
Information stream (stdout output on master, null elsewhere)
#define DebugInFunction
Report an information message using Foam::Info.
void setSize(const label n)
Alias for resize()
Class containing processor-to-processor mapping information.
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
labelHashSet patchSet_
Patches to sample.
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)
Read optional controls.
Macros for easy insertion into run-time selection tables.
virtual bool write(const token &tok)=0
Write token to stream or otherwise handle it.
Calculates a unique integer (label so might not have enough room - 2G max) for processor + local inde...
static word defaultName
The default cloud name: defaultCloud.
virtual bool end()
Called when Time::run() determines that the time-loop exits.
virtual bool execute()
Calculate the near-wall fields.
scalar distance_
Distance away from wall.
virtual bool read(const dictionary &dict)
Read the controls.
const boundBox & bounds() const
Return mesh bounding box.
const fvBoundaryMesh & boundary() const
Return reference to boundary mesh.
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
Return raw faces.
fileName path() const
Return path.
static int debug
Flag to execute debug content.
addToRunTimeSelectionTable(functionObject, ObukhovLength, dictionary)
label size() const
Global sum of localSizes.
const std::string patch
OpenFOAM patch number as a std::string.
labelListList cellToWalls_
From cell to seed patch faces.
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
Return the hit index.
fileName::Type type(const fileName &name, const bool followLink=true)
Return the file type: DIRECTORY or FILE, normally following symbolic links.
const fvMesh & mesh_
Reference to the fvMesh.
Point centre() const
Return centre (centroid)
nearWallFields(const word &name, const Time &runTime, const dictionary &dict)
Construct for given objectRegistry and dictionary.
Base cloud calls templated on particle type.
const dimensionedScalar e
Elementary charge.
A List of wordRe with additional matching capabilities.
defineTypeNameAndDebug(ObukhovLength, 0)
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for INVALID.
const Time & time() const
Return the top-level database.
A face is a list of labels corresponding to mesh vertices.
void findTetFacePt(const label celli, const point &p, label &tetFacei, label &tetPti) const
Find the tetFacei and tetPti for point p in celli.
static pointIndexHit facePoint(const polyMesh &, const label facei, const polyMesh::cellDecomposition)
Get a point on the face given a face decomposition method:
Smooth ATC in cells next to a set of patches supplied by type.
Class used to pass tracking data to the trackToFace function.
label toGlobal(const label i) const
From local to global index.