TAPs 0.7.7.3
TAPsFEMElement.hpp
Go to the documentation of this file.
00001 /******************************************************************************
00002 TAPsFEMElement.hpp
00003 ******************************************************************************/
00009 /******************************************************************************
00010 SUKITTI PUNAK   (12/15/2009)
00011 UPDATE          (03/19/2010)
00012 ******************************************************************************/
00013 #ifndef TAPs_FEM_ELEMENT_HPP
00014 #define TAPs_FEM_ELEMENT_HPP
00015 
00016 #include "../Core/TAPsLib.hpp"
00017 
00018 BEGIN_NAMESPACE_TAPs__FEM
00019 //=============================================================================
00020 template <typename T>
00021 class Element {
00022 //=============================================================================
00023 public:
00024     // Member Functions -------------------------------------------------------
00026     friend std::ostream & operator<< ( std::ostream &output, Element<T> const &obj )
00027     {
00028         output << obj.StrInfo();
00029         return output;
00030     }
00031     //-------------------------------------------------------------------------
00033     Element ( 
00034         std::vector< Vector3<T> > * deformedNodes,      
00035         std::vector< Vector3<T> > * undeformedNodes,    
00036         T _YoungModulus,    
00037         T _PoissonRatio     
00038     );
00040     //Element ( Element<T> const &orig );
00042     virtual ~Element ();
00043     //-------------------------------------------------------------------------
00045     virtual std::string StrInfo () const = 0;
00046     //-------------------------------------------------------------------------
00048     //Element<T> & operator= ( Element<T> const &orig ) = 0;
00049 
00050     //-------------------------------------------------------------------------
00051     // Operations
00052 
00054     virtual inline Vector3<T> * const DeformedNode ( unsigned int i ) = 0;
00055 
00057     virtual inline Vector3<T> * const UndeformedNode ( unsigned int i ) = 0;
00058 
00059 
00061     //inline virtual void ResetToDeformedState () = 0;
00062 
00064     inline virtual void ResetToUndeformedState () = 0;
00065 
00067     virtual inline T    CalDeformedVolume () const = 0;
00068 
00070     virtual inline T    CalUndeformedVolume () = 0;
00071 
00073     virtual void UpdateStrainDisplacementMatrixElements () = 0;
00074 
00076     virtual void UpdateStiffnessMatrixElements () = 0;
00077 
00078     //-------------------------------------------------------------------------
00079 
00081     T   GetYoungModulus () const    { return YoungModulus; }
00082     // Get Young's modulus
00083     inline void SetYoungModulus ( T t );
00084 
00086     T   GetPoissonRatio () const    { return PoissonRatio; }
00087     // Get Poisson's ratio
00088     inline void SetPoissonRatio ( T t );
00089 
00091     void UpdateElasticMatrixElements ();
00092 
00093     //-------------------------------------------------------------------------
00094 
00095     // Data Members -----------------------------------------------------------
00096 //=============================================================================
00097 protected:
00098     // Member Functions -------------------------------------------------------
00099 
00100     // Data Members -----------------------------------------------------------
00101 
00102     // Element's properties
00103     T   Volume; 
00104     T   YoungModulus;   
00105     T   PoissonRatio;   
00106     T   Ee; 
00107     T   Ef; 
00108     T   Eg; 
00109 
00110     // Links to global mesh
00111     std::vector< Vector3<T> > * pU; 
00112     std::vector< Vector3<T> > * pX; 
00113 
00114 //=============================================================================
00115 private:
00116     // Member Functions -------------------------------------------------------
00117     // Data Members -----------------------------------------------------------
00118 //=============================================================================
00119 
00120 #if defined(__gl_h_) || defined(__GL_H__)
00121 public:
00123     virtual void Draw () = 0;
00124 
00126     virtual void DrawUndeformedMesh () = 0;
00127 
00129     virtual void DrawDeformedMesh () = 0;
00130 #endif
00131 
00132 //=============================================================================
00133 }; // END CLASS Element
00134 //=============================================================================
00135 END_NAMESPACE_TAPs__FEM
00136 //-----------------------------------------------------------------------------
00138 #include "TAPsFEMElement.cpp"
00139 
00141 // Include definition if TAPs_USE_EXPORT is not defined
00142 //#if !defined( TAPs_USE_EXPORT )
00143 //  #include "TAPsFEMElement.cpp"
00144 //#endif
00145 //-----------------------------------------------------------------------------
00146 #endif
00147 //34567890123456789012345678901234567890123456789012345678901234567890123456789
00148 //--+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines