68 label segmenti = 0, samplei = 0, pointi0 =
labelMax, pointi = 0;
70 while (pointi < points.
size())
73 for (
label pointj = pointi0; pointj < pointi; ++ pointj)
75 distance +=
mag(points[pointj + 1] - points[pointj]);
87 searchEngine.
findCell(points[pointi])
99 if (procAndCelli.
second() == -1)
138 particles.
first()->store(particles, td);
142 particles.
move(particles, td, rootGreat);
149 samplingPositions.
size() - samplingSegments.
size(),
158 const label samplei0 = samplei;
162 pointi += samplei - samplei0;
170 void Foam::sampledSets::points::calcSamplesUnordered
180 const point& pt = points_[i];
185 samplingPositions.
append(pt);
186 samplingSegments.
append(i);
187 samplingCells.
append(celli);
194 void Foam::sampledSets::points::calcSamplesOrdered
218 void Foam::sampledSets::points::genSamples()
248 samplingPositions.
shrink();
249 samplingDistances.
shrink();
250 samplingSegments.
shrink();
289 points_(dict.
lookup(
"points")),
290 ordered_(dict.
lookup(
"ordered"))
Template class for intrusive linked lists.
Various (local, not parallel) searches on polyMesh; uses (demand driven) octree to search...
Particle for generating line-type sampled sets.
#define forAll(list, i)
Loop across all elements in list.
A list of keyword definitions, which are a keyword followed by any number of values (e...
void size(const label)
Override size to be inconsistent with allocated storage.
static int myProcNo(const label communicator=0)
Number of this process (starting from masterNo() = 0)
const dimensionedScalar b
Wien displacement law constant: default SI units: [m K].
scalar distance(const vector &p1, const vector &p2)
virtual ~points()
Destructor.
Macros for easy insertion into run-time selection tables.
vectorField pointField
pointField is a vectorField.
void addParticle(ParticleType *pPtr)
Transfer particle to cloud.
An ordered pair of two objects of type <T> with first() and second() elements.
A 1D vector of objects of type <T> that resizes itself as necessary to accept the new objects...
Holds list of sampling points which is filled at construction time. Various implementations of this b...
label findCell(const point &location, const label seedCelli=-1, const bool useTreeSearch=true) const
Find cell containing location.
A class for handling words, derived from string.
A Cloud of sampledSet particles.
DynamicList< T, SizeInc, SizeMult, SizeDiv > & append(const T &)
Append an element at the end of the list.
static const label labelMax
static void calcSamples(const polyMesh &mesh, const meshSearch &searchEngine, const pointField &points, DynamicList< point > &samplingPositons, DynamicList< scalar > &samplingDistances, DynamicList< label > &samplingSegments, DynamicList< label > &samplingCells, DynamicList< label > &samplingFaces)
Calculate all the sampling points.
addToRunTimeSelectionTable(sampledSet, arcUniform, word)
DynamicList< T, SizeInc, SizeMult, SizeDiv > & shrink()
Shrink the allocated space to the number of elements used.
const Type & second() const
Return second.
void move(TrackCloudType &cloud, typename ParticleType::trackingData &td, const scalar trackTime)
Move the particles.
points(const word &name, const polyMesh &mesh, const meshSearch &searchEngine, const dictionary &dict)
Construct from dictionary.
dimensioned< scalar > mag(const dimensioned< Type > &)
T returnReduce(const T &Value, const BinaryOp &bop, const int tag=Pstream::msgType(), const label comm=UPstream::worldComm)
Mesh consisting of general polyhedral cells.
T * first()
Return the first entry.
defineTypeNameAndDebug(arcUniform, 0)
const Type & first() const
Return first.
ITstream & lookup(const word &, bool recursive=false, bool patternMatch=true) const
Find and return an entry data stream.