levelmesh2d.h

Go to the documentation of this file.
00001 #ifndef  __levelmesh2d_h
00002 #define  __levelmesh2d_h
00003 
00004 #include  "hierarchicalmesh2d.h"
00005 #include  "index.h"
00006 #include  "boundaryindexhandler.h"
00007 
00008 /*--------------------------------------------------------------*/
00009 
00010 namespace Gascoigne
00011 {
00012 class LevelMesh2d : public Index
00013 {
00014  protected:
00015 
00016   typedef std::map<int,fixarray<3,int> >    QuadraticHNStructure3;
00017   typedef std::map<int,fixarray<6,int> >    QuarticHNStructure5;
00018 
00019   const HierarchicalMesh2d*  HMP;
00020 
00021   void check_leveljump() const;
00022   void fill_opis(IntSet& dst, IntSet& oldquads) const;
00023   void fill_enkel(IntSet& dst, const Quad& Q) const;
00024   void fill_childs(IntSet& dst, const Quad& Q) const;
00025   bool EnkelUniform(const Quad& Q) const;
00026   bool BuildFathers(std::set<int>&  Vaeter) const;
00027   void InitCells(int n);
00028   void InitNodes(int n);
00029   void InitEdges(int n);
00030 
00031  public:
00032    
00033    /*----- Constructor -----*/
00034 
00035   LevelMesh2d(const HierarchicalMesh* hmp);
00036   ~LevelMesh2d();
00037 
00038   const HierarchicalMesh2d* GetHierarchicalMesh() const {return  HMP;}
00039   
00040   int             ncells  ()     const  { return Index::QuadSize(); }
00041   const Quad&     quad    (int i) const { return HMP->quad(Quadl2g(i));}
00042   const Vertex2d& vertex2d(int i) const { return HMP->vertex2d(Vertexl2g(i));}
00043 
00044   int vertex_of_cell(int i, int j) const 
00045     { return Vertexg2l(HMP->vertex_of_cell(Quadl2g(i),j)); }
00046 
00047   /*----- Functions -----*/
00048 
00049   bool EdgeIsHangingGlobalIndex(int i) const;
00050 
00051   void BasicInit(const IntSet& n, const IntSet& o);
00052 
00053   /*----- Functions for patches -----*/
00054 
00055   void construct_lists(IntSet& newquads, IntSet& oldquads) const;
00056   void ConstructHangingStructureQuadratic(QuadraticHNStructure3& hnq2) const;
00057   void ConstructHangingStructureQuartic(QuarticHNStructure5& hnq4) const;
00058   void InitBoundaryHandler(BoundaryIndexHandler& BI) const;
00059   void ConstructIndOfPatch(nvector<IntVector>& dstv) const;
00060   bool ConstructCellIndOfPatch(IntVector& dstc) const;
00061 };
00062 }
00063 
00064 /*---------------------------------------------------*/
00065 
00066 #endif

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