49 void Foam::sampledSets::arcUniform::calcSamples
58 const vector axis1 = radial_ - (radial_ & normal_)*normal_;
59 const vector axis2 = normal_ ^ axis1;
60 const scalar radius =
mag(axis1);
62 for (
label i = 0; i < nPoints_; ++ i)
64 const scalar t = scalar(i)/(nPoints_ - 1);
65 const scalar theta = (1 - t)*startAngle_ + t*endAngle_;
66 const scalar
c =
cos(theta),
s =
sin(theta);
68 const point pt = centre_ + c*axis1 +
s*axis2;
74 samplingCells.
append(celli);
76 samplingSegments.
append(samplingSegments.
size());
77 samplingCurveDist.
append(radius*theta);
83 void Foam::sampledSets::arcUniform::genSamples()
104 samplingSegments.
shrink();
105 samplingCurveDist.
shrink();
129 centre_(dict.
lookup(
"centre")),
132 startAngle_(dict.
lookup<scalar>(
"startAngle")),
133 endAngle_(dict.
lookup<scalar>(
"endAngle")),
134 nPoints_(dict.
lookup<scalar>(
"nPoints"))
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...
Unit conversion functions.
void size(const label)
Override size to be inconsistent with allocated storage.
const dimensionedScalar & c
Speed of light in a vacuum.
Macros for easy insertion into run-time selection tables.
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)
A 1D vector of objects of type <T> that resizes itself as necessary to accept the new objects...
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.
DynamicList< T, SizeInc, SizeMult, SizeDiv > & append(const T &)
Append an element at the end of the list.
addToRunTimeSelectionTable(sampledSet, arcUniform, word)
dimensionedScalar sin(const dimensionedScalar &ds)
DynamicList< T, SizeInc, SizeMult, SizeDiv > & shrink()
Shrink the allocated space to the number of elements used.
virtual bool write()
Sample and write.
Set of sets to sample. Call sampledSets.write() to sample&write files.
dimensioned< scalar > mag(const dimensioned< Type > &)
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.