44 bool Foam::sampledSets::sphereRandom::calcSamples
46 DynamicList<point>& samplingPositions,
48 DynamicList<label>& samplingSegments,
49 DynamicList<label>& samplingCells,
50 DynamicList<label>& samplingFaces
55 randomGenerator
rndGen(261782,
true);
57 for (
label i = 0; i < nPoints_; ++ i)
68 const point pt = centre_ + dpt;
69 const label celli = searchEngine.findCell(pt);
73 samplingPositions.append(pt);
74 samplingSegments.append(i);
75 samplingCells.append(celli);
76 samplingFaces.append(-1);
95 centre_(
dict.lookup(
"centre")),
96 radius_(
dict.lookup<scalar>(
"radius")),
Macros for easy insertion into run-time selection tables.
static Form uniform(const Cmpt &s)
Return a VectorSpace with all elements = s.
A list of keywords followed by any number of values (e.g. words and numbers) or sub-dictionaries.
static const meshSearch & New(const polyMesh &mesh, const pointInCellShapes=pointInCellShapes::tets)
Lookup or construct from mesh and cell decomposition option.
Mesh consisting of general polyhedral cells.
Holds list of sampling points which is filled at construction time. Various implementations of this b...
const polyMesh & mesh() const
Access the mesh.
Random samples within a sphere.
virtual ~sphereRandom()
Destructor.
sphereRandom(const word &name, const polyMesh &mesh, 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.
Foam::fvMesh mesh(Foam::IOobject(regionName, runTime.name(), runTime, Foam::IOobject::MUST_READ), false)
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.
vector point
Point is a vector.
Vector< scalar > vector
A scalar version of the templated Vector.
void sqr(LagrangianPatchField< typename outerProduct< Type, Type >::type > &f, const LagrangianPatchField< Type > &f1)
word name(const LagrangianState state)
Return a string representation of a Lagrangian state enumeration.
void magSqr(LagrangianPatchField< scalar > &f, const LagrangianPatchField< Type > &f1)
randomGenerator rndGen(653213)