levelmesh3d.h

Go to the documentation of this file.
00001 #ifndef  __levelmesh3d_h
00002 #define  __levelmesh3d_h
00003 
00004 #include  "hierarchicalmesh3d.h"
00005 #include  "index.h"
00006 #include  "boundaryindexhandler.h"
00007 #include  "gascoigne.h"
00008 
00009 /*--------------------------------------------------------------*/
00010 
00011 namespace Gascoigne
00012 {
00013 class LevelMesh3d : public Index
00014 {
00015  protected:
00016 
00017   typedef std::map<int,fixarray<3,int> >  QuadraticHNStructure3;
00018   typedef std::map<int,fixarray<9,int> >  QuadraticHNStructure9;
00019 
00020   typedef std::map<int,fixarray<6,int> >   QuarticHNStructure5;
00021   typedef std::map<int,fixarray<26,int> >  QuarticHNStructure25;
00022 
00023   const HierarchicalMesh3d* HMP;
00024 
00025   void check_leveljump() const;
00026   void fill_opis(IntSet& dst, IntSet& oldquads) const;
00027   void fill_enkel(IntSet& dst, const Hex& Q) const;
00028   void fill_childs(IntSet& dst, const Hex& Q) const;
00029   bool EnkelUniform(const Hex& Q) const;
00030   bool BuildFathers(std::set<int>&  Vaeter) const;
00031   int  hexindex  (int i) const { return Index::Hexl2g(i);}
00032   void InitCells(int n);
00033   void InitNodes(int n);
00034   void InitEdges(int n);
00035 
00036   int refine_level(int n) const;
00037   void ConstructNodesOnFaceQ4(fixarray<81,int>& nodesonface,int vater,int ni) const;
00038   void InsertHangingFacesQ4(QuarticHNStructure25& hnq4face,const fixarray<81,int>& nodesonface) const;
00039   void InsertHangingEdgesQ4(QuarticHNStructure5&  hnq4, const fixarray<81,int>& nodesonface) const;
00040   void ConstructNodesOnFace(fixarray<25,int>& nodesonface,int vater,int ni) const;
00041   void InsertHangingFaceQ4 (QuarticHNStructure25& hnq4face,const fixarray<81,int>& nodesonface,
00042                             int n1,int n2,int n3,int n4,const fixarray<25,int>& I) const;
00043   void InsertHangingEdgeQ4 (QuarticHNStructure5&   hnq4,const fixarray<81,int>& nof,
00044                             int n1,int n2,int n3,int n4,int i1,int i2,int i3,int i4,int i5) const;
00045 
00046  public:
00047    
00048   LevelMesh3d(const HierarchicalMesh* hmp);
00049   ~LevelMesh3d();
00050 
00051   int ncells   ()         const  { return Index::HexSize(); }
00052   int dimension()         const  { return HMP->dimension();}
00053 
00054   int vertex_of_cell(int i, int ii) const 
00055     { return Index::Vertexg2l(HMP->vertex_of_cell(hexindex(i),ii)); }
00056 
00057   const Vertex3d& vertex3d(int i) const 
00058     { return HMP->vertex3d(Index::Vertexl2g(i)); }
00059 
00060   /*----- Functions -----*/
00061 
00062   const Hex&   hex  (int i) const { return HMP->hex(hexindex(i));}
00063 
00064   void BasicInit(const IntSet& n, const IntSet& o);
00065 
00066   /*----- Functions fuer Patch-----*/
00067 
00068   void construct_lists(IntSet& newquads, IntSet& oldquads) const;
00069 
00070   void ConstructHangingStructureQuadratic(QuadraticHNStructure3& hnq2,
00071                                           QuadraticHNStructure9& hnq2face) const;
00072   void ConstructHangingStructureQuartic(QuarticHNStructure5& hnq4,
00073                                         QuarticHNStructure25& hnq4face) const;
00074 
00075   void InitBoundaryHandler(BoundaryIndexHandler& BI) const;
00076   bool ConstructCellIndOfPatch(IntVector& dstc) const;
00077   void ConstructIndOfPatch(nvector<IntVector>& dstv) const;
00078 };
00079 }
00080 
00081 /*---------------------------------------------------*/
00082 
00083 #endif

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