49 void Foam::sampledSets::boxUniform::calcSamples
51 DynamicList<point>& samplingPositions,
52 DynamicList<label>& samplingSegments,
53 DynamicList<label>& samplingCells,
54 DynamicList<label>& samplingFaces
59 for (
label j = 0; j < nPoints_.
y(); ++ j)
61 for (
label i = 0; i < nPoints_.
x(); ++ i)
74 samplingPositions.append(pt);
75 samplingSegments.append
77 i + j*nPoints_.
x() +
k*nPoints_.
x()*nPoints_.
y()
79 samplingCells.append(celli);
80 samplingFaces.append(-1);
88 void Foam::sampledSets::boxUniform::genSamples()
90 DynamicList<point> samplingPositions;
91 DynamicList<label> samplingSegments;
92 DynamicList<label> samplingCells;
93 DynamicList<label> samplingFaces;
103 samplingPositions.shrink();
104 samplingSegments.shrink();
105 samplingCells.shrink();
106 samplingFaces.shrink();
129 box_(
dict.lookup(
"box")),
130 nPoints_(
dict.lookup(
"nPoints"))
Macros for easy insertion into run-time selection tables.
const point & min() const
Minimum point defining the bounding box.
const point & max() const
Maximum point defining the bounding box.
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.
Holds list of sampling points which is filled at construction time. Various implementations of this b...
const meshSearch & searchEngine() const
Access the search engine.
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.
vector point
Point is a vector.
Vector< scalar > vector
A scalar version of the templated Vector.
dimensioned< Type > cmptMultiply(const dimensioned< Type > &, const dimensioned< Type > &)
dimensioned< Type > cmptDivide(const dimensioned< Type > &, const dimensioned< Type > &)