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; 00019 virtual ex N(int i) = 0; 00020 virtual ex dof(int i) = 0 ; 00021 virtual int nbf() = 0; 00022 00023 // print and debug functions (need some thought) ?? 00024 // if the internal structures are public and general 00025 // STL objects, then such functions are not necessarilly needed 00026 }; 00027 00028 class StandardFE : public FE { 00029 protected: 00030 exvector Ns; 00031 exvector dofs; 00032 Polygon* p; //FIXME should this be a reference ? 00033 int order; 00034 00035 //a rough implementation of this element is in spectral.cpp, 00036 //but there the reference element is hard coded 00037 public: 00038 StandardFE() {} 00039 ~StandardFE() {} 00040 00041 void set(int order); 00042 void set(Polygon& p); 00043 void compute_basis_functions(); 00044 virtual int nbf(); 00045 virtual ex N(int i); 00046 virtual ex dof(int i); 00047 }; 00048 00049 00050 00051 #endif 00052 00053 00054 00055 00056 00057 00058 00059