Go to the documentation of this file.
49 void 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;
126 void 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),
203 dTheta_(
dict.
get<scalar>(
"dTheta"))
int debug
Static debugging option.
addToRunTimeSelectionTable(decompositionMethod, kahipDecomp, dictionary)
Holds list of sampling points which is filled at construction time. Various implementations of this b...
A class for handling words, derived from Foam::string.
Various (local, not parallel) searches on polyMesh; uses (demand driven) octree to search.
const meshSearch & searchEngine() const
const dimensionedScalar alpha
Fine-structure constant: default SI units: [].
dimensionedScalar sin(const dimensionedScalar &ds)
Unit conversion functions.
Ostream & endl(Ostream &os)
Add newline and flush stream.
T get(const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
label findCell(const point &location, const label seedCelli=-1, const bool useTreeSearch=true) const
Find cell containing location.
Mesh consisting of general polyhedral cells.
messageStream Info
Information stream (stdout output on master, null elsewhere)
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Macros for easy insertion into run-time selection tables.
Vector< scalar > vector
A scalar version of the templated Vector.
constexpr scalar degToRad(const scalar deg) noexcept
Conversion from degrees to radians.
VectorSpace< Form, Cmpt, Ncmpts > normalised(const VectorSpace< Form, Cmpt, Ncmpts > &vs)
virtual point getRefPoint(const List< point > &pts) const
Get reference point.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
void write(vtk::formatter &fmt, const Type &val, const label n=1)
Component-wise write of a value (N times)
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for INVALID.
vector point
Point is a vector.
circleSet(const word &name, const polyMesh &mesh, const meshSearch &searchEngine, const word &axis, const point &origin, const vector &circleAxis, const point &startPoint, const scalar dTheta)
Construct from components.
defineTypeNameAndDebug(combustionModel, 0)
#define WarningInFunction
Report a warning using Foam::Warning.
dimensionedScalar cos(const dimensionedScalar &ds)