Go to the documentation of this file.
55 (void)
mesh.tetBasePtIs();
67 nFaces += bm[patchIDs[i]].size();
82 bndFaces[nFaces++] = pp.
start()+i;
83 const face&
f = pp[i];
114 const scalar span = boundaryTree.
bb().mag();
127 label facei = boundaryTree.
shapes().faceLabels()[info.
index()];
131 if (isA<emptyPolyPatch>(bm[patchi]))
134 <<
" The sample point: " <<
sample
135 <<
" belongs to " << patchi
136 <<
" which is an empty patch. This is not permitted. "
137 <<
" This sample will not be included "
162 nearest[probei]= sampleInfo;
178 operator[](samplei) = nearest[samplei].first().rawPoint();
186 label proci = nearest[samplei].second().second();
187 label locali = nearest[samplei].first().index();
189 Info<<
" " << samplei <<
" coord:"<< operator[](samplei)
190 <<
" found on processor:" << proci
191 <<
" in local face:" << locali
192 <<
" with location:" << nearest[samplei].first().rawPoint()
215 processor_[sampleI] = nearest[sampleI].second().second();
220 faceList_[sampleI] = nearest[sampleI].first().index();
236 Foam::patchProbes::patchProbes
241 const bool loadFromFiles,
258 if (this->size() && prepare())
260 sampleAndWrite(scalarFields_);
261 sampleAndWrite(vectorFields_);
262 sampleAndWrite(sphericalTensorFields_);
263 sampleAndWrite(symmTensorFields_);
264 sampleAndWrite(tensorFields_);
266 sampleAndWriteSurfaceFields(surfaceScalarFields_);
267 sampleAndWriteSurfaceFields(surfaceVectorFields_);
268 sampleAndWriteSurfaceFields(surfaceSphericalTensorFields_);
269 sampleAndWriteSurfaceFields(surfaceSymmTensorFields_);
270 sampleAndWriteSurfaceFields(surfaceTensorFields_);
281 patchNames_.resize(1);
const Field< point_type > & points() const noexcept
Return reference to global points.
addToRunTimeSelectionTable(decompositionMethod, kahipDecomp, dictionary)
virtual void findElements(const fvMesh &)
Find elements containing patchProbes.
labelList patchIDList_
Patch IDs on which the new probes are located.
treeBoundBox extend(Random &rndGen, const scalar s) const
Return slightly wider bounding box.
#define InfoInFunction
Report an information message using Foam::Info.
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
A class for handling words, derived from Foam::string.
static Vector< Cmpt > uniform(const Cmpt &s)
Return a VectorSpace with all elements = s.
A polyBoundaryMesh is a polyPatch list with additional search methods and registered IO.
virtual bool read(const dictionary &)
Read.
static const boundBox invertedBox
A large inverted boundBox: min/max == +/- ROOTVGREAT.
Standard boundBox with extra functionality for use in octree.
bool read(const char *buf, int32_t &val)
Same as readInt32.
const Type & shapes() const
Reference to shape.
Ostream & endl(Ostream &os)
Add newline and flush stream.
const point_type & hitPoint() const
Return hit point. Fatal if not hit.
const point & max() const
Maximum describing the bounding box.
T get(const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
const point & min() const
Minimum describing the bounding box.
#define forAll(list, i)
Loop across all elements in list.
dimensioned< typename typeOfMag< Type >::type > magSqr(const dimensioned< Type > &dt)
void reduce(const List< UPstream::commsStruct > &comms, T &Value, const BinaryOp &bop, const int tag, const label comm)
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?
virtual bool read(const dictionary &)
Read the probes.
messageStream Info
Information stream (stdout output on master, null elsewhere)
A patch is a list of labels that address the faces in the global face list.
void setSize(const label n)
Alias for resize()
Non-pointer based hierarchical recursive searching.
Istream and Ostream manipulators taking arguments.
labelList faceList_
Faces to be probed.
labelList elementList_
Cells to be probed (obtained from the locations)
label whichPatch(const label faceIndex) const
Return patch index for a given face label.
Set of locations to sample.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
pointField oldPoints_
Original probes location (only used for patchProbes)
Macros for easy insertion into run-time selection tables.
Mesh data needed to do the Finite Volume discretisation.
label start() const
Return start label of this patch in the polyMesh face list.
const treeBoundBox & bb() const
Top bounding box.
static void listCombineGather(const List< commsStruct > &comms, List< T > &Value, const CombineOp &cop, const int tag, const label comm)
dimensionedSymmTensor sqr(const dimensionedVector &dv)
PointIndexHit< point > pointIndexHit
A PointIndexHit for 3D points.
static int myProcNo(const label communicator=worldComm)
Number of this process (starting from masterNo() = 0)
static int debug
Flag to execute debug content.
virtual const pointField & probeLocations() const
Return locations to probe.
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.
Encapsulation of data needed to search for faces.
const dimensionedScalar e
Elementary charge.
labelHashSet patchSet(const UList< wordRe > &patchNames, const bool warnNotFound=true, const bool useGroups=true) const
Return the set of patch IDs corresponding to the given names.
Reads fields from the time directories and adds them to the mesh database for further post-processing...
const T2 & second() const noexcept
Return second.
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for INVALID.
A face is a list of labels corresponding to mesh vertices.
A 2-tuple for storing two objects of dissimilar types. The container is similar in purpose to std::pa...
static void listCombineScatter(const List< commsStruct > &comms, List< T > &Value, const int tag, const label comm)
Scatter data. Reverse of combineGather.
wordRes patchNames_
Patches to sample.
defineTypeNameAndDebug(combustionModel, 0)
virtual bool write()
Public members.
const T1 & first() const noexcept
Return first.
#define WarningInFunction
Report a warning using Foam::Warning.
bool readIfPresent(const word &keyword, T &val, enum keyType::option matchOpt=keyType::REGEX) const
void add(const boundBox &bb)
Extend to include the second box.
Minimal example by using system/controlDict.functions:
labelList processor_
Processor holding the cell or face (-1 if point not found.