quadlawandorder.h

Go to the documentation of this file.
00001 #ifndef  __quadlawandorder_h
00002 #define  __quadlawandorder_h
00003 
00004 #include  "quad.h"
00005 #include  <map>
00006 
00007   /*            2
00008 
00009     3__________6__________2
00010     |          |          |
00011     |          |          |
00012     |    3     |    2     |
00013     |          |          |
00014     |          |          |
00015 3   7__________8__________5     1
00016     |          |          |
00017     |          |          |
00018     |    0     |    1     |
00019     |          |          |
00020     |          |          |
00021     0__________4__________1
00022 
00023                0
00024   */
00025 
00026 /*---------------------------------------------------*/
00027 
00028 namespace Gascoigne
00029 {
00030 class QuadLawAndOrder
00031 {
00032  protected:
00033 
00034   typedef  std::map<int,int>               LocVertexLocEdge;
00035   typedef  std::vector<LocVertexLocEdge>   LocVertexLocVertexLocEdge;
00036   typedef fixarray<2,int>             EdgeVector;
00037   typedef fixarray<2,int>             QuadVector;
00038 
00039   // Daten fuer Suchen von kindern an hang
00040 
00041   LocVertexLocVertexLocEdge           lvlvle;
00042 
00043   // Referenzen fuer globale fkts
00044 
00045   std::vector<Quad>&          quads;
00046 
00047   fixarray<4,EdgeVector>   childs_edge, vice;
00048   fixarray<4,int>          child_point_cell, child_point_vertex;
00049   fixarray<9,int>          gc,gv;
00050 
00051   fixarray<4,fixarray<2,int> > ieoc, oeoc;
00052 
00053   int local_edge(const Quad& f, const EdgeVector& globaledge) const;
00054 
00055  public:
00056 
00057   QuadLawAndOrder(std::vector<Quad>& q);
00058 
00059   int  cell_midpoint    (int i)    const { return (i+2)%4; }
00060   int  global_index     (const Quad& q, int i) const;
00061 
00062   void fill_corner_vertex_in_childs (const Quad& f) const;
00063   void fill_edge_vertex_in_childs   (const Quad& f, int e, int i) const;
00064   void fill_middle_vertex_in_childs (const Quad& f, int i) const;
00065 
00066   //   edges
00067 
00068   int  ChildEdge        (int e)        const { return e; }
00069   int  ChildsOfEdge     (int e, int i) const { return childs_edge[e][i]; }
00070   int  InnerEdgeOfChild (int c, int i) const { return ieoc[c][i]; }
00071   int  OuterEdgeOfChild (int c, int i) const { return oeoc[c][i]; }
00072   int  GlobalInnerEdge(int c, int i) const;
00073 
00074   std::pair<int,int> GetChildEdges(EdgeVector& edge,const EdgeVector& bigedge, 
00075                               int hanging, int bigquad, int i) const;
00076 
00077   int  GlobalChildEdge (const EdgeVector& edge, int q, int j) const;
00078   void local_edge_index(EdgeVector& index, int edge) const;
00079   int  local_edge_index(int, const EdgeVector&) const;
00080 
00081   int middle_vertex (const Quad& f) const;
00082   int edge_vertex   (const Quad& f, int edge) const;
00083 
00084   /* for boundaries */
00085   void childs_of_edge(QuadVector& child, const Quad& f, int edge) const;
00086 
00087   /* for regular */
00088   void childs_of_global_edge(QuadVector& child, const Quad& f, 
00089                              const EdgeVector& globaledge) const;
00090 
00091   void globaledgechildren_of_father(std::vector<EdgeVector>& edges, 
00092                                     const Quad& f) const;
00093   
00094   /* for hierarchicalmesh / find in liehanglist */
00095   void global_edge_unsorted(fixarray<2,int>& lineglob, const Quad& q, int edge) const;
00096 
00097   /* fuer mginterpolator */
00098   void globalvertices_of_edge(const Quad&, EdgeVector&, int) const;
00099 };
00100 }
00101 
00102 #endif

Generated on Thu Sep 14 10:34:37 2006 for Gascoigne by  doxygen 1.4.7