44void Foam::midPointSet::genSamples()
48 List<point> midPoints(2*
size());
61 (samplei <
size() - 1)
65 point midPoint(0.5*(
operator[](samplei) +
operator[](samplei+1)));
70 midPoints[mSamplei] = midPoint;
71 midCells[mSamplei] = cellm;
72 midSegments[mSamplei] =
segments_[samplei];
73 midCurveDist[mSamplei] =
mag(midPoints[mSamplei] -
start());
80 if (samplei ==
size() - 1)
88 midPoints.setSize(mSamplei);
89 midCells.setSize(mSamplei);
90 midSegments.setSize(mSamplei);
91 midCurveDist.setSize(mSamplei);
101 std::move(midSegments),
102 std::move(midCurveDist)
117 const polyMesh&
mesh,
118 const meshSearch& searchEngine,
Macros for easy insertion into run-time selection tables.
#define addToRunTimeSelectionTable(baseType, thisType, argNames)
Add to construction table with typeName as the key.
label size() const noexcept
const word & axis() const
The sort axis name.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Sample on faces along a specified path.
const point & start() const
const point & end() const
faceOnlySet(const word &name, const polyMesh &mesh, const meshSearch &searchEngine, const word &axis, const point &start, const point &end)
Construct from components.
Various (local, not parallel) searches on polyMesh; uses (demand driven) octree to search.
midPointSet(const word &name, const polyMesh &mesh, const meshSearch &searchEngine, const word &axis, const point &start, const point &end)
Construct from components.
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
void setSamples(const List< point > &samplingPts, const labelList &samplingCells, const labelList &samplingFaces, const labelList &samplingSegments, const scalarList &samplingDistance)
Set sample data. Copy list contents.
label pointInCell(const point &p, const label samplei) const
Return the cell in which the point on the sample line.
labelList segments_
Segment numbers.
const polyMesh & mesh() const noexcept
A class for handling words, derived from Foam::string.
#define defineTypeNameAndDebug(Type, DebugSwitch)
Define the typeName and debug information.
List< label > labelList
A List of labels.
messageStream Info
Information stream (stdout output on master, null elsewhere).
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
vector point
Point is a vector.
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for expressions::valueTypeCode::INVALID.
List< scalar > scalarList
List of scalar.