58 if (sizeA != sizeB || sizeA == 0)
80 if (aCirc() == bCirc())
101 if (aCirc() != bCirc())
129 if (aCirc() != bCirc())
179 if (a[i] == a[j]) aOcc++;
186 if (a[i] == b[j]) bOcc++;
190 if (aOcc != bOcc)
return false;
212 if (
operator[](ci) !=
operator[](0))
230 for (
label i=1; i < (n+1)/2; ++i)
232 Swap(
operator[](i),
operator[](n-i));
266 for (
label pointi = 1; pointi < newList.
size(); pointi++)
268 newList[pointi] = f[
size() - pointi];
271 return face(move(newList));
281 if (f[localIdx] == globalIndex)
338 oldPoints[
operator[](
pi)],
339 oldPoints[
operator[](
pi + 1)]
345 newPoints[
operator[](
pi)],
346 newPoints[
operator[](
pi + 1)]
354 oldPoints[
operator[](nPoints-1)],
355 oldPoints[
operator[](0)]
361 newPoints[
operator[](nPoints-1)],
362 newPoints[
operator[](0)]
385 ).inertia(refPt, density);
399 ).inertia(refPt, density);
412 for (
label pointi = 0; pointi < points.
size() - 1; ++pointi)
414 e[pointi] =
edge(points[pointi], points[pointi + 1]);
418 e.last() =
edge(points.
last(), points[0]);
428 if (
operator[](i) == e.
start())
444 else if (
operator[](i) == e.
end())
471 label longestEdgeI = -1;
472 scalar longestEdgeLength = -small;
476 scalar edgeLength = eds[edI].mag(pts);
478 if (edgeLength > longestEdgeLength)
481 longestEdgeLength = edgeLength;
#define forAll(list, i)
Loop across all elements in list.
A triangle primitive used to calculate face areas and swept volumes.
A face is a list of labels corresponding to mesh vertices.
edgeList edges() const
Return edges in face point ordering,.
T & operator[](const label)
Return element of UList.
label rcIndex(const label i) const
Return the reverse circular index, i.e. the previous index.
void size(const label)
Override size to be inconsistent with allocated storage.
label fcIndex(const label i) const
Return the forward circular index, i.e. the next index.
const dimensionedScalar b
Wien displacement law constant: default SI units: [m K].
tensor inertia(const pointField &, const point &refPt=vector::zero, scalar density=1.0) const
Return the inertia tensor, with optional reference.
static vector area(const PointField &ps)
Return vector area given face points.
label which(const label globalIndex) const
Navigation through face vertices.
void setIteratorToFulcrum()
Set the iterator to the current position of the fulcrum.
vector normal(const pointField &) const
Return unit normal.
label collapse()
Collapse face by removing duplicate point labels.
Calculates a unique integer (label so might not have enough room - 2G max) for processor + local inde...
face reverseFace() const
Return face with reverse direction.
Form normalised(const VectorSpace< Form, Cmpt, Ncmpts > &vs)
An edge is a list of two point labels. The functionality it provides supports the discretisation on a...
int edgeDirection(const edge &) const
Return the edge direction on the face.
A triangular face using a FixedList of labels corresponding to mesh vertices.
static int compare(const face &, const face &)
Compare faces.
pointField points(const pointField &) const
Return the points corresponding to this face.
static const char *const typeName
static vector centre(const PointField &ps)
Return centre point given face points.
scalar sweptVol(const pointField &oldPoints, const pointField &newPoints) const
Return the volume swept out by the face when its points move.
label longestEdge(const face &f, const pointField &pts)
Find the longest edge on a face. Face point labels index into pts.
static bool sameVertices(const face &, const face &)
Return true if the faces have the same vertices.
void setSize(const label)
Reset size of List.
bool circulate(const CirculatorBase::direction dir=CirculatorBase::direction::none)
Circulate around the list in the given direction.
label end() const
Return end vertex label.
A List with indirect addressing.
void flip()
Flip the face in-place.
triangle< point, const point & > triPointRef
const doubleScalar e
Elementary charge.
Walks over a container as if it were circular. The container must have the following members defined:...
T & last()
Return the last element of the list.
void setFulcrumToIterator()
Set the fulcrum to the current position of the iterator.
label size() const
Return the number of elements in the UList.
label start() const
Return start vertex label.