48 bool Foam::sampledSets::arcUniform::calcSamples
50 DynamicList<point>& samplingPositions,
51 DynamicList<scalar>& samplingDistances,
52 DynamicList<label>& samplingSegments,
53 DynamicList<label>& samplingCells,
54 DynamicList<label>& samplingFaces
58 const vector axis1 = radial_ - (radial_ & normal_)*normal_;
59 const vector axis2 = normal_ ^ axis1;
60 const scalar radius =
mag(axis1);
64 const scalarField theta((1 - ts)*startAngle_ + ts*endAngle_);
81 forAll(samplingPositions, i)
83 const vector v = samplingPositions[i] - centre_;
84 const scalar theta =
atan2(v & axis2, v & axis1);
85 samplingDistances[i] = radius*theta;
103 centre_(
dict.lookup(
"centre")),
106 startAngle_(
dict.lookup<scalar>(
"startAngle")),
107 endAngle_(
dict.lookup<scalar>(
"endAngle")),
108 nPoints_(
dict.lookup<scalar>(
"nPoints"))
#define forAll(list, i)
Loop across all elements in list.
Macros for easy insertion into run-time selection tables.
A list of keywords followed by any number of values (e.g. words and numbers) or sub-dictionaries.
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.
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)
gmvFile<< "tracers "<< particles.size()<< nl;forAllConstIter(lagrangian::Cloud< passiveParticle >, particles, iter){ gmvFile<< iter().position().x()<< " ";}gmvFile<< nl;forAllConstIter(lagrangian::Cloud< passiveParticle >, particles, iter){ gmvFile<< iter().position().y()<< " ";}gmvFile<< nl;forAllConstIter(lagrangian::Cloud< passiveParticle >, particles, iter){ gmvFile<< iter().position().z()<< " ";}gmvFile<< nl;forAll(lagrangianScalarNames, i){ word name=lagrangianScalarNames[i];IOField< scalar > s(IOobject(name, runTime.name(), lagrangian::cloud::prefix, mesh, IOobject::MUST_READ, IOobject::NO_WRITE))
const dimensionedScalar c
Speed of light in a vacuum.
defineTypeNameAndDebug(arcUniform, 0)
addToRunTimeSelectionTable(sampledSet, arcUniform, word)
dimensionedScalar sin(const dimensionedScalar &ds)
vectorField pointField
pointField is a vectorField.
List< scalar > scalarList
A List of scalars.
void mag(LagrangianPatchField< scalar > &f, const LagrangianPatchField< Type > &f1)
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
dimensionedScalar atan2(const dimensionedScalar &x, const dimensionedScalar &y)
Vector< scalar > vector
A scalar version of the templated Vector.
dimensionSet normalised(const dimensionSet &)
word name(const LagrangianState state)
Return a string representation of a Lagrangian state enumeration.
labelList identityMap(const label len)
Create identity map (map[i] == i) of given length.
dimensionedScalar cos(const dimensionedScalar &ds)