levelsorter.h

Go to the documentation of this file.
00001 #ifndef  __levelsorter_h
00002 #define  __levelsorter_h
00003 
00004 /*---------------------------------------------------*/
00005 
00006 namespace Gascoigne
00007 {
00008 class LevelSorter2d
00009 {
00010 protected:
00011 
00012   const HierarchicalMesh2d& HM;
00013 
00014 public:
00015 
00016   LevelSorter2d(const HierarchicalMesh2d& HMHM): HM(HMHM) {}
00017   bool operator()(int i, int j) const
00018     {
00019       return ( HM.quad(i).level() > HM.quad(j).level() );
00020     }
00021 };
00022 
00023 /*---------------------------------------------------*/
00024 
00025 class HangEdgeSort3
00026 {
00027 protected:
00028 
00029   const LevelMesh2d& LR;
00030 
00031 public:
00032 
00033   HangEdgeSort3(const LevelMesh2d& L) : LR(L) {}
00034   bool operator() (int i, int j) const
00035     {
00036       return (!LR.EdgeIsHangingGlobalIndex(i) && LR.EdgeIsHangingGlobalIndex(j));
00037     }
00038 };
00039 }
00040 
00041 #endif

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