50 void Foam::sampledSets::circleRandom::calcSamples
52 DynamicList<point>& samplingPositions,
53 DynamicList<label>& samplingSegments,
54 DynamicList<label>& samplingCells,
55 DynamicList<label>& samplingFaces
63 for (
label i = 0; i < nPoints_; ++ i)
68 const scalar r = radius_*
rndGen.scalar01();
70 const scalar c =
cos(theta),
s =
sin(theta);
72 const point pt = centre_ + r*(c*radial1 +
s*radial2);
77 samplingPositions.append(pt);
78 samplingSegments.append(i);
79 samplingCells.append(celli);
80 samplingFaces.append(-1);
86 void Foam::sampledSets::circleRandom::genSamples()
88 DynamicList<point> samplingPositions;
89 DynamicList<label> samplingSegments;
90 DynamicList<label> samplingCells;
91 DynamicList<label> samplingFaces;
101 samplingPositions.shrink();
102 samplingSegments.shrink();
103 samplingCells.shrink();
104 samplingFaces.shrink();
127 centre_(dict.
lookup(
"centre")),
129 radius_(dict.
lookup<scalar>(
"radius")),
Various (local, not parallel) searches on polyMesh; uses (demand driven) octree to search...
FvWallInfoData< WallInfo, label > 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...
Vector< scalar > vector
A scalar version of the templated Vector.
Macros for easy insertion into run-time selection tables.
circleRandom(const word &name, const polyMesh &mesh, const meshSearch &searchEngine, const dictionary &dict)
Construct from dictionary.
gmvFile<< "tracers "<< particles.size()<< nl;forAllConstIter(Cloud< passiveParticle >, particles, iter){ gmvFile<< iter().position().x()<< " ";}gmvFile<< nl;forAllConstIter(Cloud< passiveParticle >, particles, iter){ gmvFile<< iter().position().y()<< " ";}gmvFile<< nl;forAllConstIter(Cloud< passiveParticle >, particles, iter){ gmvFile<< iter().position().z()<< " ";}gmvFile<< nl;forAll(lagrangianScalarNames, i){ word name=lagrangianScalarNames[i];IOField< scalar > s(IOobject(name, runTime.timeName(), cloud::prefix, mesh, IOobject::MUST_READ, IOobject::NO_WRITE))
Form normalised(const VectorSpace< Form, Cmpt, Ncmpts > &vs)
dimensionedScalar cos(const dimensionedScalar &ds)
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.
addToRunTimeSelectionTable(sampledSet, arcUniform, word)
dimensionedScalar sin(const dimensionedScalar &ds)
Vector< Cmpt > perpendicular(const Vector< Cmpt > &v)
vector point
Point is a vector.
Mesh consisting of general polyhedral cells.
defineTypeNameAndDebug(arcUniform, 0)
ITstream & lookup(const word &, bool recursive=false, bool patternMatch=true) const
Find and return an entry data stream.