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: 2009-01-28 21:57:30 $
00007   Version:   $Revision: 1.9 $
00008 
00009   Copyright (c) Insight Software 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 
00032 class Element2DC1Beam : public ElementStd<2,2>
00033 {
00034   typedef ElementStd<2,2> TemplatedParentClass;
00035   FEM_CLASS(Element2DC1Beam,TemplatedParentClass)
00036 public:
00037 
00038   // FIXME: Write this class in the same way as the others - 
00039   //        properly define all virtual functions.
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    * Methods related to the physics of the problem.
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 }} // end namespace itk::fem
00124 
00125 #endif // #ifndef __itkFEMElement2DC1Beam_h
00126 

Generated at Thu May 28 09:55:25 2009 for ITK by doxygen 1.5.5 written by Dimitri van Heesch, © 1997-2000