49void Foam::circleSet::calcSamples
51 DynamicList<point>& samplingPts,
52 DynamicList<label>& samplingCells,
53 DynamicList<label>& samplingFaces,
54 DynamicList<label>& samplingSegments,
55 DynamicList<scalar>& samplingCurveDist
62 samplingPts.append(startPoint_);
63 samplingCells.append(celli);
64 samplingFaces.append(-1);
65 samplingSegments.append(0);
66 samplingCurveDist.append(0.0);
71 <<
"Unable to find cell at point id " << 0
72 <<
" at location " << startPoint_ <<
endl;
81 vector axis1 = startPoint_ - origin_;
82 const scalar radius =
mag(axis1);
84 if (
mag(axis1 & circleAxis_) > SMALL)
87 <<
"Vector defined by (startPoint - origin) not orthogonal to "
88 <<
"circleAxis:" <<
nl
89 <<
" startPoint - origin = " << axis1 <<
nl
90 <<
" circleAxis = " << circleAxis_ <<
nl
96 scalar theta = dTheta_;
100 axis1 =
normalised(axis1*cosAlpha + (axis1^circleAxis_)*sinAlpha);
101 point pt = origin_ + radius*axis1;
107 samplingPts.append(pt);
108 samplingCells.append(celli);
109 samplingFaces.append(-1);
110 samplingSegments.append(nPoint);
111 samplingCurveDist.append(radius*
degToRad(theta));
118 <<
"Unable to find cell at point id " << nPoint
119 <<
" at location " << pt <<
endl;
126void Foam::circleSet::genSamples()
129 DynamicList<point> samplingPts;
130 DynamicList<label> samplingCells;
131 DynamicList<label> samplingFaces;
132 DynamicList<label> samplingSegments;
133 DynamicList<scalar> samplingCurveDist;
144 samplingPts.shrink();
145 samplingCells.shrink();
146 samplingFaces.shrink();
147 samplingSegments.shrink();
148 samplingCurveDist.shrink();
153 std::move(samplingPts),
154 std::move(samplingCells),
155 std::move(samplingFaces),
156 std::move(samplingSegments),
157 std::move(samplingCurveDist)
177 const point& startPoint,
183 circleAxis_(circleAxis),
184 startPoint_(startPoint),
202 startPoint_(
dict.get<
point>(
"startPoint")),
203 dTheta_(
dict.get<scalar>(
"dTheta"))
Macros for easy insertion into run-time selection tables.
#define addToRunTimeSelectionTable(baseType, thisType, argNames)
Add to construction table with typeName as the key.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
Samples along a circular path.
virtual point getRefPoint(const List< point > &pts) const
Get reference point.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Various (local, not parallel) searches on polyMesh; uses (demand driven) octree to search.
label findCell(const point &location, const label seedCelli=-1, const bool useTreeSearch=true) const
Find cell containing location.
Mesh consisting of general polyhedral cells.
Holds list of sampling points which is filled at construction time. Various implementations of this b...
const meshSearch & searchEngine() const noexcept
A Vector of values with scalar precision, where scalar is float/double depending on the compilation f...
A class for handling words, derived from Foam::string.
#define defineTypeNameAndDebug(Type, DebugSwitch)
Define the typeName and debug information.
#define WarningInFunction
Report a warning using Foam::Warning.
quaternion normalised(const quaternion &q)
Return the normalised (unit) quaternion of the given quaternion.
dimensionedScalar sin(const dimensionedScalar &ds)
messageStream Info
Information stream (stdout output on master, null elsewhere)
vector point
Point is a vector.
Ostream & endl(Ostream &os)
Add newline and flush stream.
constexpr scalar degToRad() noexcept
Multiplication factor for degrees to radians conversion.
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for INVALID.
dimensionedScalar cos(const dimensionedScalar &ds)
constexpr char nl
The newline '\n' character (0x0a)
Unit conversion functions.