ITK  4.6.0
Insight Segmentation and Registration Toolkit
itkFEMElement2DStrain.h
Go to the documentation of this file.
1 /*=========================================================================
2  *
3  * Copyright Insight Software Consortium
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0.txt
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  *
17  *=========================================================================*/
18 
19 #ifndef __itkFEMElement2DStrain_h
20 #define __itkFEMElement2DStrain_h
21 
22 #include "itkFEMElementBase.h"
24 
25 namespace itk
26 {
27 namespace fem
28 {
50 template <typename TBaseClass = Element>
51 class Element2DStrain : public TBaseClass
52 {
53 public:
54 
57  typedef TBaseClass Superclass;
60 
62  itkTypeMacro(Element2DStrain, TBaseClass);
63 
64  // Repeat the required typedefs and enums from parent class
65  typedef typename Superclass::Float Float;
68 
73 
74  // ////////////////////////////////////////////////////////////////////////
82  virtual void GetStrainDisplacementMatrix(MatrixType & B, const MatrixType & shapeDgl) const;
83 
87  virtual void GetMaterialMatrix(MatrixType & D) const;
88 
92  void GetMassMatrix(MatrixType & Me) const;
93 
97  virtual unsigned int GetNumberOfDegreesOfFreedomPerNode(void) const
98  {
99  return 2;
100  }
101 
106  {
107  return dynamic_cast<const Material *>(m_mat);
108  }
109 
111  {
112  m_mat =
113  dynamic_cast<const MaterialLinearElasticity *>( mat_.GetPointer() );
114  }
115 
116 protected:
117 
118  virtual void PrintSelf(std::ostream& os, Indent indent) const;
119 
124 }; // class Element2DStrain
125 
126 }
127 } // end namespace itk::fem
128 
129 #ifndef ITK_MANUAL_INSTANTIATION
130 #include "itkFEMElement2DStrain.hxx"
131 #endif
132 
133 #endif // #ifndef __itkFEMElement2DStrain_h
const MaterialLinearElasticity * m_mat
SmartPointer< Self > Pointer
void GetMassMatrix(MatrixType &Me) const
virtual Material::ConstPointer GetMaterial(void) const
virtual void GetMaterialMatrix(MatrixType &D) const
virtual void GetStrainDisplacementMatrix(MatrixType &B, const MatrixType &shapeDgl) const
ObjectType * GetPointer() const
virtual void SetMaterial(Material::ConstPointer mat_)
Superclass::MatrixType MatrixType
vnl_matrix< Float > MatrixType
Superclass::VectorType VectorType
virtual void PrintSelf(std::ostream &os, Indent indent) const
virtual unsigned int GetNumberOfDegreesOfFreedomPerNode(void) const
Linear elasticity material class.
Base class for storing all the implicit material and other properties required to fully define the el...
Class that is used to define linear elasticity problem in 2D space.
SmartPointer< const Self > ConstPointer
Superclass::VectorType VectorType
Control indentation during Print() invocation.
Definition: itkIndent.h:49
Superclass::MatrixType MatrixType