55 " Foam::patchProbes::findElements(const fvMesh&)" 56 ) <<
" Unknown patch name " 71 bndFaces[i] = pp.
start() + i;
76 overallBb = overallBb.extend(rndGen, 1
e-4);
77 overallBb.min() -=
point(ROOTVSMALL, ROOTVSMALL, ROOTVSMALL);
78 overallBb.max() +=
point(ROOTVSMALL, ROOTVSMALL, ROOTVSMALL);
95 forAll(probeLocations(), probeI)
97 const point sample = probeLocations()[probeI];
99 scalar span = boundaryTree.
bb().
mag();
109 info = boundaryTree.findNearest
120 if (isA<emptyPolyPatch>(bm[patchi]))
124 " Foam::patchProbes::findElements(const fvMesh&)" 126 <<
" The sample point: " << sample
127 <<
" belongs to " << patchi
128 <<
" which is an empty patch. This is not permitted. " 129 <<
" This sample will not be included " 148 nearest[probeI]= sampleInfo;
160 Info<<
"patchProbes::findElements" <<
" : " <<
endl;
163 label procI = nearest[sampleI].second().second();
164 label localI = nearest[sampleI].
first().index();
166 Info<<
" " << sampleI <<
" coord:"<< operator[](sampleI)
167 <<
" found on processor:" << procI
168 <<
" in local cell/face:" << localI
169 <<
" with fc:" << nearest[sampleI].
first().rawPoint() <<
endl;
175 elementList_.setSize(nearest.
size(), -1);
182 elementList_[sampleI] = nearest[sampleI].
first().index();
190 Foam::patchProbes::patchProbes
195 const bool loadFromFiles
198 probes(name, obr, dict, loadFromFiles)
204 elementList_.
clear();
219 if (this->size() && prepare())
221 sampleAndWrite(scalarFields_);
222 sampleAndWrite(vectorFields_);
223 sampleAndWrite(sphericalTensorFields_);
224 sampleAndWrite(symmTensorFields_);
225 sampleAndWrite(tensorFields_);
227 sampleAndWriteSurfaceFields(surfaceScalarFields_);
228 sampleAndWriteSurfaceFields(surfaceVectorFields_);
229 sampleAndWriteSurfaceFields(surfaceSphericalTensorFields_);
230 sampleAndWriteSurfaceFields(surfaceSymmTensorFields_);
231 sampleAndWriteSurfaceFields(surfaceTensorFields_);
237 dict.
lookup(
"patchName") >> patchName_;
const Type2 & second() const
Return second.
Simple random number generator.
cachedRandom rndGen(label(0),-1)
A 2-tuple for storing two objects of different types.
virtual ~patchProbes()
Destructor.
Mesh data needed to do the Finite Volume discretisation.
This class describes the interaction of (usually) a face and a point. It carries the info of a succes...
vector point
Point is a vector.
scalar mag() const
The magnitude of the bounding box span.
const labelList & tetBasePtIs() const
Return the tetBasePtIs.
dimensioned< scalar > magSqr(const dimensioned< Type > &)
virtual void read(const dictionary &)
Read.
const Type & shapes() const
Reference to shape.
const treeBoundBox & bb() const
Top bounding box.
A class for handling words, derived from string.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Standard boundBox + extra functionality for use in octree.
void size(const label)
Override size to be inconsistent with allocated storage.
errorManipArg< error, int > exit(error &err, const int errNo=1)
PointIndexHit< point > pointIndexHit
const Type1 & first() const
Return first.
bool hit() const
Is there a hit.
Encapsulation of data needed to search for faces.
A list of keyword definitions, which are a keyword followed by any number of values (e...
virtual void read(const dictionary &)
Read the probes.
T & first()
Return the first element of the list.
label index() const
Return index.
Set of locations to sample.
A patch is a list of labels that address the faces in the global face list.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
void clear()
Clear the list, i.e. set size to zero.
const double e
Elementary charge.
Ostream & endl(Ostream &os)
Add newline and flush stream.
#define WarningIn(functionName)
Report a warning using Foam::Warning.
static void listCombineGather(const List< commsStruct > &comms, List< T > &Value, const CombineOp &cop, const int tag, const label comm)
const labelList & faceLabels() const
static void listCombineScatter(const List< commsStruct > &comms, List< T > &Value, const int tag, const label comm)
Scatter data. Reverse of combineGather.
virtual void findElements(const fvMesh &)
Find elements containing patchProbes.
label whichPatch(const label faceIndex) const
Return patch index for a given face label.
static int myProcNo(const label communicator=0)
Number of this process (starting from masterNo() = 0)
Istream and Ostream manipulators taking arguments.
const polyBoundaryMesh & boundaryMesh() const
Return boundary mesh.
#define FatalErrorIn(functionName)
Report an error message using Foam::FatalError.
Non-pointer based hierarchical recursive searching.
label start() const
Return start label of this patch in the polyMesh face list.
ITstream & lookup(const word &, bool recursive=false, bool patternMatch=true) const
Find and return an entry data stream.
Registry of regIOobjects.
bool read(const char *, int32_t &)
dimensionedSymmTensor sqr(const dimensionedVector &dv)
label findPatchID(const word &patchName) const
Find patch index given a name.
virtual void write()
Public members.
const Field< PointType > & points() const
Return reference to global points.
defineTypeNameAndDebug(combustionModel, 0)
const vectorField & faceCentres() const