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 virtual ~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 }; 00026 00027 class StandardFE : public FE { 00028 // protected: 00029 public: 00030 GiNaC::exvector Ns; 00031 GiNaC::exvector dofs; 00032 Polygon* p; 00033 int order; 00034 00035 public: 00036 StandardFE(); 00037 virtual ~StandardFE() {} 00038 00039 virtual void set(int order); 00040 virtual void set(Polygon& p); 00041 virtual Polygon& getPolygon(); 00042 virtual void compute_basis_functions(); 00043 virtual int nbf(); 00044 virtual GiNaC::ex N(int i); 00045 virtual GiNaC::ex dof(int i); 00046 }; 00047 00048 00049 00050 #endif 00051 00052 00053 00054 00055 00056 00057 00058