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

itkFEMElement2DStress.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Insight Segmentation & Registration Toolkit
00004   Module:    $RCSfile: itkFEMElement2DStress.h,v $
00005   Language:  C++
00006   Date:      $Date: 2002/09/13 21:02:45 $
00007   Version:   $Revision: 1.7 $
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 __itkFEMElement2DStress_h
00019 #define __itkFEMElement2DStress_h
00020 
00021 #include "itkFEMElementBase.h"
00022 #include "itkFEMMaterialLinearElasticity.h"
00023 
00024 namespace itk {
00025 namespace fem {
00026 
00027 
00028 
00029 
00044 template<class TBaseClass=Element>
00045 class Element2DStress : public TBaseClass
00046 {
00047 FEM_ABSTRACT_CLASS(Element2DStress,TBaseClass)
00048 public:
00049 
00050   // Repeat the required typedefs and enums from parent class
00051   typedef typename Superclass::Float Float;
00052   typedef typename Superclass::MatrixType MatrixType;
00053   typedef typename Superclass::VectorType VectorType;
00054 
00058   virtual void Read( std::istream&, void* info );
00059 
00063   virtual void Write( std::ostream& f ) const;
00064 
00068   Element2DStress();
00069 
00070 
00071 
00072 
00074   /*
00075    * Methods related to the physics of the problem.
00076    */
00077 
00081   virtual void GetStrainDisplacementMatrix(MatrixType& B, const MatrixType& shapeDgl) const;
00082 
00086   virtual void GetMaterialMatrix(MatrixType& D) const;
00087 
00091   void GetMassMatrix(MatrixType& Me) const;
00092 
00093 
00097   virtual unsigned int GetNumberOfDegreesOfFreedomPerNode( void ) const
00098   { return 2; }
00099 
00100 
00101 
00102 public:
00103 
00107   MaterialLinearElasticity::ConstPointer m_mat;
00108   virtual Material::ConstPointer GetMaterial(void) const { return m_mat; }
00109   virtual void SetMaterial(Material::ConstPointer mat_ ) { m_mat=dynamic_cast<const MaterialLinearElasticity*>(&*mat_); }
00110 
00111 }; // class Element2DStress
00112 
00113 
00114 
00115 
00116 #ifdef _MSC_VER
00117 // Declare a static dummy function to prevent a MSVC 6.0 SP5 from crashing.
00118 // I have no idea why things don't work when this is not declared, but it
00119 // looks like this declaration makes compiler forget about some of the
00120 // troubles it has with templates.
00121 static void Dummy( void );
00122 #endif // #ifdef _MSC_VER
00123 
00124 }} // end namespace itk::fem
00125 
00126 #ifndef ITK_MANUAL_INSTANTIATION
00127 #include "itkFEMElement2DStress.txx"
00128 #endif
00129 
00130 #endif  // #ifndef __itkFEMElement2DStress_h

Generated at Fri May 21 01:14:42 2004 for ITK by doxygen 1.2.15 written by Dimitri van Heesch, © 1997-2000