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;
106 startAngle_(
dict.
lookup<scalar>(
"startAngle")),
#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)
const unitSet & lookup(const word &unitName)
Lookup and return the named unit from the table.
dimensionedScalar sin(const dimensionedScalar &ds)
vectorField pointField
pointField is a vectorField.
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
Vector< scalar > vector
A scalar version of the templated Vector.
tmp< scalarField > linearSequence01(const label n)
dimensionSet normalised(const dimensionSet &)
word name(const LagrangianState state)
Return a string representation of a Lagrangian state enumeration.
tmp< DimensionedField< scalar, GeoMesh, Field > > mag(const DimensionedField< Type, GeoMesh, PrimitiveField > &df)
tmp< DimensionedField< scalar, GeoMesh, Field > > atan2(const DimensionedField< scalar, GeoMesh, PrimitiveField1 > &dsf1, const DimensionedField< scalar, GeoMesh, PrimitiveField2 > &dsf2)
dimensionedScalar cos(const dimensionedScalar &ds)