/*---------------------------------------------------------------------------*\ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | \\ / A nd | Copyright held by original author \\/ M anipulation | ------------------------------------------------------------------------------- License This file is part of OpenFOAM. OpenFOAM is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. OpenFOAM is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenFOAM; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Class Foam::face Description A face is a list of labels corresponding to mesh vertices. SourceFiles faceI.H face.C faceIntersection.C faceContactSphere.C faceAreaInContact.C \*---------------------------------------------------------------------------*/ #ifndef face_H #define face_H #include "pointField.H" #include "labelList.H" #include "edgeList.H" #include "vectorField.H" #include "faceListFwd.H" #include "intersection.H" #include "pointHit.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // namespace Foam { // Forward declaration of friend functions and operators class face; class triFace; template class DynamicList; inline bool operator==(const face& a, const face& b); inline bool operator!=(const face& a, const face& b); inline Istream& operator>>(Istream&, face&); /*---------------------------------------------------------------------------*\ Class face Declaration \*---------------------------------------------------------------------------*/ class face : public labelList { // Private Member Functions //- Edge to the right of face vertex i inline label right(const label i) const; //- Edge to the left of face vertex i inline label left(const label i) const; //- Construct list of edge vectors for face tmp calcEdges ( const pointField& points ) const; //- Cos between neighbouring edges scalar edgeCos ( const vectorField& edges, const label index ) const; //- Find index of largest internal angle on face label mostConcaveAngle ( const pointField& points, const vectorField& edges, scalar& edgeCos ) const; //- Enumeration listing the modes for split() enum splitMode { COUNTTRIANGLE, // count if split into triangles COUNTQUAD, // count if split into triangles&quads SPLITTRIANGLE, // split into triangles SPLITQUAD // split into triangles&quads }; //- Split face into triangles or triangles&quads. // Stores results quadFaces[quadI], triFaces[triI] // Returns number of new faces created label split ( const splitMode mode, const pointField& points, label& triI, label& quadI, faceList& triFaces, faceList& quadFaces ) const; public: // Static data members static const char* const typeName; // Constructors //- Construct null inline face(); //- Construct given size explicit inline face(label); //- Construct from list of labels explicit inline face(const UList