68 label segmenti = 0, samplei = 0, pointi0 =
labelMax, pointi = 0;
69 label nLocateBoundaryHits = 0;
74 for (
label pointj = pointi0; pointj < pointi; ++ pointj)
93 a.second() != -1 && b.second() != -1
94 ? a.first() < b.first() ? a : b
95 : a.second() != -1 ? a : b;
100 if (procAndCelli.
second() == -1)
140 particles.
first()->store(particles, td);
144 particles.
move(particles, td);
151 samplingPositions.
size() - samplingSegments.
size(),
160 const label samplei0 = samplei;
164 pointi += samplei - samplei0;
172 void Foam::sampledSets::points::calcSamplesUnordered
182 const point& pt = points_[i];
183 const label celli = searchEngine().findCell(pt);
187 samplingPositions.
append(pt);
188 samplingSegments.
append(i);
189 samplingCells.
append(celli);
196 void Foam::sampledSets::points::calcSamplesOrdered
198 DynamicList<point>& samplingPositions,
199 DynamicList<scalar>& samplingDistances,
200 DynamicList<label>& samplingSegments,
201 DynamicList<label>& samplingCells,
202 DynamicList<label>& samplingFaces
220 void Foam::sampledSets::points::genSamples()
222 DynamicList<point> samplingPositions;
223 DynamicList<scalar> samplingDistances;
224 DynamicList<label> samplingSegments;
225 DynamicList<label> samplingCells;
226 DynamicList<label> samplingFaces;
250 samplingPositions.shrink();
251 samplingDistances.shrink();
252 samplingSegments.shrink();
253 samplingCells.shrink();
254 samplingFaces.shrink();
291 points_(
dict.lookup(
"points")),
292 ordered_(
dict.lookup<bool>(
"ordered"))
#define forAll(list, i)
Loop across all elements in list.
Macros for easy insertion into run-time selection tables.
void addParticle(ParticleType *pPtr)
Transfer particle to cloud.
void move(TrackCloudType &cloud, typename ParticleType::trackingData &td)
Move the particles.
A 1D vector of objects of type <T> that resizes itself as necessary to accept the new objects.
DynamicList< T, SizeInc, SizeMult, SizeDiv > & append(const T &)
Append an element at the end of the list.
Template class for intrusive linked lists.
void size(const label)
Override size to be inconsistent with allocated storage.
const Type & second() const
Return second.
const Type & first() const
Return first.
T * first()
Return the first entry.
static int myProcNo(const label communicator=0)
Number of this process (starting from masterNo() = 0)
label size() const
Return the size.
A list of keyword definitions, which are a keyword followed by any number of values (e....
Various (local, not parallel) searches on polyMesh; uses (demand driven) octree to search.
label findCell(const point &location, const label seedCelli=-1, const bool useTreeSearch=true) const
Find cell containing location.
Mesh consisting of general polyhedral cells.
A Cloud of sampledSet particles.
Particle for generating line-type sampled sets.
Holds list of sampling points which is filled at construction time. Various implementations of this b...
const meshSearch & searchEngine() const
Access the search engine.
const polyMesh & mesh() const
Access the mesh.
Specified point samples. Optionally ordered into a continuous path. Ordering is an optimisation; it e...
virtual ~points()
Destructor.
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.
points(const word &name, const polyMesh &mesh, const meshSearch &searchEngine, const dictionary &dict)
Construct from dictionary.
Set of sets to sample. Call sampledSets.write() to sample&write files.
A class for handling words, derived from string.
defineTypeNameAndDebug(arcUniform, 0)
addToRunTimeSelectionTable(sampledSet, arcUniform, word)
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
word name(const bool)
Return a word representation of a bool.
vectorField pointField
pointField is a vectorField.
T returnReduce(const T &Value, const BinaryOp &bop, const int tag=Pstream::msgType(), const label comm=UPstream::worldComm)
dimensioned< scalar > mag(const dimensioned< Type > &)
static const label labelMax