itkFEMElement2DC1Beam.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef __itkFEMElement2DC1Beam_h
00019 #define __itkFEMElement2DC1Beam_h
00020
00021 #include "itkFEMElementStd.h"
00022 #include "itkFEMLoadElementBase.h"
00023 #include "itkFEMMaterialLinearElasticity.h"
00024
00025 namespace itk {
00026 namespace fem {
00027
00032 class Element2DC1Beam : public ElementStd<2,2>
00033 {
00034 typedef ElementStd<2,2> TemplatedParentClass;
00035 FEM_CLASS(Element2DC1Beam,TemplatedParentClass)
00036 public:
00037
00038
00039
00040
00044 Element2DC1Beam();
00045
00049 Element2DC1Beam( Node::ConstPointer n1_,
00050 Node::ConstPointer n2_,
00051 Material::ConstPointer mat_);
00052
00056 void Read( std::istream&, void* info );
00057
00061 void Write( std::ostream& f ) const;
00062
00064
00065
00066
00067 virtual void GetStiffnessMatrix( MatrixType& Ke ) const;
00068 virtual void GetMassMatrix( MatrixType& Me ) const;
00069 HANDLE_ELEMENT_LOADS();
00070
00071 virtual void GetStrainDisplacementMatrix( MatrixType&, const MatrixType& ) const {}
00072 virtual void GetMaterialMatrix( MatrixType& ) const {}
00073
00074
00076
00080 enum { DefaultIntegrationOrder = 1 };
00081 virtual void GetIntegrationPointAndWeight( unsigned int i, VectorType& pt, Float& w, unsigned int order=0 ) const;
00082 virtual unsigned int GetNumberOfIntegrationPoints( unsigned int order ) const;
00083
00085
00089 virtual VectorType ShapeFunctions( const VectorType& pt ) const;
00090 virtual void ShapeFunctionDerivatives( const VectorType& pt, MatrixType& shapeD ) const;
00091 virtual bool GetLocalFromGlobalCoordinates( const VectorType&, VectorType& ) const
00092 {
00093 return false;
00094 }
00095 virtual Float JacobianDeterminant( const VectorType& pt, const MatrixType* pJ ) const;
00096
00097 virtual unsigned int GetNumberOfDegreesOfFreedomPerNode( void ) const
00098 { return 3; }
00099
00103 #ifdef FEM_BUILD_VISUALIZATION
00104 void Draw(CDC* pDC, Solution::ConstPointer sol) const;
00105 #endif
00106
00107
00108 public:
00109
00113 MaterialLinearElasticity::ConstPointer m_mat;
00114 virtual Material::ConstPointer GetMaterial(void) const { return m_mat; }
00115 virtual void SetMaterial(Material::ConstPointer mat_ ) { m_mat=dynamic_cast<const MaterialLinearElasticity*>(&*mat_); }
00117
00118
00119 };
00120
00121 FEM_CLASS_INIT(Element2DC1Beam)
00122
00123 }}
00124
00125 #endif // #ifndef __itkFEMElement2DC1Beam_h
00126