Home | Doxygen Documentation | Tutorials | Developer Tools (restricted)

app-radu/element.hh
Go to the documentation of this file.
00001 
00004 #ifndef appRaduElement_hh
00005 #define appRaduElement_hh
00006 
00007 #include "basics/vectorsMatricesForward.hh"
00008 #include "geometry/cell3D.hh"
00009 #include "space/tmatrix.hh"
00010 #include "space/element.hh"
00011 
00012 // *********************************************************** Constant3d000 **
00013 
00019 template <class F = concepts::Real>
00020 class Constant3d000 : public concepts::Element<F> {
00021 public:
00026   Constant3d000(const concepts::Tetrahedron3d& cell, uint idx);
00027 
00029   inline const concepts::TMatrixBase<F>& T() const {return T_;}
00031   inline const concepts::Tetrahedron& support() const;
00035   inline const concepts::Real3d& vertex(uint i) const {return v_[i];}
00037   inline const concepts::Tetrahedron3d& cell() const {return cell_;}
00042   inline concepts::Real size() const {return size_;}
00043     
00044 protected:
00045   std::ostream& info(std::ostream& os) const;
00046     
00047 private:
00048   const concepts::Tetrahedron3d& cell_;
00050   concepts::TIndex<F>            T_;
00052   concepts::Real3d               v_[4];
00057   concepts::Real                 size_;
00058 };
00059     
00060 template <class F>
00061 inline const concepts::Tetrahedron& Constant3d000<F>::support() const {
00062   return cell_.connector();
00063 }
00064 
00065 // *********************************************************** Constant3d001 **
00066 
00072 template <class F = concepts::Real>
00073 class Constant3d001 : public concepts::Element<F> {
00074 public:
00079   Constant3d001(const concepts::Hexahedron3d& cell, uint idx);
00080 
00082   inline const concepts::TMatrixBase<F>& T() const {return T_;}
00084   inline const concepts::Hexahedron& support() const;
00088   inline const concepts::Real3d& vertex(uint i) const {return v_[i];}
00090   inline const concepts::Hexahedron3d& cell() const {return cell_;}
00092   inline concepts::Real size() const {return size_;}
00094   inline const concepts::Real3d& map(uint i) const {return map_[i];}
00095     
00096 protected:
00097   std::ostream& info(std::ostream& os) const;
00098     
00099 private:
00100   const concepts::Hexahedron3d& cell_;
00102   concepts::TIndex<F>           T_;
00104   concepts::Real3d               v_[8];
00106   concepts::Real3d              map_[8];
00108   concepts::Real                size_;
00109 };
00110     
00111 template <class F>
00112 inline const concepts::Hexahedron& Constant3d001<F>::support() const {
00113   return cell_.connector();
00114 }
00115 
00116 // *********************************************************** Constant3d002 **
00117 
00123 template <class F = concepts::Real>
00124 class Constant3d002 : public concepts::Element<F> {
00125 public:
00130   Constant3d002(const concepts::Parallelepiped3d& cell, uint idx);
00131 
00133   inline const concepts::TMatrixBase<F>& T() const {return T_;}
00135   inline const concepts::Hexahedron& support() const;
00139   inline const concepts::Real3d& vertex(uint i) const {return v_[i];}
00141   inline const concepts::Parallelepiped3d& cell() const {return cell_;}
00143   inline concepts::Real size() const {return size_;}
00144     
00145 protected:
00146   std::ostream& info(std::ostream& os) const;
00147     
00148 private:
00149   const concepts::Parallelepiped3d& cell_;
00151   concepts::TIndex<F>               T_;
00153   concepts::Real3d                  v_[8];
00155   concepts::Real                    size_;
00156 };
00157     
00158 template <class F>
00159 inline const concepts::Hexahedron& Constant3d002<F>::support() const {
00160   return cell_.connector();
00161 }
00162 
00163 // ************************************************************* Linear3d000 **
00164 
00170 template <class F = concepts::Real>
00171 class Linear3d000 : public concepts::Element<F> {
00172 public:
00177   Linear3d000(const concepts::Tetrahedron3d& cell, uint idx[]);
00178 
00180   inline const concepts::TMatrixBase<F>& T() const {return T_;}
00182   inline const concepts::Tetrahedron& support() const;
00186   inline const concepts::Real3d& vertex(uint i) const {return v_[i];}
00188   inline const concepts::Tetrahedron3d& cell() const {return cell_;}
00193   inline concepts::Real size() const {return size_;}
00194     
00195 protected:
00196   std::ostream& info(std::ostream& os) const;
00197     
00198 private:
00199   const concepts::Tetrahedron3d& cell_;
00201   concepts::TIndex<F>            T_;
00203   concepts::Real3d               v_[4];
00208   concepts::Real                 size_;
00209 };
00210     
00211 template <class F>
00212 inline const concepts::Tetrahedron& Linear3d000<F>::support() const {
00213   return cell_.connector();
00214 }
00215 
00216 // ************************************************************* Linear3d001 **
00217 
00223 template <class F = concepts::Real>
00224 class Linear3d001 : public concepts::Element<F> {
00225 public:
00230   Linear3d001(const concepts::Hexahedron3d& cell, uint idx[]);
00231 
00233   inline const concepts::TMatrixBase<F>& T() const {return T_;}
00235   inline const concepts::Hexahedron& support() const;
00239   concepts::Real3d vertex(uint i);
00241   inline const concepts::Hexahedron3d& cell() const {return cell_;}
00243   inline concepts::Real size() const {return size_;}
00245   inline const concepts::Real3d& map(uint i) const {return map_[i];}
00246     
00247 protected:
00248   std::ostream& info(std::ostream& os) const;
00249     
00250 private:
00251   const concepts::Hexahedron3d& cell_;
00253   concepts::TIndex<F>           T_;
00255   concepts::Real3d              map_[8];
00257   concepts::Real                size_;
00258 };
00259     
00260 template <class F>
00261 inline const concepts::Hexahedron& Linear3d001<F>::support() const {
00262   return cell_.connector();
00263 }
00264 #endif // appRaduElement_hh

Home | Doxygen Documentation | Tutorials | Developer Tools (restricted)