levelcomparer.h

Go to the documentation of this file.
00001 #ifndef __levelcomparer_h
00002 #define __levelcomparer_h
00003 
00004 #include "compareclass.h"
00005 #include  "gascoigne.h"
00006 
00007 /*---------------------------------------------------*/
00008 
00009 namespace Gascoigne
00010 {
00011 class LevelComparer
00012 {
00013   const HierarchicalMesh&   Mesh;
00014   const IntVector& v;
00015 
00016   public:
00017   
00018   LevelComparer(const HierarchicalMesh& HM, const IntVector& vv) : 
00019     Mesh(HM), v(vv) {};
00020 
00021   int size() const { return v.size(); }
00022   int operator[](int i) const 
00023     {
00024       if (Mesh.dimension()==2)
00025         return Mesh.quad(v[i]).level();
00026       else
00027         return Mesh.hex(v[i]).level();
00028     }
00029 };
00030 }
00031 
00032 /*---------------------------------------------------*/
00033 
00034 #endif

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