![]() |
TAPs 0.7.7.3
|
00001 /****************************************************************************** 00002 TAPsFEMMeshHexahedra.hpp 00003 ******************************************************************************/ 00007 /****************************************************************************** 00008 SUKITTI PUNAK (02/11/2010) 00009 UPDATE (05/01/2010) 00010 ******************************************************************************/ 00011 #ifndef TAPs_FEM_MESH_HEXAHEDRA_HPP 00012 #define TAPs_FEM_MESH_HEXAHEDRA_HPP 00013 00014 #include "TAPsFEMMesh.hpp" 00015 #include "TAPsFEMHexahedron.hpp" 00016 00017 BEGIN_NAMESPACE_TAPs__FEM 00018 //============================================================================= 00019 template <typename T> 00020 class MeshHexahedra : public Mesh<T> { 00021 //============================================================================= 00022 public: 00023 // Member Functions ------------------------------------------------------- 00025 friend std::ostream & operator<< ( std::ostream &output, MeshHexahedra<T> const &obj ) 00026 { 00027 output << obj.StrInfo(); 00028 return output; 00029 } 00030 //------------------------------------------------------------------------- 00032 MeshHexahedra (); 00034 //MeshHexahedra ( MeshHexahedra<T> const &orig ); 00036 virtual ~MeshHexahedra (); 00037 //------------------------------------------------------------------------- 00039 virtual std::string StrInfo () const; 00040 //------------------------------------------------------------------------- 00042 //MeshHexahedra<T> & operator= ( MeshHexahedra<T> const &orig ); 00043 00044 //------------------------------------------------------------------------- 00045 // Operations 00046 00048 std::vector< Hexahedron<T> > & RetListOfElements () { return m_vElements; } 00049 00051 //inline virtual void ResetToDeformedState (); 00052 00054 inline virtual void ResetToUndeformedState (); 00055 00057 //virtual void SetSizeOfStiffnessMatrix (); 00058 00060 virtual void AssembleStiffnessMatrix (); 00061 00063 virtual void UpdateStrainDisplacementMatrix (); 00064 00065 //------------------------------------------------------------------------- 00066 // Simulation 00067 00069 virtual void AllocateDataForSimulation ( T mass = 1 ); 00070 00072 virtual void AdvanceSimulationStatic (); 00073 00074 #ifdef TAPs_SIM_DYNAMIC_SYSTEM 00075 00076 virtual void AdvanceSimulationDynamic (); 00077 #endif//TAPs_SIM_DYNAMIC_SYSTEM 00078 00079 //------------------------------------------------------------------------- 00080 // Get/Set Fns 00081 00082 // Virtual Fns from FEMMesh --------------------------- 00083 00085 inline virtual unsigned int GetNumOfElements () const; 00086 00088 inline virtual Hexahedron<T> const & RefToElement ( unsigned int i ) const; 00090 inline virtual Hexahedron<T> & RefToElement ( unsigned int i ); 00091 00092 //------------------------------------------------------------------------- 00093 // Checking 00094 00096 virtual std::string CheckVolumeOfEachElement (); 00097 00098 //------------------------------------------------------------------------- 00099 00100 // Data Members ----------------------------------------------------------- 00101 //============================================================================= 00102 protected: 00103 // Member Functions ------------------------------------------------------- 00104 00105 void Init (); 00106 00107 // Data Members ----------------------------------------------------------- 00108 std::vector< Hexahedron<T> > m_vElements; 00109 //============================================================================= 00110 private: 00111 // Member Functions ------------------------------------------------------- 00112 // Data Members ----------------------------------------------------------- 00113 //============================================================================= 00114 00115 00116 //============================================================================= 00117 // For interactions 00118 #ifdef TAPs_ADD_INTERACTIONS 00119 //----------------------------------------------------------------------------- 00120 public: 00121 // Member Functions --------------------------------------------- 00122 // Data Members ------------------------------------------------- 00123 protected: 00124 // Member Functions --------------------------------------------- 00125 // Data Members ------------------------------------------------- 00126 private: 00127 // Member Functions --------------------------------------------- 00128 00130 inline virtual void ApplyPointLoad ( PointForce<T> const * const ptrPtForce ); 00131 00132 // Data Members ------------------------------------------------- 00133 //----------------------------------------------------------------------------- 00134 #endif//TAPs_ADD_INTERACTIONS 00135 //============================================================================= 00136 00137 00138 #if defined(__gl_h_) || defined(__GL_H__) 00139 public: 00140 00142 virtual void Draw (); 00143 00145 virtual void DrawUndeformedMesh (); 00146 00148 virtual void DrawDeformedMesh (); 00149 00150 #ifdef TAPs_ADD_INTERACTIONS 00151 00152 virtual void DrawInteractionForces (); 00153 #endif//TAPs_ADD_INTERACTIONS 00154 00155 #endif 00156 00157 //============================================================================= 00158 }; // END CLASS MeshHexahedra 00159 //============================================================================= 00160 END_NAMESPACE_TAPs__FEM 00161 //----------------------------------------------------------------------------- 00163 #include "TAPsFEMMeshHexahedra.cpp" 00164 00166 // Include definition if TAPs_USE_EXPORT is not defined 00167 //#if !defined( TAPs_USE_EXPORT ) 00168 // #include "TAPsFEMMeshHexahedra.cpp" 00169 //#endif 00170 //----------------------------------------------------------------------------- 00171 #endif 00172 //34567890123456789012345678901234567890123456789012345678901234567890123456789 00173 //--+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----