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 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;
176 operator[](samplei) = nearest[samplei].first().rawPoint();
185 label proci = nearest[samplei].second().second();
186 label locali = nearest[samplei].first().index();
188 Info<<
" " << samplei <<
" coord:"<< operator[](samplei)
189 <<
" found on processor:" << proci
190 <<
" in local face:" << locali
191 <<
" with location:" << nearest[samplei].first().rawPoint()
210 processor_[sampleI] = nearest[sampleI].second().second();
214 faceList_[sampleI] = nearest[sampleI].first().index();
225 Foam::patchProbes::patchProbes
230 const bool loadFromFiles,
247 if (this->size() && prepare())
249 sampleAndWrite(scalarFields_);
250 sampleAndWrite(vectorFields_);
251 sampleAndWrite(sphericalTensorFields_);
252 sampleAndWrite(symmTensorFields_);
253 sampleAndWrite(tensorFields_);
255 sampleAndWriteSurfaceFields(surfaceScalarFields_);
256 sampleAndWriteSurfaceFields(surfaceVectorFields_);
257 sampleAndWriteSurfaceFields(surfaceSphericalTensorFields_);
258 sampleAndWriteSurfaceFields(surfaceSymmTensorFields_);
259 sampleAndWriteSurfaceFields(surfaceTensorFields_);
270 patchNames_.resize(1);
addToRunTimeSelectionTable(decompositionMethod, kahipDecomp, dictionary)
virtual void findElements(const fvMesh &)
Find elements containing patchProbes.
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 (uses stdout - output is on the master only)
A patch is a list of labels that address the faces in the global face list.
word name(const complex &c)
Return string representation of complex.
tmp< Field< Type > > sample(const GeometricField< Type, fvPatchField, volMesh > &) const
Sample a volume field at all locations.
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,...
const Field< point_type > & points() const
Return reference to global points.
Macros for easy insertion into run-time selection tables.
Mesh data needed to do the Finite Volume discretisation.
List< Key > sortedToc() const
The table of contents (the keys) in sorted order.
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.
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.
void setSize(const label newSize)
Alias for resize(const label)
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.
labelList processor_
Processor holding the cell or face (-1 if point not found.