Orfeo Toolbox  3.16
itkFEMElement2DStress.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Insight Segmentation & Registration Toolkit
4  Module: $RCSfile: itkFEMElement2DStress.h,v $
5  Language: C++
6  Date: $Date: 2009-01-29 20:09:10 $
7  Version: $Revision: 1.9 $
8 
9  Copyright (c) Insight Software Consortium. All rights reserved.
10  See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.
11 
12  This software is distributed WITHOUT ANY WARRANTY; without even
13  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
14  PURPOSE. See the above copyright notices for more information.
15 
16 =========================================================================*/
17 
18 #ifndef __itkFEMElement2DStress_h
19 #define __itkFEMElement2DStress_h
20 
21 #include "itkFEMElementBase.h"
23 
24 namespace itk {
25 namespace fem {
26 
41 template<class TBaseClass=Element>
42 class Element2DStress : public TBaseClass
43 {
45 public:
46 
47  // Repeat the required typedefs and enums from parent class
48  typedef typename Superclass::Float Float;
49  typedef typename Superclass::MatrixType MatrixType;
50  typedef typename Superclass::VectorType VectorType;
51 
55  virtual void Read( std::istream&, void* info );
56 
60  virtual void Write( std::ostream& f ) const;
61 
66 
68  /*
69  * Methods related to the physics of the problem.
70  */
71 
75  virtual void GetStrainDisplacementMatrix(MatrixType& B, const MatrixType& shapeDgl) const;
76 
80  virtual void GetMaterialMatrix(MatrixType& D) const;
81 
85  void GetMassMatrix(MatrixType& Me) const;
86 
87 
91  virtual unsigned int GetNumberOfDegreesOfFreedomPerNode( void ) const
92  { return 2; }
93 
94 public:
95 
100  virtual Material::ConstPointer GetMaterial(void) const { return m_mat; }
101  virtual void SetMaterial(Material::ConstPointer mat_ ) { m_mat=dynamic_cast<const MaterialLinearElasticity*>(&*mat_); }
102 
103 }; // class Element2DStress
104 
105 #ifdef _MSC_VER
106 // Declare a static dummy function to prevent a MSVC 6.0 SP5 from crashing.
107 // I have no idea why things don't work when this is not declared, but it
108 // looks like this declaration makes compiler forget about some of the
109 // troubles it has with templates.
110 static void Dummy( void );
111 #endif // #ifdef _MSC_VER
112 
113 }} // end namespace itk::fem
114 
115 #ifndef ITK_MANUAL_INSTANTIATION
116 #include "itkFEMElement2DStress.txx"
117 #endif
118 
119 #endif // #ifndef __itkFEMElement2DStress_h

Generated at Sat Feb 2 2013 23:36:40 for Orfeo Toolbox with doxygen 1.8.1.1