Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members

Face.h

Go to the documentation of this file.
00001 // Copyright (C) 2003 Johan Hoffman and Anders Logg.
00002 // Licensed under the GNU GPL Version 2.
00003 
00004 #ifndef __FACE_H
00005 #define __FACE_H
00006 
00007 #include <dolfin/Array.h>
00008 
00009 namespace dolfin {
00010   
00011   class Edge;
00012 
00017 
00018   class Face {
00019   public:
00020 
00022     Face();
00023 
00025     ~Face();
00026 
00028     void clear();
00029 
00031     int id() const;
00032 
00034     unsigned int noEdges() const;
00035 
00037     unsigned int noCellNeighbors() const;
00038 
00040     Edge& edge(int i) const;
00041 
00043     Cell& cell(int i) const;
00044 
00046     bool equals(const Edge& e0, const Edge& e1, const  Edge& e2) const;
00047     
00049     bool equals(const Edge& e0, const Edge& e1) const;
00050 
00052    
00054     friend LogStream& operator<<(LogStream& stream, const Face& face);
00055 
00057     friend class MeshData;
00058     friend class MeshInit;
00059     friend class EdgeIterator::FaceEdgeIterator;
00060 
00061   private:
00062     
00063     // Specify global face number
00064     int setID(int id, Mesh& mesh);
00065 
00066     // Set the mesh pointer
00067     void setMesh(Mesh& mesh);
00068 
00070     void set(Edge& e0, Edge& e1, Edge& e2);
00071     
00072     // The mesh containing this face
00073     Mesh* mesh;
00074 
00075     // Global face number
00076     int _id;
00077 
00078     // The list of edges
00079     Array<Edge*> fe;
00080 
00081     // Connectivity
00082     Array<Cell*> fc;
00083 
00084   };
00085 
00086 }
00087 
00088 #endif


Documentation automatically generated with Doxygen on 10 Sep 2004.