Main Page   Groups   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Concepts

itkFEMElement2DC1Beam.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Insight Segmentation & Registration Toolkit
00004   Module:    $RCSfile: itkFEMElement2DC1Beam.h,v $
00005   Language:  C++
00006   Date:      $Date: 2002/09/13 21:02:45 $
00007   Version:   $Revision: 1.6 $
00008 
00009   Copyright (c) 2002 Insight Consortium. All rights reserved.
00010   See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.
00011 
00012      This software is distributed WITHOUT ANY WARRANTY; without even 
00013      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
00014      PURPOSE.  See the above copyright notices for more information.
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 
00028 
00029 
00030 
00035 class Element2DC1Beam : public ElementStd<2,2>
00036 {
00037 typedef ElementStd<2,2> TemplatedParentClass;
00038 FEM_CLASS(Element2DC1Beam,TemplatedParentClass)
00039 public:
00040 
00041   // FIXME: Write this class in the same way as the others - 
00042   //        properly define all virtual functions.
00043 
00047   Element2DC1Beam();
00048 
00052   Element2DC1Beam(  Node::ConstPointer n1_, 
00053       Node::ConstPointer n2_, 
00054       Material::ConstPointer mat_);
00055 
00059   void Read( std::istream&, void* info );
00060 
00064   void Write( std::ostream& f ) const;
00065 
00066 
00067 
00069   /*
00070    * Methods related to the physics of the problem.
00071    */
00072   virtual void GetStiffnessMatrix( MatrixType& Ke ) const;
00073   virtual void GetMassMatrix( MatrixType& Me ) const;
00074   HANDLE_ELEMENT_LOADS();
00075 
00076   virtual void GetStrainDisplacementMatrix( MatrixType& B, const MatrixType& shapeDgl ) const {}
00077   virtual void GetMaterialMatrix( MatrixType& D ) const {}
00078 
00079 
00081   /*
00082    * Methods related to numeric integration
00083    */
00084 
00085   enum { DefaultIntegrationOrder = 1 };
00086   virtual void GetIntegrationPointAndWeight( unsigned int i, VectorType& pt, Float& w, unsigned int order=0 ) const;
00087   virtual unsigned int GetNumberOfIntegrationPoints( unsigned int order ) const;
00088 
00089 
00090 
00091 
00093   /*
00094    * Methods related to the geometry of an element
00095    */
00096 
00097   virtual VectorType ShapeFunctions( const VectorType& pt ) const;
00098   virtual void ShapeFunctionDerivatives( const VectorType& pt, MatrixType& shapeD ) const;
00099   virtual bool GetLocalFromGlobalCoordinates( const VectorType& globalPt ,VectorType& localPt) const
00100   {
00101     return false;
00102   }
00103   virtual Float JacobianDeterminant( const VectorType& pt, const MatrixType* pJ ) const;
00104 
00105   virtual unsigned int GetNumberOfDegreesOfFreedomPerNode( void ) const
00106   { return 3; }
00107 
00111 #ifdef FEM_BUILD_VISUALIZATION
00112   void Draw(CDC* pDC, Solution::ConstPointer sol) const;
00113 #endif
00114 
00115 
00116 public:
00117 
00121   MaterialLinearElasticity::ConstPointer m_mat;
00122   virtual Material::ConstPointer GetMaterial(void) const { return m_mat; }
00123   virtual void SetMaterial(Material::ConstPointer mat_ ) { m_mat=dynamic_cast<const MaterialLinearElasticity*>(&*mat_); }
00124 
00125 
00126 };
00127 
00128 FEM_CLASS_INIT(Element2DC1Beam)
00129 
00130 
00131 
00132 
00133 }} // end namespace itk::fem
00134 
00135 #endif // #ifndef __itkFEMElement2DC1Beam_h

Generated at Wed Mar 12 01:12:54 2003 for ITK by doxygen 1.2.15 written by Dimitri van Heesch, © 1997-2000