44 void Foam::midPointAndFaceSet::genSamples()
48 List<point> mpfSamplePoints(3*
size());
60 mpfSamplePoints[mpfSamplei] =
points()[samplei];
61 mpfSampleCells[mpfSamplei] =
cells_[samplei];
62 mpfSampleFaces[mpfSamplei] =
faces_[samplei];
63 mpfSampleSegments[mpfSamplei] =
segments_[samplei];
64 mpfSampleCurveDist[mpfSamplei] =
distance_[samplei];
69 (samplei <
size() - 1)
78 mpfSamplePoints[mpfSamplei] = midPoint;
79 mpfSampleCells[mpfSamplei] = cellm;
80 mpfSampleFaces[mpfSamplei] = -1;
81 mpfSampleSegments[mpfSamplei] =
segments_[samplei];
82 mpfSampleCurveDist[mpfSamplei] =
83 mag(mpfSamplePoints[mpfSamplei] -
start());
89 mpfSamplePoints[mpfSamplei] =
operator[](samplei+1);
90 mpfSampleCells[mpfSamplei] =
cells_[samplei+1];
91 mpfSampleFaces[mpfSamplei] =
faces_[samplei+1];
92 mpfSampleSegments[mpfSamplei] =
segments_[samplei+1];
93 mpfSampleCurveDist[mpfSamplei] =
94 mag(mpfSamplePoints[mpfSamplei] -
start());
101 if (samplei ==
size() - 1)
108 mpfSamplePoints.setSize(mpfSamplei);
109 mpfSampleCells.setSize(mpfSamplei);
110 mpfSampleFaces.setSize(mpfSamplei);
111 mpfSampleSegments.setSize(mpfSamplei);
112 mpfSampleCurveDist.setSize(mpfSamplei);
117 std::move(mpfSamplePoints),
118 std::move(mpfSampleCells),
119 std::move(mpfSampleFaces),
120 std::move(mpfSampleSegments),
121 std::move(mpfSampleCurveDist)
136 const polyMesh&
mesh,
137 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.
T & operator[](const label i)
Return element of UList.
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.
scalarList distance_
Cumulative distance for "distance" write specifier.
const pointField & points() const noexcept
Return the points.
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.
labelList cells_
Cell numbers.
Mesh consisting of general polyhedral cells.
List< label > labelList
A List of labels.
midPointAndFaceSet(const word &name, const polyMesh &mesh, const meshSearch &searchEngine, const word &axis, const point &start, const point &end)
Construct from components.
labelList faces_
Face numbers (-1 if not known)
addToRunTimeSelectionTable(functionObject, pointHistory, dictionary)