ITK  4.6.0
Insight Segmentation and Registration Toolkit
itkFEMElement2DC1Beam.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 __itkFEMElement2DC1Beam_h
20 #define __itkFEMElement2DC1Beam_h
21 
22 #include "itkFEMElementStd.h"
23 #include "itkFEMLoadElementBase.h"
25 
26 namespace itk
27 {
28 namespace fem
29 {
38 class Element2DC1Beam : public ElementStd<2, 2>
39 {
40 public:
41 
48 
50  itkSimpleNewMacro(Self);
51 
54 
57  virtual::itk::LightObject::Pointer CreateAnother(void) const ITK_OVERRIDE;
58 
59 
64 
69 
70  // ////////////////////////////////////////////////////////////////////////
71  /*
72  * Methods related to the physics of the problem.
73  */
74 
76  virtual void GetStiffnessMatrix(MatrixType & Ke) const ITK_OVERRIDE;
77 
79  virtual void GetMassMatrix(MatrixType & Me) const ITK_OVERRIDE;
80 
82  virtual void GetStrainDisplacementMatrix(MatrixType &, const MatrixType &) const ITK_OVERRIDE
83  {
84  }
85 
87  virtual void GetMaterialMatrix(MatrixType &) const ITK_OVERRIDE
88  {
89  }
90 
91  // ////////////////////////////////////////////////////////////////////////
97 
99  virtual void GetIntegrationPointAndWeight(unsigned int i, VectorType & pt, Float & w, unsigned int order = 0) const ITK_OVERRIDE;
100 
101  virtual unsigned int GetNumberOfIntegrationPoints(unsigned int order) const ITK_OVERRIDE;
102 
103  // ////////////////////////////////////////////////////////////////////////
109  virtual VectorType ShapeFunctions(const VectorType & pt) const ITK_OVERRIDE;
110 
112  virtual void ShapeFunctionDerivatives(const VectorType & pt, MatrixType & shapeD) const ITK_OVERRIDE;
113 
115  virtual bool GetLocalFromGlobalCoordinates(const VectorType &, VectorType &) const ITK_OVERRIDE
116  {
117  return false;
118  }
119 
121  virtual Float JacobianDeterminant(const VectorType & pt, const MatrixType *pJ) const ITK_OVERRIDE;
122 
124  virtual unsigned int GetNumberOfDegreesOfFreedomPerNode(void) const ITK_OVERRIDE
125  {
126  return 3;
127  }
128 
132  virtual Material::ConstPointer GetMaterial(void) const ITK_OVERRIDE
133  {
134  return dynamic_cast<const Material *>(m_mat);
135  }
136 
137  virtual void SetMaterial(Material::ConstPointer mat_) ITK_OVERRIDE
138  {
139  m_mat =
140  dynamic_cast<const MaterialLinearElasticity *>( mat_.GetPointer() );
141  }
142 
144  virtual void PopulateEdgeIds(void) ITK_OVERRIDE { /* empty */ }
145 
146 protected:
147  virtual void PrintSelf(std::ostream& os, Indent indent) const ITK_OVERRIDE;
148 
149 private:
150 
155 
156 };
157 
158 }
159 } // end namespace itk::fem
160 
161 #endif // #ifndef __itkFEMElement2DC1Beam_h
Light weight base class for most itk classes.
SmartPointer< Self > Pointer
virtual unsigned int GetNumberOfDegreesOfFreedomPerNode(void) const ITK_OVERRIDE
virtual void GetIntegrationPointAndWeight(unsigned int i, VectorType &pt, Float &w, unsigned int order=0) const ITK_OVERRIDE
virtual void SetMaterial(Material::ConstPointer mat_) ITK_OVERRIDE
SmartPointer< const Self > ConstPointer
ElementStd< 2, 2 > TemplatedParentClass
Implements standard node management in the element classes.
vnl_matrix< Float > MatrixType
virtual void ShapeFunctionDerivatives(const VectorType &pt, MatrixType &shapeD) const ITK_OVERRIDE
Linear elasticity material class.
Base class for storing all the implicit material and other properties required to fully define the el...
virtual bool GetLocalFromGlobalCoordinates(const VectorType &, VectorType &) const ITK_OVERRIDE
virtual unsigned int GetNumberOfIntegrationPoints(unsigned int order) const ITK_OVERRIDE
1D Beam (spring that also bends) finite element in 2D space.
virtual Float JacobianDeterminant(const VectorType &pt, const MatrixType *pJ) const ITK_OVERRIDE
const MaterialLinearElasticity * m_mat
virtual void GetStrainDisplacementMatrix(MatrixType &, const MatrixType &) const ITK_OVERRIDE
vnl_vector< Float > VectorType
virtual Material::ConstPointer GetMaterial(void) const ITK_OVERRIDE
virtual void GetMassMatrix(MatrixType &Me) const ITK_OVERRIDE
virtual void PrintSelf(std::ostream &os, Indent indent) const ITK_OVERRIDE
Superclass::VectorType VectorType
virtual ::itk::LightObject::Pointer CreateAnother(void) const ITK_OVERRIDE
virtual void GetStiffnessMatrix(MatrixType &Ke) const ITK_OVERRIDE
Control indentation during Print() invocation.
Definition: itkIndent.h:49
TemplatedParentClass Superclass
virtual VectorType ShapeFunctions(const VectorType &pt) const ITK_OVERRIDE
virtual void GetMaterialMatrix(MatrixType &) const ITK_OVERRIDE
virtual void PopulateEdgeIds(void) ITK_OVERRIDE
Superclass::MatrixType MatrixType