44 void 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,
List< scalar > scalarList
List of scalar.
Sample on faces along a specified path.
Various (local, not parallel) searches on polyMesh; uses (demand driven) octree to search...
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
A list of keyword definitions, which are a keyword followed by a number of values (eg...
const point & start() const
Macros for easy insertion into run-time selection tables.
Ostream & write(Ostream &) const
Output for debugging.
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for expressions::valueTypeCode::INVALID.
A class for handling words, derived from Foam::string.
midPointSet(const word &name, const polyMesh &mesh, const meshSearch &searchEngine, const word &axis, const point &start, const point &end)
Construct from components.
labelList segments_
Segment numbers.
label size() const noexcept
The number of elements in the container.
int debug
Static debugging option.
constexpr auto end(C &c) -> decltype(c.end())
Return iterator to the end of the container c.
defineTypeNameAndDebug(combustionModel, 0)
label pointInCell(const point &p, const label samplei) const
Return the cell in which the point on the sample line.
vector point
Point is a vector.
messageStream Info
Information stream (stdout output on master, null elsewhere)
void setSamples(const List< point > &samplingPts, const labelList &samplingCells, const labelList &samplingFaces, const labelList &samplingSegments, const scalarList &samplingDistance)
Set sample data. Copy list contents.
Mesh consisting of general polyhedral cells.
List< label > labelList
A List of labels.
addToRunTimeSelectionTable(functionObject, pointHistory, dictionary)