40namespace functionObjects
53 label nPatchFaces = 0;
80 const vectorField faceCellCentres(patch.patch().faceCellCentres());
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];
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();
Macros for easy insertion into run-time selection tables.
#define addToRunTimeSelectionTable(baseType, thisType, argNames)
Add to construction table with typeName as the key.
Base cloud calls templated on particle type.
Template class for intrusive linked lists.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
void setSize(const label n)
Alias for resize()
OFstream that keeps track of vertices.
virtual Ostream & write(const char c)
Write character.
virtual const fileName & name() const
Read/write access to the name of the stream.
This class describes the interaction of (usually) a face and a point. It carries the info of a succes...
label index() const noexcept
Return the hit index.
bool hit() const noexcept
Is there a hit?
const point_type & hitPoint() const
Return hit point. Fatal if not hit.
virtual bool read()
Re-read model coefficients if they have changed.
SubField is a Field obtained as a section of another Field, without its own allocation....
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
fileName path() const
Return path.
static word timeName(const scalar t, const int precision=precision_)
void size(const label n)
Older name for setAddressableSize.
label size() const noexcept
The number of elements in the list.
scalar mag() const
The magnitude of the bounding box span.
A cloud is a registry collection of lagrangian particles.
static word defaultName
The default cloud name: defaultCloud.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Smooth ATC in cells next to a set of patches supplied by type.
A face is a list of labels corresponding to mesh vertices.
Class used to pass tracking data to the trackToFace function.
Particle class that finds cells by tracking.
Abstract base-class for Time/database function objects.
static int debug
Flag to execute debug content.
virtual bool end()
Called when Time::run() determines that the time-loop exits.
Specialization of Foam::functionObject for an Foam::fvMesh, providing a reference to the Foam::fvMesh...
const fvMesh & mesh_
Reference to the fvMesh.
Samples near-patch volume fields within an input distance range.
scalar distance_
Distance away from wall.
autoPtr< mapDistribute > getPatchDataMapPtr_
Map from cell based data back to patch based data.
List< List< point > > cellToSamples_
From cell to tracked end point.
virtual bool read(const dictionary &dict)
Read the controls.
labelListList cellToWalls_
From cell to seed patch faces.
void calcAddressing()
Calculate addressing from cells back to patch faces.
labelHashSet patchSet_
Patches to sample.
virtual bool execute()
Calculate the near-wall fields.
virtual bool write()
Write the near-wall fields.
const fvBoundaryMesh & boundary() const
Return reference to boundary mesh.
const Time & time() const
Return the top-level database.
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Calculates a unique integer (label so might not have enough room - 2G max) for processor + local inde...
label toGlobal(const label i) const
From local to global index.
label totalSize() const
Global sum of localSizes.
Class containing processor-to-processor mapping information.
static pointIndexHit facePoint(const polyMesh &, const label facei, const polyMesh::cellDecomposition)
Get a point on the face given a face decomposition method:
virtual const faceList & faces() const
Return raw faces.
const boundBox & bounds() const
Return mesh bounding box.
void findTetFacePt(const label celli, const point &p, label &tetFacei, label &tetPti) const
Find the tetFacei and tetPti for point p in celli.
label nCells() const noexcept
Number of mesh cells.
Storage and named access for the indices of a tet which is part of the decomposition of a cell.
tetPointRef tet(const polyMesh &mesh) const
Return the geometry corresponding to this tet.
Point centre() const
Return centre (centroid)
A List of wordRe with additional matching capabilities.
A class for handling words, derived from Foam::string.
#define defineTypeNameAndDebug(Type, DebugSwitch)
Define the typeName and debug information.
#define DebugInFunction
Report an information message using Foam::Info.
#define InfoInFunction
Report an information message using Foam::Info.
line< point, const point & > linePointRef
A line using referred points.
messageStream Info
Information stream (stdout output on master, null elsewhere)
fileName::Type type(const fileName &name, const bool followLink=true)
Return the file type: DIRECTORY or FILE, normally following symbolic links.
Ostream & endl(Ostream &os)
Add newline and flush stream.
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for INVALID.
constexpr char nl
The newline '\n' character (0x0a)
#define forAll(list, i)
Loop across all elements in list.