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)
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
The number of elements in the UList.
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
Various (local, not parallel) searches on polyMesh; uses (demand driven) octree to search.
Mesh consisting of general polyhedral cells.
Holds list of sampling points which is filled at construction time. Various implementations of this b...
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.
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)
List< scalar > scalarList
A List of scalars.
vector point
Point is a vector.
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.