FE.h

Go to the documentation of this file.
00001 #ifndef FE_IS_INCLUDED
00002 #define FE_IS_INCLUDED
00003 
00004 
00005 #include <tools.h> // Lots of the tools we need is currently in tools.h. 
00006                    // These are functions on a lower level than the finite elements, 
00007                    // e.g. functions for making polynomial spaces
00008 
00009 #include <Polygon.h>
00010 
00011 
00012 
00013 class FE {
00014   public: 
00015   FE() {}
00016   ~FE() {}
00017 
00018   virtual void set(Polygon& p) = 0;     // Set polygonal domain 
00019   virtual Polygon& getPolygon() = 0;    // Get polygonal domain 
00020   virtual GiNaC::ex N(int i) = 0;      // The i'th basis function
00021   virtual GiNaC::ex dof(int i) = 0 ;   // The i'th degree of freedom 
00022   virtual int nbf() = 0;                // Number of basis functions/
00023                                         // degrees of freedom  
00024 
00025   // print and debug functions (need some thought) ??    
00026   // if the internal structures are public and general 
00027   // STL objects, then such functions are not necessarilly needed
00028 };
00029 
00030 class StandardFE : public FE {
00031 //  protected: 
00032   public: 
00033   GiNaC::exvector Ns; 
00034   GiNaC::exvector dofs; 
00035   Polygon* p; //FIXME should this be a reference ?  
00036   int order; 
00037 
00038   //a rough implementation of this element is in spectral.cpp, 
00039   //but there the reference element is hard coded 
00040   public: 
00041   StandardFE() {}
00042   ~StandardFE() {}
00043 
00044   virtual void set(int order); 
00045   virtual void set(Polygon& p);  
00046   virtual Polygon& getPolygon();  
00047   virtual void compute_basis_functions();  
00048   virtual int nbf(); 
00049   virtual GiNaC::ex N(int i);  
00050   virtual GiNaC::ex dof(int i); 
00051 }; 
00052 
00053 
00054 
00055 #endif
00056 
00057   
00058 
00059 
00060 
00061 
00062 
00063 

Generated on Mon Jan 9 18:08:08 2006 for SyFi by  doxygen 1.4.4