00001 // elements for linear FEM 00002 00003 #ifndef elementLin_hh 00004 #define elementLin_hh 00005 00006 #include <memory> 00007 #include "basics/typedefs.hh" 00008 #include "space/element.hh" 00009 #include "space/tmatrix.hh" 00010 #include "toolbox/scannerConnectors.hh" 00011 00012 namespace concepts { 00013 // forward declarations 00014 class Connector; 00015 class Cell; 00016 } 00017 00018 namespace linearFEM { 00019 00020 using concepts::Real; 00021 00022 // *************************************************************** Element ** 00023 00027 class Element : public concepts::ElementWithCell<Real> { 00028 public: 00033 Element(const uint i, uint idx[]); 00038 Element(concepts::TColumn<Real>* T0, concepts::TColumn<Real>* T1); 00040 virtual const concepts::Connector& support() const = 0; 00042 virtual const concepts::Cell& cell() const = 0; 00044 virtual const concepts::TMatrixBase<Real>& T() const { return *T_; } 00045 protected: 00047 std::auto_ptr<concepts::TMatrixBase<Real> > T_; 00048 }; 00049 00050 } // namespace linearFEM 00051 00052 namespace concepts { 00053 00054 // ************************************************************** Scanners ** 00055 00056 template<> 00057 class Scan<linearFEM::Element> : 00058 public concepts::Scan<concepts::Element<Real> > { 00059 public: 00060 virtual linearFEM::Element& operator++(int) = 0; 00061 }; 00062 } 00063 00064 #endif // elementLin_hh