Go to the documentation of this file.
55 static const string funcName =
57 "void circleSet::calcSamples"
59 "DynamicList<point>&, "
60 "DynamicList<label>&, "
61 "DynamicList<label>&, "
62 "DynamicList<label>&, "
63 "DynamicList<scalar>&"
71 samplingPts.
append(startPoint_);
72 samplingCells.
append(cellI);
74 samplingSegments.
append(0);
75 samplingCurveDist.
append(0.0);
80 <<
"Unable to find cell at point id " << 0
81 <<
" at location " << startPoint_ <<
endl;
90 vector axis1 = startPoint_ - origin_;
91 const scalar radius =
mag(axis1);
93 if (
mag(axis1 & circleAxis_) > SMALL)
96 <<
"Vector defined by (startPoint - origin) not orthogonal to "
97 <<
"circleAxis:" <<
nl
98 <<
" startPoint - origin = " << axis1 <<
nl
99 <<
" circleAxis = " << circleAxis_ <<
nl
105 scalar theta = dTheta_;
109 axis1 = axis1*cosAlpha + (axis1^circleAxis_)*sinAlpha;
111 point pt = origin_ + radius*axis1;
118 samplingCells.
append(cellI);
120 samplingSegments.
append(nPoint);
131 <<
"Unable to find cell at point id " << nPoint
132 <<
" at location " << pt <<
endl;
160 samplingSegments.
shrink();
161 samplingCurveDist.
shrink();
184 const point& startPoint,
190 circleAxis_(circleAxis),
191 startPoint_(startPoint),
218 circleAxis_ /=
mag(circleAxis_);
Holds list of sampling points which is filled at construction time. Various implementations of this b...
void calcSamples(DynamicList< point > &samplingPts, DynamicList< label > &samplingCells, DynamicList< label > &samplingFaces, DynamicList< label > &samplingSegments, DynamicList< scalar > &samplingCurveDist) const
Samples all points in sampleCoords.
A class for handling words, derived from string.
Various (local, not parallel) searches on polyMesh; uses (demand driven) octree to search.
A 1D vector of objects of type <T> that resizes itself as necessary to accept the new objects.
addToRunTimeSelectionTable(ensightPart, ensightPartCells, istream)
const dimensionedScalar alpha
Fine-structure constant: default SI units: [].
dimensionedScalar sin(const dimensionedScalar &ds)
ITstream & lookup(const word &, bool recursive=false, bool patternMatch=true) const
Find and return an entry data stream.
Ostream & endl(Ostream &os)
Add newline and flush stream.
virtual point getRefPoint(const List< point > &) const
Get reference point.
dimensioned< scalar > mag(const dimensioned< Type > &)
Mesh consisting of general polyhedral cells.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
void genSamples()
Uses calcSamples to obtain samples. Copies them into *this.
DynamicList< T, SizeInc, SizeMult, SizeDiv > & shrink()
Shrink the allocated space to the number of elements used.
A list of keyword definitions, which are a keyword followed by any number of values (e....
Macros for easy insertion into run-time selection tables.
DynamicList< T, SizeInc, SizeMult, SizeDiv > & append(const T &)
Append an element at the end of the list.
void setSamples(const List< point > &samplingPts, const labelList &samplingCells, const labelList &samplingFaces, const labelList &samplingSegments, const scalarList &samplingCurveDist)
Sets sample data.
bool readScalar(const char *buf, doubleScalar &s)
Read whole of buf as a scalar. Return true if succesful.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
label findCell(const point &location, const label seedCellI=-1, const bool useTreeSearch=true) const
Find cell containing location.
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.
word name(const complex &)
Return a string representation of a complex.
dimensionedScalar cos(const dimensionedScalar &ds)