50 void Foam::sampledSets::sphereRandom::calcSamples
52 DynamicList<point>& samplingPts,
53 DynamicList<label>& samplingCells,
54 DynamicList<label>& samplingFaces,
55 DynamicList<label>& samplingSegments,
56 DynamicList<scalar>& samplingCurveDist
61 for (
label i = 0; i < nPoints_; ++ i)
72 const point pt = centre_ + dpt;
77 samplingPts.append(pt);
78 samplingCells.append(celli);
79 samplingFaces.append(-1);
80 samplingSegments.append(0);
81 samplingCurveDist.append(scalar(i));
87 void Foam::sampledSets::sphereRandom::genSamples()
90 DynamicList<point> samplingPts;
91 DynamicList<label> samplingCells;
92 DynamicList<label> samplingFaces;
93 DynamicList<label> samplingSegments;
94 DynamicList<scalar> samplingCurveDist;
105 samplingPts.shrink();
106 samplingCells.shrink();
107 samplingFaces.shrink();
108 samplingSegments.shrink();
109 samplingCurveDist.shrink();
133 centre_(dict.
lookup(
"centre")),
Various (local, not parallel) searches on polyMesh; uses (demand driven) octree to search...
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
A list of keyword definitions, which are a keyword followed by any number of values (e...
dimensionedSymmTensor sqr(const dimensionedVector &dv)
Vector< scalar > vector
A scalar version of the templated Vector.
Macros for easy insertion into run-time selection tables.
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.
bool readScalar(const char *buf, doubleScalar &s)
Read whole of buf as a scalar. Return true if successful.
label readLabel(Istream &is)
addToRunTimeSelectionTable(sampledSet, arcUniform, word)
dimensioned< scalar > magSqr(const dimensioned< Type > &)
vector point
Point is a vector.
virtual bool write()
Sample and write.
static Vector< scalar > uniform(const scalar &s)
Return a VectorSpace with all elements = s.
Mesh consisting of general polyhedral cells.
defineTypeNameAndDebug(arcUniform, 0)
sphereRandom(const word &name, const polyMesh &mesh, const meshSearch &searchEngine, const dictionary &dict)
Construct from dictionary.
ITstream & lookup(const word &, bool recursive=false, bool patternMatch=true) const
Find and return an entry data stream.