Go to the documentation of this file.
58 Info<<
"patchCloudSet : sampling on patches :" <<
endl;
71 Info<<
" " << pp.
name() <<
" size " << pp.size() <<
endl;
100 bb.
min() -=
point(ROOTVSMALL, ROOTVSMALL, ROOTVSMALL);
101 bb.
max() +=
point(ROOTVSMALL, ROOTVSMALL, ROOTVSMALL);
119 (void)
mesh().tetBasePtIs();
125 forAll(sampleCoords_, sampleI)
127 const point& sample = sampleCoords_[sampleI];
145 nearest[sampleI].second().first() =
Foam::sqr(GREAT);
146 nearest[sampleI].second().second() = Pstream::myProcNo();
153 nearest[sampleI].second().first() =
magSqr
158 nearest[sampleI].second().second() = Pstream::myProcNo();
165 Pstream::listCombineScatter(nearest);
168 if (debug && Pstream::master())
176 Info<<
"Dumping mapping as lines from supplied points to"
177 <<
" nearest patch face to file " << str.
name() <<
endl;
183 if (nearest[i].first().hit())
189 str <<
"l " << vertI-1 <<
' ' << vertI <<
nl;
202 if (nearest[sampleI].second().second() == Pstream::myProcNo())
207 samplingCells.
append(
mesh().faceOwner()[faceI]);
208 samplingFaces.
append(faceI);
209 samplingSegments.
append(0);
210 samplingCurveDist.
append(1.0 * sampleI);
217 if (Pstream::master())
219 samplingPts.
append(sampleCoords_[sampleI]);
222 samplingSegments.
append(0);
223 samplingCurveDist.
append(1.0 * sampleI);
251 samplingSegments.
shrink();
252 samplingCurveDist.
shrink();
275 const scalar searchDist
279 sampleCoords_(sampleCoords),
281 searchDist_(searchDist)
Holds list of sampling points which is filled at construction time. Various implementations of this b...
Simple random number generator.
const Field< PointType > & points() const
Return reference to global points.
A class for handling words, derived from string.
Various (local, not parallel) searches on polyMesh; uses (demand driven) octree to search.
const point & max() const
Maximum describing the bounding box.
#define forAll(list, i)
Loop across all elements in list.
void writeOBJ(Ostream &os, label &vertI, const tetPoints &tet)
A 1D vector of objects of type <T> that resizes itself as necessary to accept the new objects.
addToRunTimeSelectionTable(ensightPart, ensightPartCells, istream)
void calcSamples(DynamicList< point > &samplingPts, DynamicList< label > &samplingCells, DynamicList< label > &samplingFaces, DynamicList< label > &samplingSegments, DynamicList< scalar > &samplingCurveDist) const
Samples all points in sampleCoords.
Standard boundBox + extra functionality for use in octree.
ITstream & lookup(const word &, bool recursive=false, bool patternMatch=true) const
Find and return an entry data stream.
const polyBoundaryMesh & boundaryMesh() const
Return boundary mesh.
Ostream & endl(Ostream &os)
Add newline and flush stream.
labelList patchFaces(const polyBoundaryMesh &patches, const wordList &names)
Mesh consisting of general polyhedral cells.
patchCloudSet(const word &name, const polyMesh &mesh, const meshSearch &searchEngine, const word &axis, const List< point > &sampleCoords, const labelHashSet &patchSet, const scalar searchDist)
Construct from components.
forAllConstIter(PtrDictionary< phaseModel >, mixture.phases(), phase)
This class describes the interaction of (usually) a face and a point. It carries the info of a succes...
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
virtual ~patchCloudSet()
Destructor.
treeBoundBox extend(Random &, const scalar s) const
Return slightly wider bounding box.
A patch is a list of labels that address the faces in the global face list.
Non-pointer based hierarchical recursive searching.
DynamicList< T, SizeInc, SizeMult, SizeDiv > & shrink()
Shrink the allocated space to the number of elements used.
const point & min() const
Minimum describing the bounding box.
void genSamples()
Uses calcSamples to obtain samples. Copies them into *this.
A list of keyword definitions, which are a keyword followed by any number of values (e....
Macros for easy insertion into run-time selection tables.
label start() const
Return start label of this patch in the polyMesh face list.
DynamicList< T, SizeInc, SizeMult, SizeDiv > & append(const T &)
Append an element at the end of the list.
dimensioned< Type > max(const dimensioned< Type > &, const dimensioned< Type > &)
dimensionedSymmTensor sqr(const dimensionedVector &dv)
void setSamples(const List< point > &samplingPts, const labelList &samplingCells, const labelList &samplingFaces, const labelList &samplingSegments, const scalarList &samplingCurveDist)
Sets sample data.
bool readScalar(const char *buf, doubleScalar &s)
Read whole of buf as a scalar. Return true if succesful.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
Encapsulation of data needed to search for faces.
const dimensionedScalar e
Elementary charge.
fileName path(UMean.rootPath()/UMean.caseName()/"graphs"/UMean.instance())
A bounding box defined in terms of the points at its extremities.
void findNearest(const label nodeI, const linePointRef &ln, treeBoundBox &tightest, label &nearestShapeI, point &linePoint, point &nearestPoint, const FindNearestOp &fnOp) const
Find nearest point to line.
const fileName & name() const
Return the name of the stream.
A 2-tuple for storing two objects of different types.
vector point
Point is a vector.
labelHashSet patchSet(const UList< wordRe > &patchNames, const bool warnNotFound=true, const bool usePatchGroups=true) const
Return the set of patch IDs corresponding to the given names.
const labelList & meshPoints() const
Return labelList of mesh points in patch.
defineTypeNameAndDebug(combustionModel, 0)
dimensioned< Type > min(const dimensioned< Type > &, const dimensioned< Type > &)
const word & name() const
Return name.
dimensioned< scalar > magSqr(const dimensioned< Type > &)
cachedRandom rndGen(label(0), -1)
word name(const complex &)
Return a string representation of a complex.