50 void Foam::sampledSets::arcUniform::calcSamples
60 const vector axis1 = radial_ - (radial_ & normal_)*normal_;
61 const vector axis2 = normal_ ^ axis1;
62 const scalar radius =
mag(axis1);
66 const scalarField theta((1 - ts)*startAngle_ + ts*endAngle_);
84 forAll(samplingPositions, i)
86 const vector v = samplingPositions[i] - centre_;
87 const scalar theta =
atan2(v & axis2, v & axis1);
88 samplingDistances[i] = radius*theta;
93 void Foam::sampledSets::arcUniform::genSamples()
110 samplingPositions.
shrink();
111 samplingDistances.
shrink();
112 samplingSegments.
shrink();
138 centre_(dict.
lookup(
"centre")),
141 startAngle_(dict.
lookup<scalar>(
"startAngle")),
142 endAngle_(dict.
lookup<scalar>(
"endAngle")),
143 nPoints_(dict.
lookup<scalar>(
"nPoints"))
Various (local, not parallel) searches on polyMesh; uses (demand driven) octree to search...
#define forAll(list, i)
Loop across all elements in list.
A list of keyword definitions, which are a keyword followed by any number of values (e...
Unit conversion functions.
labelList identity(const label len)
Create identity map (map[i] == i) of given length.
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...
A class for handling words, derived from string.
List< scalar > scalarList
A List of scalars.
static void calcSamples(const polyMesh &mesh, const meshSearch &searchEngine, const pointField &points, DynamicList< point > &samplingPositons, DynamicList< scalar > &samplingDistances, DynamicList< label > &samplingSegments, DynamicList< label > &samplingCells, DynamicList< label > &samplingFaces)
Calculate all the sampling points.
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.
dimensionedScalar atan2(const dimensionedScalar &x, const dimensionedScalar &y)
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.