49 vertexValue[i] = v[labels[i]];
57 bool allPositive =
true;
58 bool allNegative =
true;
62 if (vertexValue[vI] > 0)
94 label nNewFacePoints = 0;
98 if (vertexValue[vI] <= 0)
101 newFacePoints[nNewFacePoints] = meshPoints[faceLabels[vI]];
107 (vertexValue[vI] > 0 && vertexValue[vI + 1] < 0)
108 || (vertexValue[vI] < 0 && vertexValue[vI + 1] > 0)
113 meshPoints[faceLabels[vI]]
114 + vertexValue[vI]/(vertexValue[vI + 1] - vertexValue[vI])
115 *(meshPoints[faceLabels[vI]] - meshPoints[faceLabels[vI + 1]]);
123 if (vertexValue[
size() - 1] <= 0)
126 newFacePoints[nNewFacePoints] = meshPoints[faceLabels[
size() - 1]];
132 (vertexValue[
size() - 1] > 0 && vertexValue[0] < 0)
133 || (vertexValue[
size() - 1] < 0 && vertexValue[0] > 0)
138 meshPoints[faceLabels[
size() - 1]]
139 + vertexValue[
size() - 1]/(vertexValue[0] - vertexValue[
size() - 1])
140 *(meshPoints[faceLabels[
size() - 1]] - meshPoints[faceLabels[0]]);
146 newFacePoints.
setSize(nNewFacePoints);
157 return face(sfl).mag(newFacePoints)/(
mag(meshPoints) + vSmall);
#define forAll(list, i)
Loop across all elements in list.
label size() const
Return the number of elements in the UList.
void size(const label)
Override size to be inconsistent with allocated storage.
void setSize(const label)
Reset size of List.
pointHit intersection(const point &p, const vector &q, const point &ctr, const pointField &, const intersection::algorithm alg, const scalar tol=0.0) const
Fast intersection with a ray.
scalar areaInContact(const pointField &, const scalarField &v) const
Return area in contact, given the displacement in vertices.
scalar mag(const pointField &) const
Return scalar magnitude.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.